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

:root {
    --brand-dark: #0f172a;
    --brand-primary: #6366f1;
    --brand-gradient: linear-gradient(135deg, #6366f1 0%, #4f46e5 50%, #4338ca 100%);
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    
    --accent-red: #f43f5e;
    --accent-red-hover: #e11d48;
    --accent-green: #10b981;
    --accent-green-hover: #059669;
    --accent-purple: #8b5cf6;

    --shadow-soft: 0 10px 25px -5px rgba(99, 102, 241, 0.08), 0 8px 10px -6px rgba(99, 102, 241, 0.04);
    --shadow-hover: 0 20px 35px -5px rgba(99, 102, 241, 0.18);
    --radius-lg: 24px;
    --radius-md: 12px;

    /* Graph paper theme colors */
    --gp-blue: #1d4ed8;
    --gp-blue-dark: #1e40af;
    --gp-navy: #0b2447;
    --gp-text: #475b7a;
    --gp-card-border: #d6e0f2;
}

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

body { 
    background-color: #ffffff; 
    color: var(--text-main); 
    padding-bottom: 0;
}

/* Header Section with Smooth Slide Down */
.main-header { 
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    padding: 14px 0; 
    position: sticky; 
    top: 0; 
    z-index: 100; 
    animation: slideDown 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.header-container { 
    max-width: 950px; 
    margin: 0 auto; 
    padding: 0 20px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    gap: 12px;
}

.brand-logo { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    font-size: 1.4rem; 
    font-weight: 800; 
    background: linear-gradient(135deg, #4f46e5, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: transform 0.3s ease;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}

.brand-logo:hover {
    transform: scale(1.03);
}

.brand-logo i { 
    background: linear-gradient(135deg, #4f46e5, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.6rem;
    animation: floatIcon 3s ease-in-out infinite;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* Animated Header Buttons */
.head-btn { 
    background: var(--brand-gradient);
    color: white; 
    border: none; 
    padding: 9px 18px; 
    border-radius: 30px; 
    font-weight: 700; 
    font-size: 0.8rem;
    cursor: pointer; 
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
    box-shadow: 0 6px 18px rgba(99, 102, 241, 0.25);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
    text-decoration: none;
}

.head-btn.head-btn-secondary {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.25);
}

.head-btn:hover { 
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 10px 22px rgba(99, 102, 241, 0.35);
}

.head-btn:active {
    transform: translateY(0) scale(1);
}

/* Container */
.container { 
    max-width: 950px; 
    margin: 30px auto; 
    padding: 0 20px; 
}

/* Hero Section with Fade In & Moving Gradient */
.hero-section { 
    text-align: center; 
    margin-bottom: 30px; 
    animation: fadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-section h1 { 
    font-size: 2.7rem; 
    font-weight: 800; 
    letter-spacing: -1px;
    margin-bottom: 12px; 
    color: var(--gp-navy);
    display: inline-block;
}

.hero-section p { 
    font-size: 1rem; 
    color: var(--gp-text); 
    max-width: 650px; 
    margin: 0 auto; 
    line-height: 1.6; 
}

/* Announcement Banner with Pulse Glow */
.announcement-banner { 
    background: #fef9c3;
    color: var(--gp-navy); 
    padding: 28px; 
    border-radius: 10px; 
    text-align: center; 
    margin-bottom: 40px; 
    box-shadow: 0 14px 30px rgba(180, 140, 0, 0.15);
    border: 1px solid #fde68a;
    position: relative;
    animation: fadeIn 1s ease;
}

.announcement-banner h3 { 
    font-size: 1.1rem; 
    font-weight: 600; 
    margin-bottom: 18px; 
}

.banner-buttons { 
    display: flex; 
    gap: 14px; 
    justify-content: center; 
    flex-wrap: wrap; 
}

.banner-btn { 
    text-decoration: none; 
    padding: 11px 22px; 
    border-radius: 30px; 
    font-size: 0.82rem; 
    font-weight: 700; 
    display: inline-flex; 
    align-items: center; 
    gap: 8px; 
    position: relative; 
    color: white; 
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-green { 
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
}

.btn-green:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.5);
}

.btn-accent { 
    background: var(--gp-blue); 
    border: none;
}

.btn-accent:hover {
    background: var(--gp-blue-dark);
    transform: translateY(-3px) scale(1.03);
}

.badge-new { 
    background: var(--accent-red); 
    color: white; 
    font-size: 0.6rem; 
    padding: 3px 7px; 
    border-radius: 10px; 
    position: absolute; 
    top: -6px; 
    right: -4px; 
    font-weight: 800;
    animation: pulseBadge 2s infinite;
}

/* Category Tabs - Graph Paper Cards */
.category-tabs { 
    display: flex; 
    gap: 14px; 
    margin-bottom: 28px; 
    flex-wrap: wrap; 
}

.tab-btn { 
    flex: 1; 
    min-width: 150px; 
    padding: 9px 12px; 
    border: 1px solid var(--gp-card-border); 
    background: #ffffff; 
    border-radius: 10px; 
    font-weight: 700; 
    cursor: pointer; 
    color: var(--gp-navy); 
    font-size: 0.8rem; 
    line-height: 1.25;
    text-align: left;
    display: flex; 
    align-items: center; 
    justify-content: flex-start; 
    gap: 8px; 
    box-shadow: 0 3px 8px rgba(30, 41, 59, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Colored icon squares */
.tab-btn i {
    width: 28px;
    height: 28px;
    flex: none;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}
.tab-btn:nth-child(1) i { background: #dbeafe; color: #1d4ed8; }
.tab-btn:nth-child(2) i { background: #fce7f3; color: #db2777; }
.tab-btn:nth-child(3) i { background: #dcfce7; color: #16a34a; }
.tab-btn:nth-child(4) i { background: #fef3c7; color: #d97706; }

.tab-btn:hover {
    border-color: var(--gp-blue);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(29, 78, 216, 0.15);
}

.tab-btn.active { 
    background: var(--gp-blue); 
    color: white; 
    border-color: var(--gp-blue); 
    box-shadow: 0 8px 18px rgba(29, 78, 216, 0.3);
}
.tab-btn.active i { background: rgba(255, 255, 255, 0.22); color: #ffffff; }

.highlight-tab { 
    border: 2px dashed var(--gp-blue); 
    color: var(--gp-blue); 
    background: #eff6ff;
    box-shadow: none;
}
.tab-btn.highlight-tab i { background: #ffffff; color: var(--gp-blue); }

/* Sub-Category Tabs Styling */
.sub-category-tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 0 auto 24px auto;
    width: fit-content;
    max-width: 100%;
    background: #ffffff;
    padding: 6px;
    border-radius: 999px;
    border: 1px solid #e3e9f4;
    box-shadow: 0 4px 12px rgba(30, 41, 59, 0.06);
    flex-wrap: wrap;
}

.sub-tab-btn {
    padding: 8px 18px;
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: 999px;
    border: none;
    background: transparent;
    color: var(--gp-navy);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.sub-tab-btn:hover {
    background: #eff6ff;
}

.sub-tab-btn.active {
    background: var(--gp-blue);
    color: #ffffff;
    box-shadow: 0 6px 14px rgba(29, 78, 216, 0.33);
}

/* Extension Button Styling */
.btn-extension {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #ffffff;
}

.btn-extension:hover {
    background: linear-gradient(135deg, #d97706, #b45309);
    transform: translateY(-2px);
}

/* Search Bar */
.search-bar-wrapper { 
    display: flex; 
    gap: 12px; 
    margin-bottom: 30px; 
}

.search-box { 
    position: relative; 
    flex: 1; 
}

.search-box input { 
    width: 100%; 
    padding: 14px 18px 14px 48px; 
    border-radius: var(--radius-md); 
    border: 1px solid var(--border-color); 
    outline: none; 
    font-size: 0.92rem; 
    background: white;
    box-shadow: var(--shadow-soft);
    transition: all 0.3s ease;
}

.search-box input:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
}

.search-icon { 
    position: absolute; 
    left: 18px; 
    top: 50%; 
    transform: translateY(-50%); 
    color: var(--text-muted); 
}

.refresh-btn { 
    background: white; 
    color: var(--text-main); 
    border: 1px solid var(--border-color); 
    padding: 0 22px; 
    border-radius: var(--radius-md); 
    font-weight: 600; 
    cursor: pointer; 
    display: flex; 
    align-items: center; 
    gap: 8px; 
    box-shadow: var(--shadow-soft);
    transition: all 0.3s ease;
}

.refresh-btn:hover {
    background: #f1f5f9;
    border-color: var(--brand-primary);
    color: var(--brand-primary);
    transform: translateY(-2px);
}

/* Cards Animation */
.card { 
    background: var(--card-bg); 
    border: 1px solid var(--border-color); 
    border-left: 5px solid var(--gp-blue);
    border-radius: var(--radius-md); 
    padding: 24px; 
    margin-bottom: 20px; 
    box-shadow: var(--shadow-soft);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeIn 0.5s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(99, 102, 241, 0.3);
}

.badge-code { 
    background: rgba(99, 102, 241, 0.08); 
    color: #4f46e5; 
    border: 1px solid rgba(99, 102, 241, 0.2); 
    font-weight: 800; 
    padding: 6px 14px; 
    border-radius: 10px; 
    font-size: 0.85rem; 
}

.card-desc { 
    font-size: 0.95rem; 
    color: #334155; 
    line-height: 1.7; 
    white-space: pre-line; 
    background: #f8fafc; 
    padding: 16px; 
    border-radius: 12px; 
    border: 1px solid #f1f5f9; 
    margin-top: 14px;
}

/* Modal Popup Overlay */
.modal { 
    display: none; 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(15, 23, 42, 0.7); 
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000; 
    align-items: center; 
    justify-content: center; 
    padding: 16px;
}

.modal.show { 
    display: flex !important; 
    animation: fadeIn 0.3s ease;
}

.modal-content { 
    background: #ffffff; 
    width: 100%; 
    max-width: 480px; 
    margin: auto;
    padding: 20px 24px; 
    border-radius: 24px; 
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.35);
    overflow: visible; 
    border: 1px solid rgba(255, 255, 255, 0.9);
    position: relative;
    animation: zoomIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 12px; 
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.modal-header h3 {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--brand-dark);
}

.close-btn { 
    background: #f1f5f9;
    color: var(--accent-red);
    border: 1px solid #fee2e2;
    padding: 5px 14px;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer; 
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover { 
    background: var(--accent-red);
    color: white;
    border-color: var(--accent-red);
    transform: translateY(-1px);
}

/* Compact Form Fields */
.form-group { 
    margin-bottom: 10px; 
}

.form-group label { 
    display: block; 
    font-size: 0.78rem; 
    font-weight: 700; 
    margin-bottom: 4px; 
    color: var(--brand-dark); 
}

.form-row { 
    display: flex; 
    gap: 10px; 
}

.form-row .form-group { 
    flex: 1; 
}

.form-control { 
    width: 100%; 
    padding: 8px 12px; 
    border: 1px solid var(--border-color); 
    border-radius: 10px; 
    outline: none; 
    font-size: 0.85rem; 
    background: #fbfcfd;
    color: var(--text-main);
    transition: all 0.3s ease;
}

textarea.form-control {
    resize: none;
    height: 75px; 
}

.form-control:focus {
    border-color: var(--brand-primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.btn-submit { 
    width: 100%; 
    background: var(--brand-gradient); 
    color: white; 
    border: none; 
    padding: 10px; 
    border-radius: 10px; 
    font-weight: 700; 
    font-size: 0.88rem;
    cursor: pointer; 
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
    box-shadow: 0 6px 15px rgba(99, 102, 241, 0.3);
    margin-top: 4px;
    position: relative;
    overflow: hidden;
}

.btn-submit::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transition: 0.5s;
}

.btn-submit:hover::after {
    left: 100%;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.4);
}

/* Floating WhatsApp Button */
.whatsapp-float {
    position: fixed;
    bottom: 25px;
    left: 25px;
    width: 58px;
    height: 58px;
    background-color: #25d366;
    color: #fff;
    border-radius: 50%;
    text-align: center;
    font-size: 30px;
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: bounceFloat 3s ease-in-out infinite;
}

.whatsapp-float:hover {
    background-color: #128c7e;
    transform: scale(1.15) rotate(10deg);
    box-shadow: 0 12px 30px rgba(37, 211, 102, 0.6);
    color: #fff;
}

.whatsapp-review-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background-color: #25d366;
    color: #ffffff;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}

.whatsapp-review-btn:hover {
    background-color: #22bf5b;
    color: #ffffff;
}

/* Keyframes */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-15px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes zoomIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes floatIcon {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

@keyframes bounceFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes pulseBadge {
    0% { transform: scale(1); }
    50% { transform: scale(1.12); }
    100% { transform: scale(1); }
}

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

@keyframes floatText {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}

/* ==========================================================================
   STRICT MOBILE RESPONSIVE FIX FOR HEADER BUTTONS
   ========================================================================== */
@media (max-width: 650px) {
    .main-header {
        padding: 10px 0;
    }

    .header-container {
        flex-direction: column !important;
        align-items: center !important;
        gap: 10px !important;
        padding: 0 12px !important;
    }

    .brand-logo {
        font-size: 1.2rem;
        gap: 6px;
    }

    .brand-logo i {
        font-size: 1.3rem;
    }

    .header-actions {
        width: 100% !important;
        display: flex !important;
        justify-content: center !important;
        gap: 8px !important;
    }

    .head-btn {
        flex: 1 !important;
        padding: 7px 8px !important;
        font-size: 0.72rem !important;
        border-radius: 20px !important;
        justify-content: center !important;
        text-align: center !important;
        white-space: normal !important;
        line-height: 1.2 !important;
    }
}
 /* Unique AI Highlight Header Button Animation */
        .ai-highlight-btn {
            background: linear-gradient(135deg, #059669 0%, #10b981 50%, #06b6d4 100%) !important;
            color: #ffffff !important;
            font-weight: 800 !important;
            border-radius: 30px !important;
            padding: 9px 18px !important;
            position: relative !important;
            box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4) !important;
            animation: aiPulseGlow 2.5s infinite alternate !important;
            text-decoration: none !important;
            display: inline-flex !important;
            align-items: center !important;
            gap: 6px !important;
        }
        .ai-highlight-btn:hover {
            transform: translateY(-2px) scale(1.04);
            box-shadow: 0 6px 20px rgba(16, 185, 129, 0.6) !important;
        }
        .btn-badge-ai {
            background: #f43f5e;
            color: white;
            font-size: 0.58rem;
            padding: 2px 6px;
            border-radius: 8px;
            font-weight: 800;
            margin-left: 4px;
            animation: pulseBadge 1.5s infinite;
        }
        @keyframes aiPulseGlow {
            0% { box-shadow: 0 0 8px rgba(16, 185, 129, 0.4); }
            100% { box-shadow: 0 0 20px rgba(6, 182, 212, 0.8); }
        }

        /* Welcome Popup Modal Styling */
        .welcome-popup-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(15, 23, 42, 0.75);
            backdrop-filter: blur(8px);
            z-index: 2000;
            align-items: center;
            justify-content: center;
            padding: 16px;
        }
        .welcome-popup-content {
            background: #ffffff;
            width: 100%;
            max-width: 440px;
            padding: 30px 24px;
            border-radius: 24px;
            text-align: center;
            box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.4);
            position: relative;
            animation: zoomIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
        }

/* ==========================================================================
   FOOTER (Disclaimer / Terms / Privacy)
   ========================================================================== */
.site-footer {
    margin-top: 50px;
    padding: 36px 20px 22px;
    background: #f5f8ff;
    border-top: 1px solid var(--gp-card-border);
}

.footer-inner {
    max-width: 950px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.footer-col h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--gp-navy);
    margin-bottom: 10px;
}

.footer-col h4 i {
    color: var(--gp-blue);
}

.footer-col p {
    font-size: 0.82rem;
    line-height: 1.7;
    color: var(--gp-text);
}

.footer-note {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px dashed var(--gp-card-border);
    font-size: 0.82rem;
    line-height: 1.6;
    color: var(--gp-text);
    text-align: center;
}

.footer-note a {
    color: var(--gp-blue);
    font-weight: 700;
    text-decoration: none;
}

.footer-note a:hover {
    text-decoration: underline;
}

.footer-bottom {
    margin-top: 14px;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
}

@media (max-width: 800px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 22px;
    }
}