/* =============================================
   OfferGo - 轻松学算法
   ============================================= */

/* CSS Variables */
:root {
    /* 主色调 */
    --primary-hue: 217;
    --primary: hsl(var(--primary-hue), 91%, 60%);
    --primary-dark: hsl(var(--primary-hue), 91%, 50%);
    --primary-light: hsl(var(--primary-hue), 91%, 75%);
    --primary-glow: hsla(var(--primary-hue), 91%, 60%, 0.12);

    /* 强调色 */
    --accent-hue: 199;
    --accent: hsl(var(--accent-hue), 89%, 48%);
    --accent-dark: hsl(var(--accent-hue), 89%, 38%);

    /* 难度颜色 */
    --easy: #00b8a3;
    --medium: #ffc01e;
    --hard: #ff375f;

    /* 背景与前景 */
    --bg-primary: #0e0e14;
    --bg-secondary: #151520;
    --bg-tertiary: #1c1c28;
    --bg-card: rgba(28, 28, 40, 0.6);
    --bg-card-hover: rgba(35, 35, 52, 0.75);

    /* 文字 */
    --text-primary: #f0f0f5;
    --text-secondary: #a0a0b0;
    --text-muted: #606070;

    /* 边框 */
    --border-color: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);

    /* 间距 */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;

    /* 圆角 */
    --radius-sm: 6px;
    --navbar-height: 70px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-card: 16px;

    /* 阴影 — 复合阴影：紧贴+扩散 */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2), 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.15), 0 8px 24px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.15), 0 16px 48px rgba(0, 0, 0, 0.25);
    --shadow-glow: 0 0 60px var(--primary-glow);

    /* 过渡 */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
    --transition-spring: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);

    /* 字体 */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'Fira Code', 'SF Mono', monospace;
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

img {
    max-width: 100%;
    height: auto;
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

/* Section */
.section {
    padding: 6rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

h1, h2 {
    letter-spacing: -0.025em;
}

.section-title {
    font-size: clamp(1.75rem, 3.5vw, 2.75rem);
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    background: linear-gradient(135deg, var(--text-primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* =============================================
   Navbar
   ============================================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 10, 15, 0.7);
    backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border-color);
    transition: background var(--transition-base);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-md) var(--spacing-lg);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 1.25rem;
    font-weight: 700;
}

.logo-icon {
    width: 32px;
    height: 32px;
}

.logo-text {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: var(--spacing-xl);
    list-style: none;
}

.nav-link {
    font-weight: 500;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--text-primary);
    transition: width var(--transition-base);
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link:hover::after {
    width: 100%;
}

/* ===== Nav Dropdown (Zero 系列) ===== */
.nav-dropdown {
    position: relative;
    list-style: none;
}

.nav-dropdown-trigger {
    all: unset;
    cursor: pointer;
    color: #818cf8;
    font-size: 0.9rem;
    font-family: inherit;
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid rgba(129, 140, 248, 0.3);
    border-radius: var(--radius-md);
    transition: color 0.15s, background 0.15s, border-color 0.15s;
}

.nav-dropdown-trigger:hover {
    color: var(--text);
    background: rgba(129, 140, 248, 0.08);
    border-color: rgba(129, 140, 248, 0.5);
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 200px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 6px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 0.18s, visibility 0.18s, transform 0.18s;
    z-index: 200;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-menu a {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    color: var(--text) !important;
    font-size: 0.82rem;
    font-weight: 500;
    transition: background 0.12s;
}

.nav-dropdown-menu a:hover {
    background: rgba(99, 102, 241, 0.1);
    color: #818cf8 !important;
}

.nav-dropdown-menu a span {
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--text-muted);
    margin-left: auto;
}

.nav-link-external {
    padding: var(--spacing-sm) var(--spacing-md);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: var(--radius-md);
    color: white !important;
}

.nav-link-external::after {
    display: none;
}

.nav-link-external:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--spacing-sm);
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition-fast);
}

/* =============================================
   Hero Section
   ============================================= */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px var(--spacing-lg) var(--spacing-3xl);
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, hsla(var(--primary-hue), 100%, 60%, 0.08), transparent),
        radial-gradient(ellipse 60% 40% at 80% 60%, hsla(var(--accent-hue), 100%, 50%, 0.05), transparent);
    pointer-events: none;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    z-index: 1;
}

