@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --orange-900: #7C2400;
    --orange-800: #A83000;
    --orange-700: #C94010;
    --orange-600: #E05520;
    --orange: #F06820;
    --orange-400: #F58040;
    --orange-300: #F9A070;
    --orange-100: #FDE8D8;
    --orange-50: #FFF5EE;
    --dark: #1A0F08;
    --dark-2: #2C1A0E;
    --dark-3: #3D2614;
    --gray-700: #6B5B52;
    --gray-500: #9C897E;
    --gray-300: #C8B9B0;
    --gray-100: #F0EAE6;
    --white: #FFFCFA;
    --green: #22C55E;
    --red: #EF4444;
    --blue: #3B82F6;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 2px 12px rgba(200,90,20,.08);
    --shadow-md: 0 6px 24px rgba(200,90,20,.12);
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: var(--gray-100);
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-user-select: none; -moz-user-select: none; user-select: none;
}

/* ===== HEADER ===== */
.header {
    background: var(--white);
    border-bottom: 1px solid var(--gray-100);
    padding: 0 2rem;
    height: 64px;
    display: flex;
    align-items: center;
    position: sticky; top: 0; z-index: 1000;
    box-shadow: var(--shadow);
}
.header-container {
    max-width: 1400px; margin: 0 auto; width: 100%;
    display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
}
.logo {
    display: flex; align-items: center; gap: 0.65rem;
    color: var(--dark); font-size: 1.1rem; font-weight: 800;
    white-space: nowrap; text-decoration: none;
}
.logo img { height: 38px; width: 38px; border-radius: 50%; object-fit: cover; box-shadow: 0 2px 8px rgba(200,90,20,.15); }
.logo span { color: var(--dark); }
.logo span em { font-style: normal; color: var(--orange); }

/* Nav */
.nav-links { display: flex; gap: 0.25rem; align-items: center; }
.nav-link {
    color: var(--gray-700); text-decoration: none;
    display: flex; align-items: center; gap: 0.45rem;
    padding: 0.5rem 0.85rem; border-radius: var(--radius-sm);
    transition: all 0.2s; cursor: pointer; font-size: 13px; font-weight: 600;
    border: 1.5px solid transparent;
}
.nav-link:hover { background: var(--orange-50); color: var(--orange); }
.nav-link.logout { border-color: var(--gray-100); }
.nav-link.logout:hover { border-color: var(--orange-300); color: var(--orange); background: var(--orange-50); }
.nav-link.login-btn {
    background: linear-gradient(135deg, var(--orange), var(--orange-700));
    color: white !important; border-radius: 50px; border: none;
    padding: 0.5rem 1.25rem;
    box-shadow: 0 3px 10px rgba(240,104,32,.25);
}
.nav-link.login-btn:hover { opacity: 0.9; transform: translateY(-1px); color: white !important; }

.nav-profile-pic {
    width: 32px; height: 32px; border-radius: 50%;
    border: 2px solid var(--orange-300); overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    background: var(--orange-50); flex-shrink: 0;
}
.nav-profile-pic img { width: 100%; height: 100%; object-fit: cover; }

/* Notification */
.notification-center { position: relative; }
.notification-badge {
    position: absolute; top: 2px; right: 2px;
    background: var(--red); color: white; border-radius: 50%;
    width: 18px; height: 18px; font-size: 0.7rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid var(--white);
}
.notification-dropdown {
    display: none; position: fixed; right: 20px;
    background: var(--white); border: 1px solid var(--gray-100);
    border-radius: var(--radius); width: 360px; max-height: 420px;
    overflow-y: auto; box-shadow: var(--shadow-md); z-index: 1001;
}
.notification-dropdown h4 { color: var(--dark); font-size: 14px; font-weight: 800; }

