/* ===== CSS VARIABLES ===== */
:root {
    /* Light theme (default) */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --text-primary: #111111;
    --text-secondary: #555555;
    --text-muted: #888888;
    --border-color: #dddddd;
    --border-light: #eeeeee;
    --card-shadow: transparent;
    --icon-stroke: #111111;
    --button-bg: #111111;
    --button-text: #ffffff;
    --tag-border: #cccccc;
    --category-border: #cccccc;
}

[data-theme="dark"] {
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --text-primary: #f0f0f0;
    --text-secondary: #aaaaaa;
    --text-muted: #777777;
    --border-color: #333333;
    --border-light: #2a2a2a;
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    --icon-stroke: #f0f0f0;
    --button-bg: #f0f0f0;
    --button-text: #0a0a0a;
    --tag-border: #444444;
    --category-border: #444444;
}

/* ===== BASE STYLES ===== */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family:
        Arial,
        Helvetica,
        sans-serif;
    transition: background 0.3s ease, color 0.3s ease;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ===== HEADER BAR WITH THEME TOGGLE ===== */
.header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 40px 0 0;
}

.detail-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 42px;
}

.theme-toggle {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: var(--text-primary);
    padding: 0;
}

.theme-toggle:hover {
    border-color: var(--text-primary);
    transform: rotate(15deg);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
    stroke: var(--text-primary);
    stroke-width: 1.8;
}

/* ===== CONTAINER ===== */
.container {
    width: min(1180px, 92%);
    margin: auto;
    padding: 0 0 80px;
}

/* ===== BRAND ===== */
.brand {
    font-size: 20px;
    font-weight: 700;
}

/* ===== HERO ===== */
.hero {
    text-align: center;
    padding: 80px 20px 80px;
}

.hero h1 {
    margin: 0;
    font-size: clamp(48px, 7vw, 86px);
    line-height: 0.95;
    letter-spacing: -4px;
}

.hero p {
    max-width: 520px;
    margin: 28px auto 0;
    font-size: 18px;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* ===== GRID ===== */
.grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

/* ===== CARD ===== */
.card {
    min-height: 280px;
    padding: 24px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.3s ease;
    background: var(--bg-primary);
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--text-primary);
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 35px;
}

.card-number {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 600;
}

/* ===== ICON STYLING ===== */
.card-icon {
    width: 36px;
    height: 36px;
    stroke: var(--icon-stroke);
    stroke-width: 1.5;
    flex-shrink: 0;
    transition: transform 0.3s ease, stroke 0.3s ease;
}

.card:hover .card-icon {
    transform: scale(1.15) rotate(-3deg);
}

/* Category-specific icon colors - Light theme */
.card[data-category="Mobile App"] .card-icon {
    stroke: #2563eb;
}

.card[data-category="Windows Utility"] .card-icon {
    stroke: #7c3aed;
}

.card[data-category="Transportation"] .card-icon {
    stroke: #059669;
}

.card[data-category="Machine Learning"] .card-icon {
    stroke: #dc2626;
}

.card[data-category="Web Development"] .card-icon {
    stroke: #0891b2;
}

.card[data-category="Security"] .card-icon {
    stroke: #6b7280;
}

.card[data-category="Real-time"] .card-icon {
    stroke: #d97706;
}

.card[data-category="Productivity"] .card-icon {
    stroke: #7c3aed;
}

.card[data-category="NLP"] .card-icon {
    stroke: #ec4899;
}

/* Dark theme - slightly brighter colors */
[data-theme="dark"] .card[data-category="Mobile App"] .card-icon {
    stroke: #60a5fa;
}

[data-theme="dark"] .card[data-category="Windows Utility"] .card-icon {
    stroke: #a78bfa;
}

[data-theme="dark"] .card[data-category="Transportation"] .card-icon {
    stroke: #34d399;
}

[data-theme="dark"] .card[data-category="Machine Learning"] .card-icon {
    stroke: #f87171;
}

[data-theme="dark"] .card[data-category="Web Development"] .card-icon {
    stroke: #22d3ee;
}

