:root {
    --primary: #c9bc48; /* Mostaza para detalles y botones */
    --primary-glow: rgba(201, 188, 72, 0.6);
    --secondary: #9aa83a;
    --bg-color: #fff8ea; /* Fondo claro crema */
    --glass-bg: rgba(255, 248, 234, 0.85); /* Fondo base pero transparente */
    --glass-border: rgba(38, 81, 4, 0.15);
    --text-color: #265104; /* Verde oscuro para textos */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background: var(--bg-color);
    color: var(--text-color);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    position: relative;
}

/* Background Effects */
.glow-bg {
    position: absolute;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at 50% 50%, var(--primary-glow) 0%, transparent 50%);
    opacity: 0.15;
    z-index: 0;
    pointer-events: none;
    animation: pulse 8s ease-in-out infinite alternate;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.1; }
    100% { transform: scale(1.5); opacity: 0.25; }
}

/* Animation Container */
#canvas-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

/* Floating Book Entries */
.floating-book {
    position: absolute;
    white-space: nowrap;
    user-select: none;
    pointer-events: none; /* Let clicks pass through to the button */
    transition: transform 0.1s linear, opacity 1s ease;
    text-align: center;
    line-height: 1.2;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.book-title {
    /* Inherit sizes and colors computed in JS for the main title */
}

.book-author {
    font-size: 0.35em; /* 35% of the title size */
    opacity: 0.95;
    margin-top: 2px;
    font-weight: 300;
    text-shadow: none !important; /* keep it clean and subtle */
    letter-spacing: 0.5px;
}

/* Button Container */
.bottom-overlay {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

/* Top Title */
.top-title {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-color);
    letter-spacing: 2px;
    text-transform: uppercase;
    text-align: center;
    padding: 12px 30px;
    background: rgba(255, 248, 234, 0.4);
    backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    pointer-events: none; /* allows clicking through to books if needed */
    box-shadow: 0 4px 15px rgba(38, 81, 4, 0.05);
}

/* Premium Main Button */
.btn-glowing {
    background: var(--primary);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    color: var(--text-color);
    font-size: 1.2rem;
    font-weight: 700;
    padding: 16px 36px;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(201, 188, 72, 0.3);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.btn-glowing:hover {
    background: #dfd25c;
    box-shadow: 0 4px 20px rgba(201, 188, 72, 0.6), 0 0 15px rgba(38, 81, 4, 0.1);
    transform: translateY(-2px);
}

.btn-glowing:active {
    transform: translateY(1px);
}

/* Modal Overlay */
#modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 248, 234, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    opacity: 1;
    transition: opacity 0.3s ease;
}

#modal-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Glassmorphism Modal */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 40px 30px;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 10px 40px rgba(38, 81, 4, 0.15);
    position: relative;
    transform: scale(1);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#modal-overlay.hidden .glass-panel {
    transform: scale(0.8);
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: transparent;
    border: none;
    color: var(--text-color);
    font-size: 2rem;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.close-btn:hover {
    opacity: 1;
}

.glass-panel h2 {
    font-size: 2rem;
    margin-bottom: 5px;
    color: var(--text-color);
    text-align: center;
}

.glass-panel .subtitle {
    text-align: center;
    color: #4a7522; /* Un verde más clarito */
    font-size: 0.95rem;
    margin-bottom: 25px;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-color);
    letter-spacing: 0.5px;
}

.input-group input {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--text-color);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.input-group input::placeholder {
    color: rgba(38, 81, 4, 0.4);
}

.input-group input:focus {
    background: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

.modal-footer {
    margin-top: 30px;
    display: flex;
    justify-content: center;
}

.btn-submit {
    background: var(--primary);
    border: none;
    border-radius: 50px;
    padding: 14px 40px;
    color: var(--text-color);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(201, 188, 72, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(201, 188, 72, 0.5);
    background: #dfd25c;
}

.btn-submit:active {
    transform: translateY(1px);
}