/* Hamburger */
.hamburger-menu {
    display: none; flex-direction: column; background: none; border: none;
    cursor: pointer; gap: 5px; padding: 0.5rem; z-index: 1001;
}
.hamburger-menu span {
    width: 22px; height: 2.5px; background: var(--dark);
    border-radius: 2px; transition: all 0.3s;
}
.hamburger-menu.active span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.hamburger-menu.active span:nth-child(2) { opacity: 0; }
.hamburger-menu.active span:nth-child(3) { transform: rotate(-45deg) translate(6px,-6px); }

/* Mobile Nav */
.mobile-nav-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.4); z-index: 999;
}
.mobile-nav-overlay.active { display: block; }
.mobile-nav-menu {
    position: fixed; left: 0; top: 0; width: 280px; height: 100vh;
    background: linear-gradient(180deg, #FFA000 0%, #FF6600 50%, #E63E00 100%);
    z-index: 1002; overflow-y: auto;
    transform: translateX(-100%); transition: transform 0.3s;
    padding-top: 60px;
}
.mobile-nav-menu.active { transform: translateX(0); }
.mobile-nav-menu .sidebar-menu { list-style: none; padding: 0; }
.mobile-nav-menu .sidebar-menu a {
    color: rgba(255,255,255,.85); padding: 0.85rem 1.5rem;
    display: flex; align-items: center; gap: 1rem;
    text-decoration: none; border-left: 3px solid transparent; transition: all 0.2s;
    font-size: 13.5px; font-weight: 500;
}
.mobile-nav-menu .sidebar-menu a:hover,
.mobile-nav-menu .sidebar-menu a.active {
    background: rgba(255,255,255,.2); border-left-color: white; color: white; font-weight: 700;
}
.mobile-user-menu { border-bottom: 1px solid rgba(255,255,255,.25) !important; }
.mobile-user-menu .profile-info {
    padding: 1rem 1.5rem; display: flex; align-items: center;
    gap: 0.75rem; color: white; cursor: pointer;
}
.mobile-user-menu .profile-info:hover { background: rgba(255,255,255,.15); }
.mobile-user-menu .profile-info i { font-size: 1.5rem; }
.mobile-user-menu .profile-info span { font-weight: 600; font-size: 14px; }
.mobile-user-menu .logout-btn {
    display: flex; align-items: center; gap: 1rem;
    padding: 0.85rem 1.5rem; background: none; border: none;
    color: rgba(255,255,255,.85); width: 100%; cursor: pointer;
    font-size: 13.5px; font-family: inherit; font-weight: 500; transition: all 0.2s;
}
.mobile-user-menu .logout-btn:hover { background: rgba(0,0,0,.15); color: white; }
.mobile-login-menu { border-top: 1px solid rgba(255,255,255,.25); margin-top: 1rem; padding-top: 0.5rem; }
.mobile-login-btn {
    display: flex; align-items: center; gap: 1rem;
    padding: 0.85rem 1.5rem; background: none; border: none;
    color: white; width: 100%; cursor: pointer;
    font-size: 13.5px; font-family: inherit; font-weight: 600; transition: all 0.2s;
}
.mobile-login-btn:hover { background: rgba(255,255,255,.2); }

/* ===== HERO ===== */
.hero {
    position: relative; overflow: hidden;
    padding: 5rem 2rem 3.5rem; text-align: center;
    background: linear-gradient(135deg, #FFA000 0%, #FF6600 40%, #E63E00 100%);
}
.hero::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(255,200,80,.2) 0%, transparent 60%),
                radial-gradient(circle at 80% 80%, rgba(255,255,255,.08) 0%, transparent 40%);
    pointer-events: none;
}
.hero-content { position: relative; z-index: 1; max-width: 750px; margin: 0 auto; }
.hero-badge {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: rgba(255,255,255,.2); border: 1px solid rgba(255,255,255,.3);
    padding: 0.45rem 1.25rem; border-radius: 50px;
    color: white; font-size: 12px; font-weight: 700;
    margin-bottom: 1.5rem; letter-spacing: .3px;
    backdrop-filter: blur(4px);
    animation: fadeInUp 0.5s ease-out;
}
.hero h1 {
    font-size: 3rem; font-weight: 800; line-height: 1.15;
    margin-bottom: 1rem; letter-spacing: -0.02em;
    color: white;
    animation: fadeInUp 0.5s ease-out 0.1s both;
}
.hero h1 .highlight {
    position: relative;
    text-shadow: 0 2px 20px rgba(0,0,0,.15);
}
.hero p {
    font-size: 1.1rem; color: rgba(255,255,255,.9); max-width: 550px; margin: 0 auto 2rem;
    font-weight: 500;
    animation: fadeInUp 0.5s ease-out 0.15s both;
}