[data-theme="dark"] .card[data-category="Security"] .card-icon {
    stroke: #9ca3af;
}

[data-theme="dark"] .card[data-category="Real-time"] .card-icon {
    stroke: #fbbf24;
}

[data-theme="dark"] .card[data-category="Productivity"] .card-icon {
    stroke: #a78bfa;
}

[data-theme="dark"] .card[data-category="NLP"] .card-icon {
    stroke: #f472b6;
}

.card h2 {
    margin: 0 0 12px;
    font-size: 22px;
}

.card p {
    margin: 0 0 25px;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.category {
    display: inline-block;
    padding: 7px 10px;
    border: 1px solid var(--category-border);
    border-radius: 6px;
    font-size: 12px;
}

/* ===== DETAIL PAGE ===== */
.detail-container {
    width: min(850px, 90%);
    margin: 0 auto;
    padding: 40px 0 70px;
}

.back {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 14px;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

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

.back svg {
    width: 15px;
    height: 15px;
    stroke: var(--text-primary);
    stroke-width: 1.8;
}

.problem-header {
    padding-bottom: 28px;
    border-bottom: 1px solid var(--border-color);
}

.problem-header h1 {
    margin: 0;
    font-size: clamp(42px, 6vw, 68px);
    line-height: 1;
    letter-spacing: -3px;
}

.problem-header > p {
    max-width: 650px;
    margin: 16px 0 0;
    font-size: 17px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 22px;
    font-size: 13px;
    color: var(--text-secondary);
}

.meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.meta svg {
    width: 15px;
    height: 15px;
    stroke: var(--text-primary);
    stroke-width: 1.8;
}

.detail-section {
    padding: 24px 0;
    border-bottom: 1px solid var(--border-light);
}

.detail-section h2 {
    margin: 0 0 12px;
    font-size: 20px;
}

.detail-section p {
    max-width: 720px;
    margin: 0;
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-secondary);
}

.detail-section ul {
    margin: 8px 0 0;
    padding-left: 20px;
}

.detail-section li {
    margin: 7px 0;
    line-height: 1.5;
    color: var(--text-secondary);
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tags span {
    padding: 7px 11px;
    border: 1px solid var(--tag-border);
    border-radius: 6px;
    font-size: 13px;
    color: var(--text-secondary);
}

.github-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 16px;
    background: var(--button-bg);
    color: var(--button-text);
    border-radius: 6px;
    font-size: 14px;
    transition: background 0.3s ease, color 0.3s ease;
}

.github-button svg {
    width: 17px;
    height: 17px;
    stroke: var(--button-text);
}

/* ===== VIDEO SECTION ===== */
.video-section h2 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.video-section h2 svg {
    width: 22px;
    height: 22px;
    stroke: var(--text-primary);
}

.video-container {
    margin-top: 8px;
}

.video-wrapper {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #000000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    aspect-ratio: 16 / 9;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-wrapper:hover {
    transform: scale(1.01);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

.video-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Play button overlay */
.video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.video-wrapper:hover .video-play-btn {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

.video-play-btn svg {
    width: 48px;
    height: 48px;
    fill: #ff0000;
    stroke: #ff0000;
    margin-left: 4px;
}

/* Dark theme adjustments */
[data-theme="dark"] .video-wrapper {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .video-wrapper:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.7);
}

[data-theme="dark"] .video-play-btn {
    background: rgba(255, 255, 255, 0.85);
}

.video-caption {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 14px 0 0;
    font-size: 14px;
    color: var(--text-secondary);
    padding-left: 4px;
}

.video-caption svg {
    width: 18px;
    height: 18px;
    stroke: var(--text-secondary);
    stroke-width: 1.8;
    flex-shrink: 0;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 550px) {
    .container {
        width: 90%;
        padding-top: 0;
    }

    .header-bar {
        padding-top: 20px;
    }

    .hero {
        padding: 50px 10px 50px;
    }

    .hero h1 {
        letter-spacing: -2px;
    }

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

    .card {
        min-height: auto;
    }

    .detail-container {
        width: 90%;
        padding-top: 20px;
    }

    .detail-header-bar {
        margin-bottom: 28px;
        flex-wrap: wrap;
        gap: 12px;
    }

    .problem-header h1 {
        letter-spacing: -2px;
    }

    .meta {
        gap: 12px;
    }

    .card-icon {
        width: 28px;
        height: 28px;
    }

    /* Video responsive for mobile */
    .video-wrapper {
        border-radius: 8px;
    }

    .video-play-btn {
        width: 50px;
        height: 50px;
    }

    .video-play-btn svg {
        width: 30px;
        height: 30px;
    }

    .video-caption {
        font-size: 12px;
        margin-top: 8px;
    }
}

@media (max-width: 768px) {
    .video-wrapper {
        border-radius: 10px;
    }

    .video-play-btn {
        width: 60px;
        height: 60px;
    }

    .video-play-btn svg {
        width: 36px;
        height: 36px;
    }

    .video-caption {
        font-size: 13px;
        margin-top: 10px;
    }
}

/* ===== HEADER RIGHT / NAV LINK (shared across pages) ===== */
.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--text-secondary);
    transition: color 0.3s ease;
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid transparent;
}

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