.hero-badge {
    display: inline-block;
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
}

.hero-title {
    font-size: clamp(2.75rem, 7vw, 4.5rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: var(--spacing-lg);
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: var(--spacing-xl);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: var(--spacing-2xl);
    margin-bottom: var(--spacing-xl);
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: none;
    transition-duration: 0.1s;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.18);
    transform: translateY(-2px);
}

.btn-secondary:active {
    transform: translateY(0);
    transition-duration: 0.1s;
}

/* Hero Code Block */
.hero-decoration {
    position: absolute;
    right: -100px;
    top: 50%;
    transform: translateY(-50%) rotate(-5deg);
    opacity: 0.6;
    pointer-events: none;
}

.code-block {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    width: 400px;
}

.code-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red {
    background: #ff5f56;
}

.dot.yellow {
    background: #ffbd2e;
}

.dot.green {
    background: #27c93f;
}

.filename {
    margin-left: auto;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.code-content {
    padding: var(--spacing-md);
    font-family: var(--font-mono);
    font-size: 0.875rem;
    line-height: 1.8;
    overflow-x: auto;
}

.code-content .keyword {
    color: #c678dd;
}

.code-content .function {
    color: #61afef;
}

.code-content .comment {
    color: #5c6370;
    font-style: italic;
}

/* =============================================
   Roadmap Section
   ============================================= */
.roadmap {
    background: var(--bg-secondary);
}

.roadmap-timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.roadmap-timeline::before {
    content: '';
    position: absolute;
    left: 28px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(to bottom,
        hsla(217, 91%, 60%, 0.2),
        hsla(199, 89%, 48%, 0.2));
}

.roadmap-item {
    display: flex;
    gap: 2rem;
    margin-bottom: var(--spacing-xl);
    position: relative;
    padding-left: 3rem;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.roadmap-icon {
    width: 56px;
    height: 56px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    box-shadow: var(--shadow-sm);
}

.roadmap-content {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid transparent;
    border-radius: var(--radius-card);
    padding: var(--spacing-lg);
    transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.roadmap-content:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(6px);
}

.roadmap-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
}

.stage-badge {
    padding: var(--spacing-xs) var(--spacing-sm);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.duration {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.roadmap-content h3 {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-sm);
}

.roadmap-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: var(--spacing-md);
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
}

.tag {
    padding: var(--spacing-xs) var(--spacing-sm);
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.roadmap-cta {
    display: inline-block;
    margin-top: var(--spacing-md);
    padding: var(--spacing-xs) 0;
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 600;
    transition: all var(--transition-fast);
}

.roadmap-item:hover .roadmap-cta {
    transform: translateX(4px);
}

/* =============================================
   Modules Section
   ============================================= */
.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-lg);
}

.module-card {
    background: var(--bg-card);
    border: 1px solid transparent;
    border-radius: var(--radius-card);
    padding: var(--spacing-xl);
    text-align: center;
    transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
}

.module-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
}

.module-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
    display: block;
}

.module-card h3 {
    font-size: 1.1rem;
    margin-bottom: var(--spacing-sm);
}

.module-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
}

.module-actions {
    display: flex;
    gap: var(--spacing-sm);
    margin-top: auto;
}

.module-btn {
    display: inline-flex;
    align-items: center;
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.module-btn-learn {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
}

.module-btn-learn:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-glow);
}

.module-btn-practice {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.module-btn-practice:hover {
    border-color: var(--primary);
    color: var(--text-primary);
}

/* =============================================
   Tools / Entry Cards Section
   ============================================= */

.tools-section {
    background: var(--bg-secondary);
}

.subsection-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
    margin-top: var(--spacing-xl);
}

.subsection-title:first-of-type {
    margin-top: 0;
}

.entry-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.entry-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid transparent;
    border-radius: var(--radius-card);
    padding: var(--spacing-xl);
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.entry-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
}

.entry-card-icon {
    font-size: 2rem;
    margin-bottom: var(--spacing-md);
}

.entry-card h4 {
    font-size: 1.15rem;
    margin-bottom: var(--spacing-sm);
}

.entry-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    flex: 1;
}

