:root {
    --primary: #22c55e;
    /* Green 500 */
    --primary-dark: #15803d;
    --secondary: #ec4899;
    /* Pink 500 */
    --accent: #8b5cf6;
    /* Violet 500 */
    --background: #0f172a;
    /* Slate 900 */
    --surface: #1e293b;
    /* Slate 800 */
    --text: #f8fafc;
    /* Slate 50 */
    --text-muted: #94a3b8;
    /* Slate 400 */
    --border: #334155;
    /* Slate 700 */

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Outfit', sans-serif;

    --container-width: 1200px;
    --header-height: 80px;
    --radius-md: 12px;
    --radius-lg: 24px;

    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.15);
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    background-color: var(--background);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: #fff;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
}

p {
    margin-bottom: 1rem;
    color: var(--text-muted);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.text-center {
    text-align: center;
}

/* Available to screen readers only, for live regions such as #copy-status */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.section {
    padding: 5rem 0;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--primary);
    /* Page background as text: 7.8:1 on green (white was 2.3:1, below WCAG AA) */
    color: var(--background);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-family: inherit;
    border: none;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    font-size: 1rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
}

/* Visible keyboard focus: green ring set off from the green button by a gap */
.btn-primary:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--secondary);
    /* Page background as text: 5.1:1 on pink (white was 3.5:1, below WCAG AA) */
    color: var(--background);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-family: inherit;
    border: none;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    font-size: 1rem;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(236, 72, 153, 0.3);
}

.btn-secondary:focus-visible {
    outline: 2px solid var(--secondary);
    outline-offset: 3px;
}

/* Header */
.header {
    height: var(--header-height);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.5rem;
    color: white;
}

.logo-icon {
    color: var(--primary);
}

.nav-list {
    display: flex;
    gap: 2rem;
}

.nav-list a {
    color: var(--text-muted);
    font-weight: 500;
}

.nav-list a:hover {
    color: white;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: white;
    border-radius: 2px;
}

/* Hero Section */
.hero {
    position: relative;
    padding-top: calc(var(--header-height) + 4rem);
    padding-bottom: 5rem;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-bg {
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 1000px;
    height: 1000px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, rgba(15, 23, 42, 0) 70%);
    z-index: -1;
    border-radius: 50%;
    filter: blur(60px);
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 3rem;
}