.nav-link svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

/* ===== ABOUT PAGE ===== */
.about-container {
    width: min(850px, 90%);
    margin: 0 auto;
    padding: 40px 0 70px;
}

.about-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 50px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    gap: 20px;
}

.about-brand {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
}

.about-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.about-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    padding: 8px 14px;
    border-radius: 6px;
    border: 1px solid transparent;
    text-decoration: none;
}

.about-nav-link:hover {
    color: var(--text-primary);
    border-color: var(--border-color);
    background: var(--bg-secondary);
}

.about-nav-link svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

.about-nav-link span {
    display: inline;
}

/* Theme toggle in about page - consistent with homepage */
.about-header-right .theme-toggle {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: var(--text-primary);
    padding: 0;
    flex-shrink: 0;
}

.about-header-right .theme-toggle:hover {
    border-color: var(--text-primary);
    transform: rotate(15deg);
}

.about-header-right .theme-toggle svg {
    width: 20px;
    height: 20px;
    stroke: var(--text-primary);
    stroke-width: 1.8;
}

.about-hero {
    text-align: center;
    padding: 30px 0 50px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 50px;
}

.about-icon {
    font-size: 48px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    display: inline-block;
    padding: 12px 20px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-family: 'Courier New', monospace;
}

.about-hero h1 {
    margin: 0;
    font-size: clamp(42px, 5vw, 64px);
    letter-spacing: -3px;
    line-height: 1.1;
}

.about-tagline {
    font-size: 18px;
    color: var(--text-secondary);
    margin-top: 8px;
    font-weight: 300;
    letter-spacing: 1px;
}

.about-section {
    padding: 32px 0;
    border-bottom: 1px solid var(--border-light);
}

.about-section:last-of-type {
    border-bottom: none;
}

.about-section h2 {
    font-size: 24px;
    margin: 0 0 20px;
    letter-spacing: -0.5px;
}

.about-section p {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-secondary);
    margin: 0 0 16px;
}

.about-section p:last-child {
    margin-bottom: 0;
}

.about-section blockquote {
    font-size: 20px;
    font-style: italic;
    color: var(--text-primary);
    border-left: 4px solid #2563eb;
    padding-left: 24px;
    margin: 24px 0;
    font-weight: 500;
    line-height: 1.4;
}

.about-section .highlight {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 24px;
}

.rule-box {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 20px 24px;
    margin: 16px 0 0;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.5px;
}

.mission-box {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 18px 24px;
    margin-top: 20px;
    border: 1px solid var(--border-color);
}

.mission-box svg {
    width: 28px;
    height: 28px;
    stroke: #2563eb;
    stroke-width: 2;
    flex-shrink: 0;
}

.mission-box span {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.about-footer {
    margin-top: 20px;
    padding-top: 32px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.built-with {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: var(--text-secondary);
}

.tech-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.tech-tags span {
    padding: 4px 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 12px;
    color: var(--text-secondary);
}

.home-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--button-bg);
    color: var(--button-text);
    border-radius: 6px;
    font-size: 14px;
    transition: background 0.3s ease, color 0.3s ease;
}