.entry-card-count {
    display: inline-block;
    margin-top: var(--spacing-md);
    padding: var(--spacing-xs) var(--spacing-sm);
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* =============================================
   Problems Section (legacy - kept for problems.html)
   ============================================= */
.problems {
    background: var(--bg-secondary);
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
    align-items: center;
}

.filter-group {
    display: flex;
    gap: var(--spacing-xs);
}

.filter-btn {
    padding: var(--spacing-sm) var(--spacing-md);
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 100px;
    color: var(--text-secondary);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-btn:hover {
    border-color: var(--primary);
    color: var(--text-primary);
}

.filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

.filter-select {
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
    min-width: 150px;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary);
}

.search-box {
    flex: 1;
    min-width: 200px;
}

.search-box input {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.9rem;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
}

.search-box input::placeholder {
    color: var(--text-muted);
}

/* Problems Table */
.problems-table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.problems-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.problems-table th,
.problems-table td {
    padding: var(--spacing-md);
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.problems-table th {
    background: var(--bg-tertiary);
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

.problems-table tbody tr {
    background: var(--bg-card);
    transition: background var(--transition-fast);
}

.problems-table tbody tr:hover {
    background: var(--bg-card-hover);
}

.problems-table .problem-number {
    font-weight: 600;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.problems-table .problem-title {
    font-weight: 500;
}

.problems-table .problem-title a {
    color: var(--text-primary);
    transition: color var(--transition-fast);
}

.problems-table .problem-title a:hover {
    color: var(--primary);
}

.difficulty-badge {
    display: inline-block;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
}

.difficulty-badge.easy {
    background: rgba(0, 184, 163, 0.15);
    color: var(--easy);
}

.difficulty-badge.medium {
    background: rgba(255, 192, 30, 0.15);
    color: var(--medium);
}

.difficulty-badge.hard {
    background: rgba(255, 55, 95, 0.15);
    color: var(--hard);
}

.category-badge {
    display: inline-block;
    padding: var(--spacing-xs) var(--spacing-sm);
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.practice-link {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-xs) var(--spacing-sm);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 500;
    color: white;
    transition: all var(--transition-fast);
}

.practice-link:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-glow);
}

.practice-links {
    display: flex;
    gap: var(--spacing-xs);
    flex-wrap: wrap;
}

.practice-local {
    background: linear-gradient(135deg, var(--easy), #00d4aa);
    color: #000;
}

.practice-lc {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.practice-lc:hover {
    border-color: var(--primary);
    color: var(--text-primary);
}

.practice-blog {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: #fff;
}

.practice-blog:hover {
    filter: brightness(1.15);
    color: #fff;
}

.problems-footer {
    text-align: center;
    margin-top: var(--spacing-xl);
    color: var(--text-secondary);
}

/* =============================================
   Problems Page
   ============================================= */

.problems-page-main {
    padding-top: calc(var(--navbar-height) + 2rem);
    min-height: 100vh;
    background: var(--bg-primary);
}

.problems-page-header {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
}

.problems-page-title {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--spacing-sm);
}

.problems-page-subtitle {
    color: var(--text-secondary);
    font-size: 1.05rem;
}

.platform-tabs {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-xl);
    flex-wrap: wrap;
}

.platform-tab {
    padding: 8px 20px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 100px;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.platform-tab:hover {
    border-color: var(--primary);
    color: var(--text-primary);
}

.platform-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

.problems-stats {
    margin-bottom: var(--spacing-md);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* =============================================
   Features Section (Core Selling Points)
   ============================================= */

.features-section {
    background: var(--bg-secondary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--spacing-lg);
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid transparent;
    border-radius: var(--radius-card);
    padding: var(--spacing-xl);
    transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-md);
}

.feature-card h3 {
    font-size: 1.15rem;
    margin-bottom: var(--spacing-sm);
}

.feature-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* =============================================
   Companies Section (Logo Wall)
   ============================================= */

.companies-section {
    background: var(--bg-primary);
}

.companies-grid {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    justify-content: center;
}

.company-tag {
    display: inline-flex;
    align-items: center;
    padding: 10px 24px;
    background: var(--bg-card);
    border: 1px solid transparent;
    border-radius: 100px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.company-tag:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.feature-card {
    text-decoration: none;
    color: inherit;
    display: block;
    cursor: pointer;
}

.company-tag {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

/* =============================================
   AI Showcase Section
   ============================================= */

.ai-section {
    background: var(--bg-secondary);
}

.ai-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-lg);
}

.ai-feature-card {
    background: var(--bg-card);
    border: 1px solid transparent;
    border-radius: var(--radius-card);
    padding: var(--spacing-xl);
    position: relative;
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: var(--shadow-sm);
}

.ai-feature-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
}

.ai-feature-icon {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-md);
}

.ai-feature-card h3 {
    font-size: 1.15rem;
    margin-bottom: var(--spacing-sm);
}

.ai-feature-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.ai-cta {
    text-align: center;
    margin-top: var(--spacing-xl);
}

.ai-cta-button {
    display: inline-block;
    padding: var(--spacing-md) var(--spacing-xl);
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
    color: #fff;
    text-decoration: none;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 1.05rem;
    transition: all var(--transition-base);
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3);
}

