/* ==========================================
   1. GLOBAL STYLES & RESET
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #FFFFFF;
    color: #1A1A1A;
    scroll-behavior: smooth;
}

/* White & Off-White Premium Color Scheme */
:root {
    --gold-accent: #C7A252;
    --gold-light: #E8D5A8;
    --pure-white: #FFFFFF;
    --off-white: #F8F8F8;
    --soft-white: #F5F5F5;
    --card-white: #FAFAFA;
    --dark-gray: #1A1A1A;
    --medium-gray: #4A4A4A;
    --light-gray: #E0E0E0;
    --border-light: #EEEEEE;
}

/* ==========================================
   2. NAVIGATION BAR
   ========================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.02);
    z-index: 1000;
    border-bottom: 1px solid var(--border-light);
    padding: 0 5%;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo-link {
    text-decoration: none;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.logo {
    display: flex;
    align-items: center;
    transition: transform 0.2s ease;
}

.logo:hover {
    transform: scale(1.02);
}

.premium-logo {
    position: relative;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.book-logo {
    width: 48px;
    height: 48px;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.06));
    transition: all 0.3s ease;
}

/* Logo Animations */
@keyframes logoGlowPulse {
    0%, 100% { opacity: 0; transform: scale(0.95); }
    50% { opacity: 0.6; transform: scale(1.05); }
}

@keyframes pageFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-2px); }
}

@keyframes bookmarkSway {
    0%, 100% { transform: rotate(0deg); transform-origin: 50% 28px; }
    50% { transform: rotate(3deg); transform-origin: 50% 28px; }
}

@keyframes spineDash {
    0% { stroke-dashoffset: 20; }
    100% { stroke-dashoffset: 0; }
}

@keyframes pageLinesFade {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 0.6; }
}

.logo-glow { animation: logoGlowPulse 3s ease-in-out infinite; }
.left-page, .right-page { animation: pageFloat 3s ease-in-out infinite; }
.right-page { animation-delay: 0.15s; }
.bookmark { animation: bookmarkSway 2.5s ease-in-out infinite; transform-origin: 50% 28px; }
.spine { animation: spineDash 2s linear infinite; }
.page-lines, .page-lines-2, .page-lines-3 { animation: pageLinesFade 2s ease-in-out infinite; }
.page-lines-2 { animation-delay: 0.3s; }
.page-lines-3 { animation-delay: 0.6s; }

.logo:hover .book-logo {
    filter: drop-shadow(0 4px 12px rgb(180, 149, 14));
}

/* Navigation Links */
.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    color: var(--medium-gray);
    transition: 0.2s;
    letter-spacing: -0.2px;
    position: relative;
}

.nav-links a:hover {
    color: #6b3939;
}

.nav-links a:after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0%;
    height: 2px;
    background: #907531a5;
    transition: 0.25s;
}

.nav-links a:hover:after {
    width: 100%;
}

/* ==========================================
   3. NAV AUTH & USER PROFILE FLEX AREA
   ========================================== */
.nav-auth-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

#userProfileArea {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--gold-accent);
    box-shadow: 0 2px 8px rgba(199, 162, 82, 0.2);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.user-avatar-img:hover {
    transform: scale(1.08);
}

.btn-logout {
    background: transparent;
    color: #666;
    border: 1px solid var(--light-gray);
    padding: 6px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: 0.2s;
}

.btn-logout:hover {
    background: #ff4d4d;
    color: white;
    border-color: #ff4d4d;
    box-shadow: 0 4px 12px rgba(255, 77, 77, 0.2);
}