/* Hero Search */
.hero-search {
    max-width: 560px; margin: 0 auto;
    display: flex; background: var(--white);
    border-radius: 50px; padding: 0.3rem; overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,.15);
    animation: fadeInUp 0.5s ease-out 0.2s both;
}
.hero-search input {
    flex: 1; background: transparent; border: none; outline: none;
    padding: 0.8rem 1.25rem; color: var(--dark);
    font-size: 14px; font-family: inherit;
}
.hero-search input::placeholder { color: var(--gray-500); }
.hero-search button {
    background: linear-gradient(135deg, var(--orange), var(--orange-700));
    color: white; border: none; padding: 0.8rem 1.75rem;
    border-radius: 50px; cursor: pointer; font-weight: 700;
    font-size: 13px; font-family: inherit;
    display: flex; align-items: center; gap: 0.4rem;
    transition: all 0.2s; white-space: nowrap;
    box-shadow: 0 3px 10px rgba(240,104,32,.3);
}
.hero-search button:hover { opacity: 0.9; transform: scale(1.02); }

/* Hero Stats */
.hero-stats {
    display: flex; justify-content: center; gap: 3rem;
    margin-top: 2.5rem; animation: fadeInUp 0.5s ease-out 0.3s both;
}
.hero-stat { text-align: center; }
.hero-stat .number {
    font-size: 2rem; font-weight: 800; color: white;
    display: block; text-shadow: 0 2px 10px rgba(0,0,0,.1);
}
.hero-stat .label {
    font-size: 12px; color: rgba(255,255,255,.8);
    font-weight: 600; text-transform: uppercase; letter-spacing: .5px;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== FEATURES ===== */
.features-section {
    max-width: 1200px; margin: 0 auto; padding: 4rem 2rem;
}
.section-header { text-align: center; margin-bottom: 2.5rem; }
.section-header h2 { font-size: 1.75rem; font-weight: 800; color: var(--dark); margin-bottom: 0.5rem; }
.section-header p { color: var(--gray-500); font-size: 14px; font-weight: 500; }
.features-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem;
}
.feature-card {
    background: var(--white); border: 1px solid rgba(0,0,0,.05);
    border-radius: var(--radius); padding: 1.75rem; transition: all 0.25s;
    position: relative; overflow: hidden; box-shadow: var(--shadow);
    cursor: default;
}
.feature-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--orange), var(--orange-400));
    transform: scaleX(0); transition: transform 0.3s; transform-origin: left;
}
.feature-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.feature-card:hover::before { transform: scaleX(1); }
.feature-icon {
    width: 44px; height: 44px; border-radius: 10px;
    background: var(--orange-100);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.15rem; color: var(--orange); margin-bottom: 1rem;
}
.feature-card h3 { font-size: 14px; font-weight: 800; color: var(--dark); margin-bottom: 0.4rem; }
.feature-card p { color: var(--gray-500); font-size: 12.5px; line-height: 1.7; font-weight: 500; }