.ai-cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

html[data-theme="light"] .ai-section {
    background: linear-gradient(180deg, #f0f4ff 0%, var(--bg-secondary) 100%);
}

html[data-theme="light"] .ai-feature-card {
    background: var(--bg-card);
}

html[data-theme="light"] .ai-feature-card:hover {
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.1);
}

/* =============================================
   Content Preview Section
   ============================================= */

.preview-section {
    background: var(--bg-secondary);
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: var(--spacing-lg);
}

.preview-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.preview-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
}

.preview-card-tag {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.preview-card-type {
    padding: 2px var(--spacing-sm);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
}

.preview-card-body {
    padding: var(--spacing-lg);
}

.preview-card-body h4 {
    font-size: 1rem;
    margin-bottom: var(--spacing-md);
}

.preview-code {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    line-height: 1.6;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
}

.preview-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: var(--spacing-md);
}

.preview-text ul {
    padding-left: var(--spacing-lg);
    margin-top: var(--spacing-sm);
}

.preview-text li {
    margin-bottom: var(--spacing-xs);
}

.preview-hint {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 500;
}

/* =============================================
   Footer
   ============================================= */
.footer {
    background: var(--bg-primary);
    padding: 5rem 0 2.5rem;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--spacing-2xl);
    margin-bottom: var(--spacing-2xl);
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.footer-brand .logo-icon {
    font-size: 2rem;
}

.footer-brand .logo-text {
    font-size: 1.5rem;
    font-weight: 700;
}

.footer-brand p {
    color: var(--text-muted);
}

.footer-links h4 {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: var(--spacing-md);
    color: var(--text-secondary);
}

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

.footer-links li {
    margin-bottom: var(--spacing-sm);
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: color var(--transition-fast);
}

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

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-xl);
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* =============================================
   Responsive
   ============================================= */
@media (max-width: 1024px) {
    .hero-decoration {
        display: none;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        flex-direction: column;
        padding: var(--spacing-lg);
        gap: var(--spacing-md);
        transform: translateY(-150%);
        opacity: 0;
        transition: all var(--transition-base);
        border-bottom: 1px solid var(--border-color);
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
    }

    .nav-toggle {
        display: flex;
    }

    .section-title {
        font-size: 2rem;
    }

    .hero-stats {
        gap: var(--spacing-lg);
    }

    .stat-number {
        font-size: 2rem;
    }

    .roadmap-timeline::before {
        left: 20px;
    }

    .roadmap-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .roadmap-item {
        gap: var(--spacing-md);
    }

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        flex-wrap: wrap;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .btn {
        padding: var(--spacing-sm) var(--spacing-lg);
        font-size: 0.9rem;
    }

    .hero-actions {
        flex-direction: column;
    }

    .modules-grid {
        grid-template-columns: 1fr;
    }

    .preview-grid {
        grid-template-columns: 1fr;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content>* {
    animation: fadeInUp 0.6s ease forwards;
    animation-delay: calc(var(--i, 0) * 0.1s);
}

.hero-badge {
    --i: 1;
}

.hero-title {
    --i: 2;
}

.hero-subtitle {
    --i: 3;
}

.hero-stats {
    --i: 4;
}

.hero-actions {
    --i: 5;
}

/* =============================================
   Theme Toggle Button
   ============================================= */
.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.github-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.github-link:hover {
    color: var(--text-primary);
}

.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-secondary);
    transition: color var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast);
    flex-shrink: 0;
}