.home-link svg {
    width: 16px;
    height: 16px;
    stroke: var(--button-text);
}

/* ===== ABOUT PAGE RESPONSIVE ===== */
@media (max-width: 550px) {
    .about-container {
        padding: 20px 0 50px;
    }

    .about-header-bar {
        margin-bottom: 30px;
        flex-wrap: wrap;
        gap: 12px;
    }

    .about-brand {
        font-size: 17px;
    }

    .about-header-right {
        gap: 8px;
    }

    .about-nav-link {
        padding: 6px 10px;
        font-size: 13px;
    }

    .about-nav-link span {
        display: none;
    }

    .about-header-right .theme-toggle {
        width: 36px;
        height: 36px;
    }

    .about-header-right .theme-toggle svg {
        width: 18px;
        height: 18px;
    }

    .about-hero {
        padding: 20px 0 30px;
        margin-bottom: 30px;
    }

    .about-icon {
        font-size: 32px;
        padding: 8px 16px;
    }

    .about-hero h1 {
        font-size: 32px;
    }

    .about-tagline {
        font-size: 15px;
    }

    .about-section {
        padding: 24px 0;
    }

    .about-section h2 {
        font-size: 20px;
    }

    .about-section blockquote {
        font-size: 17px;
        padding-left: 16px;
        margin: 16px 0;
    }

    .rule-box {
        font-size: 15px;
        padding: 16px 18px;
    }

    .mission-box {
        padding: 14px 18px;
        gap: 10px;
    }

    .mission-box svg {
        width: 22px;
        height: 22px;
    }

    .about-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .built-with {
        justify-content: center;
        flex-wrap: wrap;
    }

    .home-link {
        justify-content: center;
    }
}

/* ===== UPCOMING FEATURES ===== */
.upcoming-features {
    list-style: none;
    padding: 0;
    margin: 8px 0 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.upcoming-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    transition: all 0.3s ease;
}

.upcoming-features li:hover {
    border-color: var(--text-primary);
    background: var(--bg-primary);
}

.upcoming-features li svg {
    width: 18px;
    height: 18px;
    stroke: #f59e0b;
    stroke-width: 2;
    flex-shrink: 0;
}

[data-theme="dark"] .upcoming-features li svg {
    stroke: #fbbf24;
}

@media (max-width: 550px) {
    .upcoming-features {
        grid-template-columns: 1fr;
    }
}

/* ===== CHALLENGES PAGE ===== */
.challenges-container {
    width: min(950px, 92%);
    margin: 0 auto;
    padding: 40px 0 70px;
}

.challenges-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.challenges-hero {
    text-align: center;
    padding: 20px 0 40px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 40px;
}

.challenges-count {
    display: inline-block;
    padding: 6px 14px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.challenges-hero h1 {
    margin: 0;
    font-size: clamp(36px, 4vw, 52px);
    letter-spacing: -2px;
}

.challenges-subtitle {
    font-size: 17px;
    color: var(--text-secondary);
    margin-top: 8px;
}

.challenges-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    padding: 24px 0 40px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}

.stat-item svg {
    width: 18px;
    height: 18px;
    stroke: var(--text-primary);
}

.challenges-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 50px;
}

.challenge-card {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    transition: border-color 0.3s ease, transform 0.2s ease;
    background: var(--bg-primary);
}

.challenge-card:hover {
    border-color: var(--text-primary);
    transform: translateY(-2px);
}

.challenge-number {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.challenge-card h3 {
    margin: 0 0 16px;
    font-size: 18px;
}

.challenge-details {
    display: grid;
    gap: 14px;
}

.challenge-details .label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.challenge-problem p,
.challenge-fix p,
.challenge-lesson p {
    margin: 0;
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-secondary);
}

.challenge-fix p {
    color: #059669;
}

.challenge-lesson p {
    color: #2563eb;
}

/* Dark theme colors */
[data-theme="dark"] .challenge-fix p {
    color: #34d399;
}