/* ===== CTA ===== */
.cta-section { max-width: 1200px; margin: 0 auto; padding: 1rem 2rem 4rem; }
.cta-card {
    background: linear-gradient(135deg, #FFA000 0%, #FF6600 40%, #E63E00 100%);
    border-radius: var(--radius); padding: 3.5rem; text-align: center;
    position: relative; overflow: hidden;
}
.cta-card::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(circle at 80% 20%, rgba(255,255,255,.12) 0%, transparent 50%);
}
.cta-card h2 { font-size: 1.75rem; font-weight: 800; margin-bottom: 0.5rem; position: relative; color: white; }
.cta-card p { opacity: 0.9; font-size: 14px; margin-bottom: 1.75rem; position: relative; color: white; font-weight: 500; }
.cta-btn {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: white; color: var(--orange-700); border: none;
    padding: 0.85rem 2.25rem; border-radius: 50px; font-weight: 800;
    font-size: 13.5px; cursor: pointer; transition: all 0.2s;
    text-decoration: none; position: relative; font-family: inherit;
    box-shadow: 0 4px 15px rgba(0,0,0,.15);
}
.cta-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(0,0,0,.2); }

/* ===== FOOTER ===== */
.footer {
    border-top: 1px solid var(--gray-100); background: var(--white);
    padding: 1.5rem 2rem; text-align: center;
    color: var(--gray-500); font-size: 12.5px; font-weight: 500;
}

/* ===== AUTH MODAL ===== */
.auth-modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.45);
    backdrop-filter: blur(4px); display: none;
    align-items: center; justify-content: center; z-index: 2000;
}
.auth-modal-overlay.active { display: flex; }
.auth-modal-content {
    background: var(--white); border: 1px solid var(--gray-100);
    border-radius: var(--radius); width: 90%; max-width: 560px;
    padding: 2rem; box-shadow: var(--shadow-md);
    animation: modalSlideUp 0.3s ease; max-height: 90vh;
    display: flex; flex-direction: column; overflow: hidden;
}
@keyframes modalSlideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.auth-modal-header {
    display: flex; justify-content: center; align-items: center;
    text-align: center; position: relative; margin-bottom: 1rem; flex-shrink: 0;
}
.auth-modal-header h2 { font-size: 1.3rem; font-weight: 800; flex: 1; text-align: center; color: var(--dark); }
.auth-modal-close {
    background: none; border: none; font-size: 1.5rem;
    color: var(--gray-500); cursor: pointer; transition: color 0.2s;
    position: absolute; right: 0; top: 0;
}
.auth-modal-close:hover { color: var(--orange); }
.auth-tabs {
    display: flex; gap: 0.25rem; margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--gray-100);
    justify-content: center; flex-shrink: 0;
}
.auth-tab {
    background: none; border: none; padding: 0.65rem 1rem; cursor: pointer;
    font-weight: 700; color: var(--gray-500); transition: all 0.2s;
    border-bottom: 2.5px solid transparent; margin-bottom: -1px;
    font-family: inherit; font-size: 13px;
}
.auth-tab.active { color: var(--orange); border-bottom-color: var(--orange); }
.auth-tab-content { overflow-y: auto; padding-right: 0.5rem; flex: 1; }
.auth-tab-content::-webkit-scrollbar { width: 5px; }
.auth-tab-content::-webkit-scrollbar-track { background: var(--gray-100); border-radius: 10px; }
.auth-tab-content::-webkit-scrollbar-thumb { background: var(--orange-300); border-radius: 10px; }
.auth-form-group { margin-bottom: 0.75rem; }
.auth-form-group label {
    display: block; margin-bottom: 0.3rem; font-weight: 700;
    color: var(--orange); text-align: left; font-size: 12px;
    text-transform: uppercase; letter-spacing: .3px;
}
.auth-form-group input, .auth-form-group select {
    width: 100%; padding: 0.65rem 0.85rem;
    background: var(--white); border: 1.5px solid var(--gray-100);
    border-radius: var(--radius-sm); color: var(--dark);
    font-size: 13.5px; font-family: inherit; transition: border-color 0.2s;
}
.auth-form-group input:focus, .auth-form-group select:focus {
    outline: none; border-color: var(--orange-300);
    box-shadow: 0 0 0 3px rgba(240,104,32,.08);
}
.auth-form-group input::placeholder { color: var(--gray-300); }
.auth-form-group select option { background: var(--white); }
.auth-submit-btn {
    width: 100%; padding: 0.7rem;
    background: linear-gradient(135deg, var(--orange), var(--orange-700));
    color: white; border: none; border-radius: var(--radius-sm);
    font-weight: 700; font-size: 13.5px; cursor: pointer;
    transition: all 0.2s; margin-top: 0.75rem; font-family: inherit;
    box-shadow: 0 3px 10px rgba(240,104,32,.25);
}
.auth-submit-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 15px rgba(240,104,32,.35); }
.auth-footer-text { text-align: center; color: var(--gray-500); font-size: 12.5px; margin-top: 0.65rem; }
.auth-footer-text a { color: var(--orange); text-decoration: none; font-weight: 700; cursor: pointer; }
.auth-footer-text a:hover { text-decoration: underline; }
.alert-message { padding: 0.75rem; border-radius: var(--radius-sm); margin-bottom: 0.75rem; display: none; text-align: center; font-size: 13px; font-weight: 600; }
.alert-success { background: rgba(34,197,94,.1); color: #16A34A; border: 1px solid rgba(34,197,94,.2); }
.alert-danger { background: rgba(239,68,68,.1); color: #B91C1C; border: 1px solid rgba(239,68,68,.2); }
#loginForm, #signupForm { text-align: center; }
.auth-modal-content > p { text-align: center !important; }

/* Animations */
@keyframes spin { from{transform:rotate(0deg)} to{transform:rotate(360deg)} }
.fa-spinner { animation: spin 1s linear infinite; }
@keyframes successPulse { 0%{transform:scale(1)} 50%{transform:scale(1.03)} 100%{transform:scale(1)} }
.login-success { animation: successPulse 0.6s ease; }
@keyframes shake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-8px)} 75%{transform:translateX(8px)} }
.shake { animation: shake 0.4s ease; }
@keyframes logoutFade { from{opacity:1;transform:scale(1)} to{opacity:0;transform:scale(0.98)} }
body.logout-animation { animation: logoutFade 0.38s ease forwards; }

