:root {
    --primary-color: #2c5aa0;
    --secondary-color: #4facfe;
}

/* --- SPECIAL EFFECTS & THEME --- */
.water-bg {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    min-height: 100%;
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(120deg, #e8f4ff 0%, #cbe6fa 30%, #a7d3f7 60%, #6baeea 100%);
    background-size: 200% 200%;
    animation: gradientMove 7s ease-in-out infinite;
}

@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Book Stack Fan-out */
.book-stack {
    position: relative;
    width: 100%;
    max-width: 420px;
    aspect-ratio: 420/595;
    margin: 0 auto;
}

.book-stack-page,
.book-stack-cover {
    width: 100%;
    height: 100%;
    max-width: 420px;
    max-height: 595px;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(44,90,160,0.10);
    position: absolute;
    left: 0;
    top: 0;
}

.book-stack-cover {
    z-index: 10;
    box-shadow: 0 20px 40px rgba(44,90,160,0.10);
    background: white;
    transition: box-shadow 0.5s cubic-bezier(.22,1.61,.36,1),
                transform 0.5s cubic-bezier(.22,1.61,.36,1);
}

.book-stack-cover:hover {
    box-shadow: 0 32px 64px rgba(44,90,160,0.18);
    transform: scale(1.07) rotate(-3deg) skewY(-2deg);
}

.book-stack-page:nth-child(1) { transform: rotate(-8deg) translate(-30px, 20px); z-index: 1; }
.book-stack-page:nth-child(2) { transform: rotate(-4deg) translate(-15px, 10px); z-index: 2; }
.book-stack-page:nth-child(3) { transform: rotate(4deg) translate(15px, 10px); z-index: 3; }
.book-stack-page:nth-child(4) { transform: rotate(8deg) translate(30px, 20px); z-index: 4; }
.book-stack:hover .book-stack-page { opacity: 1; }
.book-stack:hover .book-stack-page:nth-child(1) { transform: rotate(-18deg) translate(-70px, 40px) scale(1.04); z-index: 1; }
.book-stack:hover .book-stack-page:nth-child(2) { transform: rotate(-9deg) translate(-35px, 20px) scale(1.03); z-index: 2; }
.book-stack:hover .book-stack-page:nth-child(3) { transform: rotate(9deg) translate(35px, 20px) scale(1.03); z-index: 3; }
.book-stack:hover .book-stack-page:nth-child(4) { transform: rotate(18deg) translate(70px, 40px) scale(1.04); z-index: 4; }

@media (max-width: 1200px) {
    .book-stack, .book-stack-page, .book-stack-cover {
        max-width: 336px;
        max-height: 476px;
    }
}

@media (max-width: 768px) {
    .book-stack, .book-stack-page, .book-stack-cover {
        max-width: 252px;
        max-height: 357px;
    }
}

/* Fade-in and slide-up animation */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in-up { opacity: 0; animation: fadeInUp 1s cubic-bezier(0.4,0,0.2,1) forwards; }
.fade-in-up.delay-1 { animation-delay: 0.2s; }
.fade-in-up.delay-2 { animation-delay: 0.4s; }
.fade-in-up.delay-3 { animation-delay: 0.6s; }

/* Card hover and transition effects */
.card {
    transition: box-shadow 0.3s cubic-bezier(0.4,0,0.2,1), transform 0.3s cubic-bezier(0.4,0,0.2,1);
}

.card:hover {
    box-shadow: 0 8px 32px rgba(44,90,160,0.18);
    transform: translateY(-6px) scale(1.03);
}

/* Login card - prevent bouncing on hover */
.login-card:hover {
    transform: none !important;
    transition: none !important;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Ensure modals are always on top */
.modal-backdrop {
    z-index: 9998 !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.modal {
    z-index: 9999 !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    outline: 0;
    overflow-x: hidden;
    overflow-y: auto;
}

.cta-button {
    box-shadow: 0 4px 15px rgba(44, 90, 160, 0.2);
}

.cta-button:hover {
    box-shadow: 0 8px 25px rgba(44, 90, 160, 0.3);
    background: linear-gradient(90deg, var(--secondary-color), var(--primary-color));
}

/* Gradient headings */
.gradient-heading {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero.position-relative {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.container-fluid, .container, .row, .col-12, .col-lg-6 {
    position: relative;
    z-index: 1;
}

.intro-debug {
    background: rgba(255,255,255,0.7);
    color: #1d1d1f;
}

html, body {
    height: 100%;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    min-height: 100vh;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.copyright {
    width: 100%;
    text-align: center;
    color: var(--text-secondary, #86868b);
    font-size: 1.1rem;
    padding: 2rem 0 1.5rem 0;
    z-index: 2;
    position: relative;
}

.container-fluid.position-relative {
    min-height: 100vh;
    position: relative;
}