[data-theme="dark"] .challenge-lesson p {
    color: #60a5fa;
}

.challenges-footer {
    border-top: 1px solid var(--border-color);
    padding-top: 40px;
}

.final-reflection {
    max-width: 750px;
    margin: 0 auto;
}

.final-reflection h2 {
    font-size: 22px;
    margin: 0 0 16px;
    text-align: center;
}

.final-reflection p {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-secondary);
    margin: 0 0 16px;
}

.final-reflection .highlight-text {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    border-left: 4px solid #2563eb;
    padding-left: 20px;
    margin-top: 20px;
}

.back-to-project {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 20px;
    background: var(--button-bg);
    color: var(--button-text);
    border-radius: 6px;
    font-size: 14px;
    margin-top: 30px;
    transition: background 0.3s ease;
}

.back-to-project svg {
    width: 16px;
    height: 16px;
    stroke: var(--button-text);
}

/* ===== VIEW ALL CHALLENGES BUTTON ON PROBLEM PAGE ===== */
.view-all-challenges-li {
    list-style: none !important;
    margin-top: 12px !important;
    padding-left: 0 !important;
}

.view-all-challenges {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    color: var(--text-primary);
    transition: all 0.3s ease;
    text-decoration: none;
    font-weight: 500;
}

.view-all-challenges:hover {
    border-color: var(--text-primary);
    background: var(--bg-secondary);
    transform: translateX(4px);
}

.view-all-challenges svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