.hero-text {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 100px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

/* Hero reads as two lines: the brand name, then the keyword phrase under it.
   --text-muted is 6.96:1 on --background, so it clears WCAG AA. */
.hero-text h1 {
    margin-bottom: 0.25rem;
}

.hero-subheading {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.subtitle {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
}

/* Search Box */
.hero-image-mockup {
    width: 100%;
    display: flex;
    justify-content: center;
}

.search-box-wrapper {
    margin-top: 2rem;
}

.input-group {
    display: flex;
    gap: 0.5rem;
    background: rgba(30, 41, 59, 0.5);
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    backdrop-filter: blur(10px);
    transition: border-color 0.3s;
}

.input-group:focus-within {
    border-color: var(--primary);
}

#keyword-input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 0 1rem;
    color: white;
    font-size: 1.1rem;
    font-family: inherit;
    outline: none;
}

.search-stats {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.check-icon {
    color: var(--primary);
    margin-right: 0.25rem;
    font-weight: bold;
}

/* Tool page: label over the results table. The h1 carries the target keyword, so this
   stays smaller and left-aligned rather than competing with it. */
.results-heading {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* Results pagination. Status on the left, controls on the right, stacking on narrow screens.
   Uses the same surface, border and select as the filters above the table. */
.pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.pagination-range {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.pagination-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.pagination-controls label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* The filter selects above the table are full size; this one sits in a compact control row */
.pagination-controls .form-select {
    padding: 0.3125rem 2.25rem 0.3125rem 0.625rem;
    font-size: 0.875rem;
    background-position: right 0.5rem center;
}

.pagination-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination-btn {
    position: relative;
    min-height: 32px;
    padding: 0.25rem 0.75rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text);
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease;
}

/* Visually compact, but the hit area stays 44px tall for touch, the same approach as
   .kw-google in the results table. Nothing is drawn, so the visible size is unaffected.
   Only the height is extended: a wider hit area would overlap the next button, and the
   32px visible width already clears the 24px WCAG 2.5.8 minimum. */
.pagination-btn::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 100%;
    min-height: 44px;
}

.pagination-btn:hover:not(:disabled) {
    border-color: var(--primary);
    color: white;
}

.pagination-btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.pagination-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.pagination-pages {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Numbered buttons are square rather than wide, so a row of them reads as one control */
.pagination-page-btn {
    min-width: 32px;
    padding: 0.25rem 0.375rem;
    font-variant-numeric: tabular-nums;
    color: var(--text-muted);
}

/* Current page: page background on green, the same contrast rule the other buttons follow */
.pagination-page-btn[aria-current="page"] {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--background);
    font-weight: 600;
}

.pagination-ellipsis {
    padding: 0 0.25rem;
    color: var(--text-muted);
    user-select: none;
}

@media (max-width: 640px) {
    .pagination {
        justify-content: center;
        text-align: center;
    }

    .pagination-controls {
        justify-content: center;
        width: 100%;
    }
}

/* Form Controls (Report Page) */
.form-control {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    padding: 0.5rem 1rem;
    color: white;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary);
}

.form-select {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 0.5rem 1rem;
    color: white;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.5rem;
}

.form-select:focus {
    border-color: var(--primary);
}

.form-select option {
    background-color: var(--surface);
    color: white;
}

/* Mockup & Report Styles */
.mockup-glass {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    padding: 1rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: perspective(1000px) rotateX(2deg) rotateY(-2deg) rotateZ(-1deg);
    transition: transform 0.3s ease;
    margin-top: 2rem;
    width: 100%;
    max-width: 100%;
}

.mockup-glass:hover {
    transform: perspective(1000px) rotateX(0) rotateY(0) rotateZ(0);
}

/* SimpleBar Custom Scrollbar Styling */
.simplebar-scrollbar::before {
    background-color: #22c55e !important;
    border-radius: 4px;
}

.simplebar-track.simplebar-horizontal {
    background: rgba(30, 41, 59, 0.8);
    border-radius: 4px;
    height: 10px;
}

.simplebar-track.simplebar-horizontal .simplebar-scrollbar {
    height: 8px;
    top: 1px;
}

.mockup-header {
    display: flex;
    gap: 8px;
    margin-bottom: 1.5rem;
    padding-left: 0.5rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red {
    background: #ff5f56;
}

.dot.yellow {
    background: #ffbd2e;
}

.dot.green {
    background: #27c93f;
}

.mockup-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    gap: 1rem;
    padding: 0.6rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    align-items: center;
    font-size: 14px;
    font-weight: normal;
}

.header-row {
    font-weight: 500;
    color: var(--text-muted);
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Sorting Styles */
.col.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    transition: color 0.2s;
}

.col.sortable:hover {
    color: var(--text-light);
}

.sort-icon::after {
    content: '↕';
    display: inline-block;
    margin-left: 5px;
    opacity: 0.3;
    font-size: 0.8rem;
}

.col.sortable.asc .sort-icon::after {
    content: '↑';
    opacity: 1;
    color: #4ade80;
}

.col.sortable.desc .sort-icon::after {
    content: '↓';
    opacity: 1;
    color: #4ade80;
}

/* Keyword cell: keyword text followed by a "Search on Google" link icon */
.kw-cell {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.kw-google {
    position: relative;
    flex: none;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    color: var(--text-muted);
    transition: color 0.15s;
}

/* Icon drawn by CSS (one definition for ~850 rows instead of repeating SVG markup) */
.kw-google::before {
    content: '';
    width: 14px;
    height: 14px;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 3h6v6'/%3E%3Cpath d='M10 14 21 3'/%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 3h6v6'/%3E%3Cpath d='M10 14 21 3'/%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Invisible 44x44 touch area around the 24px link, without making rows taller */
.kw-google::after {
    content: '';
    position: absolute;
    inset: -10px;
}

/* Row hover brightens the icon; hovering or focusing the link itself turns it green */
.result-row:hover .kw-google {
    color: var(--text);
}

.result-row .kw-google:hover,
.result-row .kw-google:focus-visible {
    color: var(--primary);
}

.kw-google:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Copy button sits next to the Google link and shares its sizing, hover and touch-area rules.
   It holds no text on purpose: table sorting reads the cell's textContent. */
.kw-copy {
    position: relative;
    flex: none;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: none;
    border: none;
    border-radius: 4px;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.15s;
}

.kw-copy::before {
    content: '';
    width: 14px;
    height: 14px;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='9' width='13' height='13' rx='2'/%3E%3Cpath d='M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='9' width='13' height='13' rx='2'/%3E%3Cpath d='M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Invisible 44x44 touch area around the 24px button, without making rows taller */
.kw-copy::after {
    content: '';
    position: absolute;
    inset: -10px;
}

.result-row:hover .kw-copy {
    color: var(--text);
}

.result-row .kw-copy:hover,
.result-row .kw-copy:focus-visible {
    color: var(--primary);
}

.kw-copy:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Confirmed state: the clipboard icon becomes a tick for a moment */
.kw-copy.copied,
.result-row:hover .kw-copy.copied {
    color: var(--primary);
}

.kw-copy.copied::before {
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
}

@media (prefers-reduced-motion: reduce) {

    .kw-google,
    .kw-copy {
        transition: none;
    }
}

.animate-row {
    opacity: 0;
    animation: slideUpFade 0.5s forwards;
}

.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

.delay-3 {
    animation-delay: 0.6s;
}

.tag {
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.tag.green {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

.tag.yellow {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

.tag.red {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

/* Features */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    background: var(--surface);
    padding: 2rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    transition: transform 0.3s, border-color 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.icon-box {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: white;
}

.icon-box.purple {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
}

.icon-box.blue {
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
}

.icon-box.pink {
    background: linear-gradient(135deg, #ec4899, #f43f5e);
}

.icon-box.orange {
    background: linear-gradient(135deg, #f97316, #f59e0b);
}

/* How It Works */
.steps-wrapper {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.step-item {
    flex: 1;
    min-width: 250px;
    position: relative;
    padding: 2rem;
    background: rgba(30, 41, 59, 0.3);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.step-number {
    font-size: 4rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.05);
    position: absolute;
    top: 0;
    right: 1rem;
    line-height: 1;
}

/* FAQ */
.faq-container {
    max-width: 800px;
    margin: 3rem auto 0;
}

.faq-item {
    border-bottom: 1px solid var(--border);
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    background: none;
    border: none;
    color: white;
    font-size: 1.1rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    text-align: left;
}

.faq-answer {
    max-height: none;
    overflow: visible;
    transition: max-height 0.3s ease;
}

.faq-answer p {
    padding-bottom: 1.5rem;
}

.faq-item.active .faq-answer {
    max-height: 200px;
}

.faq-item.active .icon {
    transform: rotate(45deg);
}

/* Footer */
.footer {
    background: #020617;
    padding: 0.5rem 0;
    border-top: 1px solid var(--border);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-links h4 {
    margin-bottom: 1.5rem;
    color: white;
}

.footer-links ul li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--text-muted);
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Keyframes */
@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 1024px) {
    h1 {
        font-size: 3rem;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        width: 100%;
        max-width: 100%;
        padding: 0 1rem;
        /* Extra safety padding */
    }

    .hero-text {
        margin: 0 auto;
        width: 100%;
        max-width: 100%;
    }

    /* Responsive Adjustments */
    .mockup-glass {
        display: block;
        /* Ensure it's visible on tablet/mobile if user wants */
        transform: none;
        margin-top: 3rem;
    }

    /* Hide 3D mockup on tablets for simplicity or adjust */
    .mockup-glass {
        margin-top: 3rem;
        transform: none;
        /* Reset transform for mobile */
        display: block;
    }
}

@media (max-width: 768px) {
    .nav {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    .nav.active {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--surface);
        padding: 2rem;
        border-bottom: 1px solid var(--border);
    }

    .nav-list {
        flex-direction: column;
        align-items: center;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    h1 {
        font-size: 2.5rem;
    }

    .hero-subheading {
        font-size: 1.25rem;
    }

    /* Mobile Table Fixes */
    .hero-image-mockup {
        display: block;
        width: 100%;
        max-width: 100%;
    }

    /* Mobile Table Fixes */
    .mockup-glass {
        width: 100%;
        min-width: 0;
        /* Critical for Flexbox children to shrink */
        display: block;
        /* Removes flex item behavior if parent is flex, or just ensures block context */
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin-left: 0;
        margin-right: 0;
        transform: none;
        /* CRITICAL: Remove 3D transform which causes overflow */
    }

    .mockup-row {
        min-width: 700px;
        /* Ensure columns don't collapse */
    }

    .section {
        padding: 3rem 0;
    }

    .container {
        padding: 0 1.5rem;
    }

    /* Search Stats Fix */
    .search-stats {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.75rem;
    }

    /* Input Group Stack */
    .input-group {
        flex-direction: column;
    }

    .input-group button {
        width: 100%;
        margin-top: 0.5rem;
    }
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    animation: fadeIn 0.3s forwards;
}

.modal-content {
    background: var(--surface);
    width: 90%;
    max-width: 500px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: scale(0.95);
    animation: scaleUp 0.3s forwards;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
}

.modal-header h2 {
    margin: 0;
    color: white;
    font-size: 1.25rem;
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s;
}

/* Reviews Section */
.reviews.bg-light {
    background-color: var(--surface);
    /* Using surface color (slate-800) to blend with dark theme default */
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.review-card {
    background: rgba(30, 41, 59, 0.5);
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid var(--border);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.review-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.stars {
    color: #fbbf24;
    letter-spacing: 2px;
}

.review-date {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.review-text {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-body);
    margin-bottom: 1.5rem;
    font-style: italic;
}

.reviewer {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.reviewer-avatar {
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: var(--background);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.reviewer-info {
    display: flex;
    flex-direction: column;
}

.reviewer-info .name {
    font-weight: 600;
    color: white;
    font-size: 0.95rem;
}

.reviewer-info .role {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.close-btn:hover {
    color: white;
}

.trend-table {
    width: 100%;
    border-collapse: collapse;
}

.trend-table th,
.trend-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
}

.trend-table th {
    font-weight: 600;
    color: white;
}

.trend-table tr:last-child td {
    border-bottom: none;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

@keyframes scaleUp {
    to {
        transform: scale(1);
    }
}

.btn-glass {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-family: inherit;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(5px);
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}