/* Header Action Buttons */
.btn-login, .btn-signup {
    background: rgba(226, 226, 226, 0.4);
    border: 1.5px solid rgba(133, 122, 122, 0.2);
    color: var(--dark-gray);
    padding: 0.5rem 1.4rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: 0.25s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-login:hover, .btn-signup:hover {
    background: linear-gradient(135deg, #1A1A1A 0%, var(--gold-accent) 100%);
    color: var(--pure-white);
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(199, 162, 82, 0.2);
}

/* Hamburger menu button */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 6px;
    z-index: 1100;
}

.hamburger span {
    width: 28px;
    height: 2px;
    background-color: var(--dark-gray);
    transition: 0.25s ease;
    border-radius: 4px;
}

/* ==========================================
   4. HERO SECTION
   ========================================== */
.hero {
    min-height: 90vh;
    width: 100%;
    background: linear-gradient(135deg, #ffffff 0%, #00000015 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 80px;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 80% 20%, rgba(199, 162, 82, 0.03) 0%, rgba(0,0,0,0) 70%);
    pointer-events: none;
}

.hero-content {
    max-width: 1300px;
    margin: 0 auto;
    padding: 3rem 2rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
    position: relative;
    z-index: 2;
}

.hero-text {
    flex: 1;
    min-width: 280px;
}

.hero-text .badge {
    display: inline-block;
    background: linear-gradient(135deg, #848484 0%, var(--gold-light) 100%);
    backdrop-filter: blur(4px);
    padding: 0.4rem 1rem;
    border-radius: 40px;
    font-size: 0.8rem;
    font-weight: 600;
    color: black;
    margin-bottom: 1.5rem;
    letter-spacing: 0.3px;
}

.hero-text h1 {
    font-size: 2.5rem;
    font-weight: 750;
    letter-spacing: 2px;
    line-height: 1.2;
    color: var(--dark-gray);
    margin-bottom: 1.2rem;
}

.hero-text h1 i {
    background: linear-gradient(135deg, #ffd025 0%, #000000 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-style: normal;
    border-bottom: 2px solid rgb(0, 0, 0);
    text-shadow: 0 0 8px rgba(232, 213, 168, 0.35);
}

.hero-text p {
    font-size: 1rem;
    line-height: 1.5;
    color: #000000;
    margin-bottom: 2rem;
    max-width: 90%;
}

.hero-buttons {
    display: flex;
    gap: 1.2rem;
    flex-wrap: wrap;
}

.btn-primary {
    background: linear-gradient(135deg, #848484 0%, var(--gold-light) 100%);
    color: rgba(0, 0, 0, 0.89);
    padding: 0.9rem 2rem;
    border-radius: 48px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.25s;
    font-size: 1rem;
    box-shadow: 0 8px 18px rgba(0,0,0,0.03);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #000000 0%, var(--gold-light) 100%);
    transform: translateY(-3px);
    box-shadow: 0 12px 22px rgba(199,162,82,0.2);
    color: white;
}

.btn-secondary {
    background: transparent;
    border: 1.5px solid var(--dark-gray);
    color: var(--dark-gray);
    padding: 0.9rem 2rem;
    border-radius: 48px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.25s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-secondary:hover {
    background: var(--dark-gray);
    color: white;
    transform: translateY(-2px);
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image img {
    max-width: 100%;
    width: 700px;
    filter: drop-shadow(0 25px 30px rgba(0,0,0,0.05));
    border-radius: 52px;
    object-fit: cover;
}

/* ==========================================
   5. PREMIUM AUTH MODAL INTERFACE
   ========================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(6px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.modal-box {
    background: var(--pure-white);
    padding: 2.8rem 2.4rem;
    border-radius: 28px;
    max-width: 420px;
    width: 90%;
    position: relative;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.12);
    border: 1px solid var(--border-light);
    text-align: center;
    animation: modalFadeIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(15px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 22px;
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: #999;
    transition: color 0.2s;
    line-height: 1;
}

.close-btn:hover {
    color: var(--dark-gray);
}

.modal-box h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--dark-gray);
    margin-bottom: 0.6rem;
    letter-spacing: -0.5px;
}

.modal-box p {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 1.8rem;
}

/* Modal Inputs styling */
.modal-box input {
    width: 100%;
    padding: 14px 18px;
    margin-bottom: 1.1rem;
    border: 1px solid #DDDDDD;
    border-radius: 12px;
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    transition: all 0.2s ease;
    background-color: var(--off-white);
}

.modal-box input:focus {
    border-color: var(--gold-accent);
    background-color: var(--pure-white);
    box-shadow: 0 0 0 4px rgba(199, 162, 82, 0.1);
}

/* Premium Black-to-Gold Action Button */
.auth-submit-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #1A1A1A 0%, #333333 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 0.4rem;
}

.auth-submit-btn:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #1A1A1A 0%, var(--gold-accent) 100%);
    box-shadow: 0 8px 20px rgba(199, 162, 82, 0.25);
}

.switch-form-text {
    margin-top: 1.6rem;
    font-size: 0.9rem;
    color: #555;
}

.switch-form-text span {
    color: var(--gold-accent);
    cursor: pointer;
    font-weight: 600;
    margin-left: 4px;
}

.switch-form-text span:hover {
    text-decoration: underline;
}

/* ==========================================
   6. PREMIUM FOOTER
   ========================================== */
.premium-footer {
    background: var(--pure-white);
    border-top: 1px solid var(--border-light);
    padding: 4rem 2rem 1.5rem;
    margin-top: 4rem;
}

.footer-container {
    max-width: 1300px;
    margin: 0 auto;
}

.footer-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.footer-col h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
    color: var(--dark-gray);
    letter-spacing: -0.2px;
    position: relative;
    display: inline-block;
}

.footer-col h4:after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 35px;
    height: 2px;
    background: var(--gold-accent);
}

.footer-col a {
    display: block;
    color: var(--medium-gray);
    text-decoration: none;
    margin-bottom: 0.7rem;
    font-size: 0.9rem;
    transition: 0.2s;
}

.footer-col a:hover {
    color: var(--gold-accent);
    transform: translateX(4px);
}

.social-icons {
    display: flex;
    gap: 1.2rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.social-icons a {
    background: var(--soft-white);
    width: 35px;
    height: 35px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 30%;
    color: var(--dark-gray);
    font-size: 1.2rem;
    transition: 0.2s;
}

.social-icons a:hover {
    background: #a5a5a5;
    color: white;
    transform: translateY(-3px);
}

.footer-message {
    background: var(--off-white);
    padding: 1.2rem 1.5rem;
    border-radius: 24px;
    margin: 1.8rem 0 1.5rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--medium-gray);
    border-left: 3px solid var(--gold-accent);
}

.footer-message i {
    color: var(--gold-accent);
    margin-right: 6px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding-top: 1.5rem;
    font-size: 0.8rem;
    color: #6B6B6B;
    border-top: 1px solid var(--border-light);
}

.footer-bottom .brand {
    font-weight: 500;
}

/* ==========================================
   7. RESPONSIVE DESIGN (MEDIA QUERIES)
   ========================================== */
@media (max-width: 980px) {
    .hero-text h1 { font-size: 2.7rem; }
    .hero-text p { max-width: 100%; }
    .hero-content { flex-direction: column; text-align: center; }
    .hero-buttons { justify-content: center; }
}

@media (max-width: 800px) {
    .hamburger {
        display: flex;
    }
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 75%;
        max-width: 320px;
        height: 100vh;
        background: var(--pure-white);
        flex-direction: column;
        justify-content: center;
        gap: 1.8rem;
        box-shadow: -5px 0 25px rgba(0,0,0,0.05);
        transition: 0.3s ease-in-out;
        z-index: 1050;
        padding: 2rem;
        border-left: 1px solid var(--border-light);
    }
    .nav-links.active {
        right: 0;
    }
    .nav-links a {
        font-size: 1.1rem;
    }
    
    /* Layout Adjustments for Side Drawer */
    .nav-auth-container {
        width: 100%;
        flex-direction: column;
        gap: 12px;
        margin-top: 1rem;
    }
    #userProfileArea {
        flex-direction: column;
        width: 100%;
        gap: 14px;
    }
    .btn-login, .btn-signup, .btn-logout {
        justify-content: center;
        width: 100%;
        padding: 0.7rem;
    }
    .hero {
        margin-top: 80px;
    }
}

@media (max-width: 560px) {
    .hero-text h1 { font-size: 2rem; }
    .btn-primary, .btn-secondary { padding: 0.7rem 1.4rem; font-size: 0.9rem; }
    .premium-logo, .book-logo { width: 40px; height: 40px; }
}

/* --- Premium Social Login Buttons Layout --- */
.social-divider {
    text-align: center;
    margin: 20px 0;
    position: relative;
}
.social-divider::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 1;
}
.social-divider span {
    position: relative;
    z-index: 2;
    background: #ffffff; /* Match this with your exact modal content background color */
    padding: 0 15px;
    color: #000000;
    font-size: 13px;
    font-weight: 500;
}
.social-btn-container {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}
.social-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: linear-gradient(135deg, #1A1A1A 0%, var(--gold-accent) 100%);
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.social-btn i {
    font-size: 15px;
}
/* Hover Effects matching Elite Gold Theme */
.social-btn:hover {
    background: #ffffff;
    color: #000;
    border-color: #000000;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(199, 162, 82, 0.2);
}
.social-btn:active {
    transform: translateY(0);
}