/* ===== CHALLENGES PAGE RESPONSIVE ===== */
@media (max-width: 768px) {
    .challenges-container {
        width: 92%;
        padding: 24px 0 50px;
    }

    .challenges-hero h1 {
        font-size: 28px;
    }

    .challenges-stats {
        gap: 20px;
        padding: 16px 0 24px;
    }

    .stat-item {
        font-size: 13px;
    }

    .challenge-card {
        padding: 18px;
    }

    .challenge-card h3 {
        font-size: 16px;
    }

    .challenge-details p {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .challenges-header-bar {
        flex-wrap: wrap;
        gap: 12px;
    }

    .challenges-stats {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .challenge-details {
        gap: 12px;
    }

    .final-reflection .highlight-text {
        font-size: 15px;
        padding-left: 14px;
    }
}

/* ===== SUBMIT PAGE v2 ===== */

.submit-container {
    max-width: 720px;
    margin: 0 auto;
    padding: 40px 0 70px;
}

.submit-hero-new { margin-bottom: 32px; }
.submit-hero-new h1 { font-size: clamp(28px, 4vw, 38px); font-weight: 800; letter-spacing: -1px; margin: 0 0 8px; }
.submit-hero-new .submit-subtitle { font-size: 15px; color: var(--text-secondary); line-height: 1.6; max-width: 480px; }

.submit-form-new { display: flex; flex-direction: column; gap: 26px; padding-top: 24px; border-top: 1px solid var(--border-color); }
.form-group-new { display: flex; flex-direction: column; gap: 6px; position: relative; }
.form-group-new label { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; color: var(--text-primary); }
.form-group-new label svg { width: 17px; height: 17px; stroke: var(--text-primary); stroke-width: 2; }
.group-subtext { font-size: 13px; color: var(--text-muted); margin-bottom: 2px; }

.form-group-new input, .form-group-new textarea, .form-group-new select {
    padding: 12px 16px; border: 1.5px solid var(--border-color); border-radius: 10px;
    font-size: 14px; background: var(--bg-primary); color: var(--text-primary);
    font-family: inherit; width: 100%; transition: border-color 0.2s ease;
}
.form-group-new input:focus, .form-group-new textarea:focus, .form-group-new select:focus {
    outline: none; border-color: var(--text-primary);
}
.form-group-new textarea { resize: vertical; min-height: 90px; }
.form-group-new select {
    cursor: pointer; appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 16px center; padding-right: 44px;
}
.char-counter { align-self: flex-end; font-size: 12px; color: var(--text-muted); margin-top: -4px; }

.upload-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.upload-slot {
    aspect-ratio: 1; border: 1.5px dashed var(--border-color); border-radius: 12px;
    position: relative; cursor: pointer; overflow: hidden; background: var(--bg-primary);
    transition: border-color 0.2s ease, background 0.2s ease;
}
.upload-slot:hover { border-color: var(--text-primary); background: var(--bg-secondary); }
.upload-slot-empty { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 8px; text-align: center; }
.upload-slot-empty svg { width: 22px; height: 22px; stroke: var(--text-muted); stroke-width: 1.5; }
.upload-slot-label { font-size: 12px; font-weight: 600; color: var(--text-secondary); }
.upload-slot-hint { font-size: 10px; color: var(--text-muted); line-height: 1.3; }
.upload-slot-preview { width: 100%; height: 100%; object-fit: cover; }
.remove-slot-image {
    position: absolute; top: 5px; right: 5px; width: 20px; height: 20px; border: none;
    border-radius: 50%; background: rgba(0,0,0,0.7); color: white; display: flex;
    align-items: center; justify-content: center; cursor: pointer; padding: 0;
}
.remove-slot-image svg { width: 12px; height: 12px; stroke: white; stroke-width: 2.5; }

.form-actions { display: flex; gap: 12px; margin-top: 8px; }
.submit-btn-new {
    padding: 13px 28px; background: var(--button-bg); color: var(--button-text);
    border: none; border-radius: 10px; font-size: 15px; font-weight: 600;
    cursor: pointer; transition: opacity 0.2s ease;
}
.submit-btn-new:hover { opacity: 0.85; }
.cancel-btn {
    padding: 13px 28px; background: var(--bg-primary); color: var(--text-primary);
    border: 1.5px solid var(--border-color); border-radius: 10px; font-size: 15px;
    font-weight: 600; text-decoration: none; display: inline-flex; align-items: center;
    justify-content: center; transition: background 0.2s ease;
}
.cancel-btn:hover { background: var(--bg-secondary); }

.success-view-new { text-align: center; padding: 50px 10px 20px; animation: fadeInUp 0.5s ease; }
.success-icon-new {
    width: 74px; height: 74px; border-radius: 50%; border: 2px solid var(--text-primary);
    display: flex; align-items: center; justify-content: center; margin: 0 auto 24px;
}
.success-icon-new svg { width: 34px; height: 34px; stroke: var(--text-primary); stroke-width: 2.5; }
.success-view-new h2 { font-size: 26px; font-weight: 800; margin: 0 0 12px; }
.success-view-new p { font-size: 14px; color: var(--text-secondary); line-height: 1.7; max-width: 340px; margin: 0 auto 32px; }

.whats-next-card {
    border: 1px solid var(--border-color); border-radius: 12px; padding: 20px 24px;
    text-align: left; max-width: 400px; margin: 0 auto 28px; background: var(--bg-secondary);
}
.whats-next-title { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; margin-bottom: 8px; }
.whats-next-title svg { width: 17px; height: 17px; stroke: var(--text-primary); }
.whats-next-card p { margin: 0; font-size: 13px; color: var(--text-secondary); line-height: 1.6; max-width: none; }

.back-all-btn {
    display: inline-block; padding: 13px 28px; background: var(--button-bg); color: var(--button-text);
    border-radius: 10px; font-size: 14px; font-weight: 600; text-decoration: none; margin-bottom: 14px;
}
.submit-another-link {
    display: block; margin: 0 auto; background: none; border: none;
    color: var(--text-secondary); font-size: 13px; text-decoration: underline; cursor: pointer;
}

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

@media (max-width: 550px) {
    .upload-grid { grid-template-columns: repeat(3, 1fr); }
    .form-actions { flex-direction: column; }
}

.submit-page {
    width: min(850px, 90%);
    margin: 0 auto;
    padding: 36px 0 90px;
}


/* TOP BAR */

.submit-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 72px;
}

.submit-brand {
    color: #111111;
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
}

.submit-back {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    color: #555555;
    font-size: 14px;
    text-decoration: none;
}

.submit-back:hover {
    color: #111111;
}

.submit-back svg {
    width: 16px;
    height: 16px;
}


/* HERO */

.submit-hero {
    padding-bottom: 34px;
    border-bottom: 1px solid #e8e8e8;
}

.submit-hero h1 {
    margin: 0;

    color: #111111;

    font-size: clamp(40px, 6vw, 64px);
    line-height: 1;
    letter-spacing: -3px;
}

.submit-hero p {
    max-width: 650px;

    margin: 18px 0 0;

    color: #555555;

    font-size: 17px;
    line-height: 1.6;
}


/* FORM */

.problem-form {
    width: 100%;
}

.submit-field {
    padding: 30px 0;
    border-bottom: 1px solid #eeeeee;
}


/* LABEL */

.submit-field label {
    display: block;
}

.field-heading {
    display: flex;
    align-items: center;
    gap: 9px;

    margin-bottom: 7px;

    color: #111111;

    font-size: 17px;
    font-weight: 700;
}

.field-heading svg {
    width: 19px;
    height: 19px;

    stroke: #111111;
    stroke-width: 1.8;
}

.field-help {
    display: block;

    margin-bottom: 15px;

    color: #666666;

    font-size: 14px;
    line-height: 1.5;
}


/* INPUT */

.submit-input,
.submit-select,
.submit-textarea {
    width: 100%;

    border: 1px solid #d8d8d8;
    border-radius: 10px;

    background: #ffffff;
    color: #111111;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size: 15px;

    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.submit-input {
    height: 50px;
    padding: 0 15px;
}

.submit-select {
    height: 50px;
    padding: 0 15px;

    cursor: pointer;
}

.submit-textarea {
    min-height: 150px;

    padding: 15px 16px 38px;

    line-height: 1.6;

    resize: vertical;
}


/* FOCUS */

.submit-input:focus,
.submit-select:focus,
.submit-textarea:focus {
    border-color: #111111;

    box-shadow:
        0 0 0 3px rgba(0, 0, 0, 0.06);
}


/* PLACEHOLDER */

.submit-input::placeholder,
.submit-textarea::placeholder {
    color: #999999;
}


/* TEXTAREA COUNTER */

.textarea-wrapper {
    position: relative;
}

.char-counter {
    position: absolute;

    right: 14px;
    bottom: 12px;

    color: #999999;

    font-size: 12px;

    pointer-events: none;
}


/* UPLOAD GRID */

.upload-grid {
    display: grid;

    grid-template-columns:
        repeat(5, minmax(0, 1fr));

    gap: 12px;

    margin-top: 18px;
}


/* UPLOAD CARD */

.upload-card {
    min-height: 145px;

    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    padding: 16px 10px;

    border: 1px dashed #c8c8c8;
    border-radius: 10px;

    background: #ffffff;

    cursor: pointer;

    text-align: center;

    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease;
}

.upload-card:hover {
    border-color: #111111;

    background: #fafafa;

    transform: translateY(-2px);
}

.upload-card svg {
    width: 25px;
    height: 25px;

    margin-bottom: 10px;

    stroke: #111111;
    stroke-width: 1.6;
}

.upload-card strong {
    margin-bottom: 5px;

    color: #111111;

    font-size: 13px;
}

.upload-card span {
    margin-bottom: 3px;

    color: #666666;

    font-size: 11px;
}

.upload-card small {
    color: #999999;

    font-size: 10px;
}

.upload-note {
    display: block;

    margin-top: 12px;

    color: #888888;

    font-size: 12px;
}


/* ACTION */

.submit-actions {
    padding-top: 30px;
}

.submit-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;

    min-height: 48px;

    padding: 0 20px;

    border: 1px solid #111111;
    border-radius: 8px;

    background: #111111;
    color: #ffffff;

    font-size: 14px;
    font-weight: 600;

    cursor: pointer;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.submit-primary:hover {
    background: #333333;

    transform: translateY(-1px);
}

.submit-primary svg {
    width: 17px;
    height: 17px;

    stroke: #ffffff;
}


/* =========================================
   TABLET
========================================= */

@media (max-width: 760px) {

    .submit-topbar {
        margin-bottom: 52px;
    }

    .upload-grid {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }

}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 520px) {

    .submit-page {
        width: 90%;
        padding-top: 25px;
    }

    .submit-topbar {
        margin-bottom: 42px;
    }

    .submit-brand {
        font-size: 16px;
    }

    .submit-hero h1 {
        font-size: 42px;
        letter-spacing: -2px;
    }

    .submit-hero p {
        font-size: 15px;
    }

    .submit-field {
        padding: 24px 0;
    }

    .upload-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .upload-card {
        min-height: 130px;
    }

    .submit-primary {
        width: 100%;
    }

}

/* ===== FOOTER SOCIAL LINKS ===== */
.site-footer {
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid #e8e8e8;
    text-align: center;
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 12px;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid #dcdcdc;
    color: #555555;
    transition: all 0.25s ease;
    text-decoration: none;
    font-size: 16px;
}

.social-link:hover {
    border-color: #000000;
    color: #000000;
    transform: translateY(-2px);
}

.social-link svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 2;
}