.theme-toggle:hover {
    color: var(--text-primary);
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.05);
}

html[data-theme="dark"] .icon-moon { display: none; }
html[data-theme="light"] .icon-sun { display: none; }

/* =============================================
   Light Mode
   ============================================= */
html[data-theme="light"] {
    --bg-primary: #fafbfc;
    --bg-secondary: #f5f5f8;
    --bg-tertiary: #eeeef2;
    --bg-card: rgba(255, 255, 255, 0.95);
    --bg-card-hover: rgba(255, 255, 255, 1);
    --text-primary: #1a1a2e;
    --text-secondary: #4a4a68;
    --text-muted: #7a7a90;
    --border-color: rgba(0, 0, 0, 0.06);
    --border-hover: rgba(0, 0, 0, 0.12);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.06), 0 16px 48px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 60px hsla(var(--primary-hue), 100%, 65%, 0.06);
}

/* Navbar */
html[data-theme="light"] .navbar {
    background: rgba(255, 255, 255, 0.92);
}

/* Dropdown */
html[data-theme="light"] .nav-dropdown-menu {
    background: #fff;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

html[data-theme="light"] .theme-toggle:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* Hero background */
html[data-theme="light"] .hero-bg {
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, hsla(var(--primary-hue), 100%, 60%, 0.08), transparent),
        radial-gradient(ellipse 60% 40% at 80% 60%, hsla(var(--accent-hue), 100%, 50%, 0.06), transparent);
}

/* Hero code block */
html[data-theme="light"] .code-block {
    background: var(--bg-card);
    border-color: rgba(0, 0, 0, 0.12);
}
html[data-theme="light"] .code-content .keyword { color: #d73a49; }
html[data-theme="light"] .code-content .function { color: #6f42c1; }
html[data-theme="light"] .code-content .comment { color: #6a737d; }

/* Roadmap icon glow — softer */
html[data-theme="light"] .roadmap-icon {
    box-shadow: 0 0 16px hsla(var(--primary-hue), 100%, 65%, 0.12);
}

/* Filter controls */
html[data-theme="light"] .filter-select {
    color: var(--text-primary);
}

/* Problems table */
html[data-theme="light"] .problems-table tbody tr {
    background: var(--bg-card);
}
html[data-theme="light"] .problems-table tbody tr:hover {
    background: var(--bg-card-hover);
}

html[data-theme="light"] .entry-card {
    background: var(--bg-card);
}

html[data-theme="light"] .entry-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

html[data-theme="light"] .module-btn-practice {
    border-color: var(--border-color);
}

html[data-theme="light"] .tools-section {
    background: var(--bg-secondary);
}

html[data-theme="light"] .feature-card {
    background: var(--bg-card);
}

html[data-theme="light"] .feature-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

html[data-theme="light"] .company-tag {
    background: var(--bg-card);
}

html[data-theme="light"] .preview-card {
    background: var(--bg-card);
}

html[data-theme="light"] .preview-code {
    background: #f6f8fa;
    border-color: var(--border-color);
}

/* Mobile menu — only apply background on small screens */
@media (max-width: 768px) {
    html[data-theme="light"] .nav-menu {
        background: var(--bg-secondary);
    }
}

/* Nav toggle bars */
html[data-theme="light"] .nav-toggle span {
    background: var(--text-primary);
}

/* Scrollbar */
html[data-theme="light"] ::-webkit-scrollbar-track { background: var(--bg-primary); }
html[data-theme="light"] ::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.1); }
html[data-theme="light"] ::-webkit-scrollbar-thumb:hover { background: rgba(0, 0, 0, 0.18); }

/* =============================================
   Scroll-triggered Animations
   ============================================= */
.roadmap-item,
.module-card,
.entry-card,
.feature-card,
.ai-feature-card,
.company-tag {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.modules-grid > *,
.features-grid > *,
.entry-cards > *,
.ai-features-grid > *,
.companies-grid > * {
    transition-delay: calc(var(--anim-index, 0) * 0.08s);
}

.animate-in {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Button press feedback */
.btn:active {
    transform: translateY(0) scale(0.98);
    transition-duration: 0.1s;
}