/* Selectable text */
.feature-card p, .hero p, .cta-card p { -webkit-user-select: text; -moz-user-select: text; user-select: text; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .header { padding: 0 1rem; }
    .nav-links { display: none; }
    .hamburger-menu { display: flex; }
    .hero { padding: 3rem 1.25rem 2.5rem; }
    .hero h1 { font-size: 1.85rem; }
    .hero p { font-size: 0.95rem; }
    .hero-search { flex-direction: column; border-radius: var(--radius); padding: 0.4rem; }
    .hero-search input { padding: 0.7rem 1rem; }
    .hero-search button { width: 100%; justify-content: center; border-radius: var(--radius-sm); }
    .hero-stats { gap: 1.5rem; flex-wrap: wrap; }
    .hero-stat .number { font-size: 1.5rem; }
    .features-grid { grid-template-columns: 1fr; }
    .features-section, .cta-section { padding: 2.5rem 1.25rem; }
    .cta-card { padding: 2.5rem 1.5rem; }
    .cta-card h2 { font-size: 1.35rem; }
    .section-header h2 { font-size: 1.35rem; }
    
    /* Ensure Turnstile fits mobile screens perfectly */
    .auth-modal-content {
        width: 95%;
        padding: 2rem 1.25rem;
    }
}

/* Extra support for extremely narrow screens */
@media (max-width: 360px) {
    .auth-modal-content {
        padding: 1.75rem 1rem;
    }
    .cf-turnstile {
        transform: scale(0.9);
        transform-origin: center center;
        margin: 0.25rem 0;
    }
}