:root {
    --primary-color: #e50914; /* Premium Red */
    --primary-hover: #b9090b;
    --primary-light: rgba(229, 9, 20, 0.1);
    
    /* Light Mode */
    --bg-color: #ffffff;
    --bg-alt: #f8f9fa;
    --card-bg: #ffffff;
    --card-border: #eaeaea;
    --text-color: #111111;
    --text-muted: #666666;
    --border-color: #eaeaea;
    
    --navbar-bg: rgba(255, 255, 255, 0.95);
    --glass-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    --hover-shadow: 0 10px 30px rgba(229, 9, 20, 0.15);
}

[data-theme="dark"] {
    --bg-color: #000000;
    --bg-alt: #111111;
    --card-bg: #111111;
    --card-border: #333333;
    --text-color: #ffffff;
    --text-muted: #aaaaaa;
    --border-color: #333333;

    --navbar-bg: rgba(0, 0, 0, 0.9);
    --glass-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    --hover-shadow: 0 10px 30px rgba(229, 9, 20, 0.3);
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Glassmorphism Navbar */
.navbar {
    background: var(--navbar-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    box-shadow: var(--glass-shadow);
    padding: 1rem 0;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Allow navbar to use 90% of screen width so menu stays on one line */
.navbar .container {
    max-width: 90%;
    width: 90%;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-color);
    text-decoration: none;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo span {
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-item {
    position: static;
    display: flex;
    align-items: center;
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
    font-size: 0.95rem;
}

.nav-links a:hover,
.nav-link:hover {
    color: var(--primary-color);
}

.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.25rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background 0.3s;
}

.theme-toggle:hover {
    background: var(--border-color);
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-color);
    cursor: pointer;
}

@media (max-width: 768px) {
    .mobile-menu-btn { display: block; }
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--navbar-bg);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        flex-direction: column;
        padding: 1rem 0;
        border-bottom: 1px solid var(--border-color);
        gap: 0;
        max-height: 80vh;
        overflow-y: auto;
        z-index: 1001;
    }
    .nav-links.active { display: flex; }

    .nav-links .nav-link,
    .nav-links a {
        width: 100%;
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
        justify-content: space-between;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-links .nav-item {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .nav-links .btn-primary-cs {
        margin: 0.75rem 1.5rem;
        text-align: center;
        display: block;
    }

    .nav-links .theme-toggle {
        margin: 0.5rem 1.5rem;
    }
}

/* Buttons */
.btn-primary-cs {
    background-color: var(--primary-color);
    color: #ffffff !important;
    border: none;
    padding: 0.75rem 1.75rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 4px 10px rgba(229, 9, 20, 0.2);
}

.btn-primary-cs:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(229, 9, 20, 0.3);
}

.btn-outline {
    background: transparent;
    color: var(--text-color) !important;
    border: 1px solid var(--border-color);
    padding: 0.75rem 1.75rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-outline:hover {
    border-color: var(--text-color);
    background: var(--text-color);
    color: var(--bg-color) !important;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 6rem 0 4rem;
    background: radial-gradient(circle at top, var(--primary-light) 0%, transparent 50%);
    position: relative;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--text-color);
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 400;
}

.hero-search {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
    gap: 0.5rem;
    background: var(--card-bg);
    padding: 0.5rem;
    border-radius: 12px;
    box-shadow: var(--glass-shadow);
    border: 1px solid var(--border-color);
}

.hero-search input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    background: transparent;
    color: var(--text-color);
    font-size: 1rem;
    font-family: inherit;
    outline: none;
}

/* Section Headings */
.section-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    text-align: center;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 3rem;
}

/* Cards & Grids */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.category-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 4px;
    background: var(--primary-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
    transform-origin: left;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--hover-shadow);
    border-color: transparent;
}

.category-card:hover::before {
    transform: scaleX(1);
}

.cat-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.cat-name {
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.cat-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Popular Tools Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.tool-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.tool-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 15px var(--primary-light);
}

.tool-icon {
    width: 50px; height: 50px;
    background: var(--primary-light);
    color: var(--primary-color);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.tool-info h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.tool-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Counters Section */
.counters-section {
    background: var(--bg-alt);
    padding: 4rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.counters-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    text-align: center;
}

.counter-item h4 {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.counter-item p {
    font-weight: 600;
    color: var(--text-color);
}

@media (max-width: 768px) {
    .counters-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Testimonials */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.testimonial-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 2rem;
    border-radius: 12px;
}

.stars { color: #fbbf24; margin-bottom: 1rem; font-size: 1.25rem; }
.test-text { font-style: italic; margin-bottom: 1.5rem; color: var(--text-muted); }
.test-author { display: flex; align-items: center; gap: 1rem; }
.test-author img { width: 40px; height: 40px; border-radius: 50%; }
.test-author h5 { font-weight: 700; }

/* FAQ */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 1rem;
    background: var(--card-bg);
    overflow: hidden;
}

.faq-question {
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.faq-answer {
    padding: 0 1.5rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    color: var(--text-muted);
}

.faq-item.active .faq-answer {
    padding: 0 1.5rem 1.25rem;
    max-height: 300px;
}

.faq-icon {
    transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

/* Newsletter */
.newsletter-section {
    background: var(--primary-color);
    color: white;
    padding: 5rem 0;
    text-align: center;
    border-radius: 20px;
    margin: 4rem 1.5rem;
}

.newsletter-form {
    display: flex;
    max-width: 500px;
    margin: 2rem auto 0;
    gap: 0.5rem;
}

.newsletter-form input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-family: inherit;
}

.newsletter-form button {
    background: #111;
    color: white;
    border: none;
    padding: 0 2rem;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
}

.newsletter-form button:hover {
    background: #333;
}

/* Footer */
footer {
    background: var(--bg-alt);
    border-top: 1px solid var(--border-color);
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand p {
    color: var(--text-muted);
    margin-top: 1rem;
    max-width: 300px;
}

.footer-links h4 {
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
    .hero-search, .newsletter-form { flex-direction: column; }
    .newsletter-form button { padding: 1rem; }
}

/* AdSense Layout */
.adsense-slot {
    width: 100%;
    min-height: 90px;
    background: var(--bg-alt);
    border: 1px dashed var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    margin: 2rem 0;
    border-radius: 8px;
}

/* Utilities */
.text-center { text-align: center; }
.py-5 { padding: 4rem 0; }
.my-5 { margin-top: 4rem; margin-bottom: 4rem; }
.mt-2 { margin-top: 1rem; }
.mb-2 { margin-bottom: 1rem; }