.social-text-icon {
    font-size: 16px;
    line-height: 1;
    font-weight: 600;
}

.footer-text {
    font-size: 13px;
    color: #888888;
    margin: 0;
    line-height: 1.6;
}

.footer-email {
    color: #555555;
    text-decoration: none;
    transition: color 0.2s ease;
    font-weight: 500;
}

.footer-email:hover {
    color: #000000;
    text-decoration: underline;
}

/* Dark theme support */
[data-theme="dark"] .site-footer {
    border-top-color: #333333;
}

[data-theme="dark"] .social-link {
    border-color: #444444;
    color: #999999;
}

[data-theme="dark"] .social-link:hover {
    border-color: #ffffff;
    color: #ffffff;
}

[data-theme="dark"] .footer-text {
    color: #777777;
}

[data-theme="dark"] .footer-email {
    color: #aaaaaa;
}

[data-theme="dark"] .footer-email:hover {
    color: #ffffff;
}

/* Mobile */
@media (max-width: 550px) {
    .site-footer {
        margin-top: 40px;
        padding-top: 20px;
    }

    .footer-social {
        gap: 14px;
    }

    .social-link {
        width: 34px;
        height: 34px;
        font-size: 14px;
    }

    .social-link svg {
        width: 16px;
        height: 16px;
    }

    .footer-text {
        font-size: 12px;
    }
}

/* ===== FOOTER SOCIAL LINKS ===== */
.site-footer {
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid #e8e8e8;
    text-align: center;
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 12px;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #dcdcdc;
    color: #555555;
    transition: all 0.25s ease;
    text-decoration: none;
}

.social-link:hover {
    border-color: #000000;
    color: #000000;
    transform: translateY(-2px);
}

.social-link svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 2;
}

.footer-text {
    font-size: 13px;
    color: #888888;
    margin: 0;
    line-height: 1.6;
}

.footer-email {
    color: #555555;
    text-decoration: none;
    transition: color 0.2s ease;
    font-weight: 500;
}

.footer-email:hover {
    color: #000000;
    text-decoration: underline;
}

/* Dark theme support */
[data-theme="dark"] .site-footer {
    border-top-color: #333333;
}

[data-theme="dark"] .social-link {
    border-color: #444444;
    color: #999999;
}

[data-theme="dark"] .social-link:hover {
    border-color: #ffffff;
    color: #ffffff;
}

[data-theme="dark"] .footer-text {
    color: #777777;
}

[data-theme="dark"] .footer-email {
    color: #aaaaaa;
}

[data-theme="dark"] .footer-email:hover {
    color: #ffffff;
}

/* Mobile */
@media (max-width: 550px) {
    .site-footer {
        margin-top: 40px;
        padding-top: 20px;
    }

    .footer-social {
        gap: 14px;
    }

    .social-link {
        width: 36px;
        height: 36px;
    }

    .social-link svg {
        width: 18px;
        height: 18px;
    }

    .footer-text {
        font-size: 12px;
    }
}