/* Quiz Game - Mobile-First Duolingo Style with Perfect Implementation */

:root {
    /* Spacing Scale - 8pt Grid System */
    --spacing-0: 0;
    --spacing-1: 0.125rem;  /* 2px */
    --spacing-2: 0.25rem;   /* 4px */
    --spacing-3: 0.375rem;  /* 6px */
    --spacing-4: 0.5rem;    /* 8px */
    --spacing-6: 0.75rem;   /* 12px */
    --spacing-8: 1rem;      /* 16px */
    --spacing-10: 1.25rem;  /* 20px */
    --spacing-12: 1.5rem;   /* 24px */
    --spacing-16: 2rem;     /* 32px */
    --spacing-20: 2.5rem;   /* 40px */
    --spacing-24: 3rem;     /* 48px */
    --spacing-32: 4rem;     /* 64px */
    
    /* Component Tokens */
    --button-padding-sm: var(--spacing-3) var(--spacing-6);
    --button-padding-md: var(--spacing-4) var(--spacing-8);
    --button-padding-lg: var(--spacing-6) var(--spacing-12);
    --card-padding: var(--spacing-12);
    --section-spacing: var(--spacing-24);
    --grid-gap: var(--spacing-8);
}

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

body {
    font-family: 'Noto Sans KR', 'Nanum Gothic', sans-serif;
    background: transparent;
    color: #3c3c3c;
    font-weight: 300;
    line-height: 1.5;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Noto Sans KR', sans-serif;
    font-weight: 500;
    letter-spacing: -0.015em;
}

/* Top Header with Side Margins */
.top-header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid #e5e5e5;
    position: sticky;
    top: 0;
    z-index: 1020;
    padding: var(--spacing-6) 0;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--grid-gap);
    padding: 0 var(--spacing-16); /* Side margins for header */
    max-width: 1400px;
    margin: 0 auto;
}

/* Logo Section */
.logo-section {
    display: flex;
    align-items: center;
    gap: var(--spacing-6);
    font-family: 'Noto Sans KR', sans-serif;
    font-weight: 400;
    color: #58cc02;
    font-size: 1.5rem;
    cursor: pointer;
}

.logo-img, .offcanvas-logo {
    height: 2rem;
    width: auto;
}

.logo-text {
    font-family: 'Noto Sans KR', sans-serif;
    color: #58cc02;
    font-weight: 400;
    font-size: 1.5rem;
}

/* Header Controls */
.header-controls {
    display: flex;
    align-items: center;
    gap: var(--grid-gap);
}

.header-stats {
    display: flex;
    gap: var(--spacing-4);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-3);
    padding: var(--button-padding-sm);
    background: white;
    border-radius: var(--spacing-12);
    border: 1px solid #e5e5e5;
    font-weight: 300;
    font-size: 0.875rem;
    color: #3c3c3c;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.stat-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

.stat-item.credits {
    color: #1c6e79;
    border-color: #48dff3;
    background: #48dff3;
}

.stat-item.hearts {
    color: #ff4b4b;
    border-color: #ffe5e5;
    background: #ffe5e5;
}

.stat-item.score {
    color: #58cc02;
    border-color: #d7ffb8;
    background: #d7ffb8;
}

.stat-item i {
    font-size: 1rem;
    width: 1rem;
    height: 1rem;
}

/* Share Section */
.share-section {
    position: relative;
}

.share-btn, .share-btn-mobile {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
    border: none;
    border-radius: 1rem;
    padding: var(--button-padding-md);
    font-weight: 300;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: var(--spacing-4);
}

.share-btn:hover, .share-btn-mobile:hover {
    background: linear-gradient(135deg, #ee5a52, #da544c);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

.share-dropdown {
    border: 1px solid #e5e5e5;
    border-radius: 1rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.025);
    padding: 0.5rem;
}

.share-dropdown .dropdown-item {
    border-radius: var(--spacing-6);
    padding: 0.75rem 1rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: var(--spacing-4);
}

.share-dropdown .dropdown-item:hover {
    background: #fff5f5;
    color: #ff6b6b;
}

/* Language Selector */
.language-selector {
    position: relative;
}

.language-btn, .language-btn-mobile {
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 1rem;
    padding: var(--button-padding-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-4);
    font-weight: 300;
    color: #3c3c3c;
    transition: all 0.2s ease;
}

.language-btn:hover, .language-btn-mobile:hover {
    border-color: #1cb0f6;
    background: #f8fafc;
}

.language-icon {
    width: 1.25rem;
    height: 1.25rem;
}

.language-dropdown {
    border: 1px solid #e5e5e5;
    border-radius: 1rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.025);
    padding: 0.5rem;
}

.language-dropdown .dropdown-item {
    border-radius: var(--spacing-6);
    padding: 0.75rem 1rem;
    transition: all 0.2s ease;
}

.language-dropdown .dropdown-item:hover {
    background: #ddf4ff;
    color: #1cb0f6;
}

/* Login Buttons */
.login-btn, .login-btn-mobile {
    background: linear-gradient(135deg, #1cb0f6, #1899d6);
    color: white;
    border: none;
    border-radius: 1rem;
    padding: var(--button-padding-md);
    font-weight: 300;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: var(--spacing-4);
}

.login-btn:hover, .login-btn-mobile:hover {
    background: linear-gradient(135deg, #1899d6, #1484b8);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(28, 176, 246, 0.3);
}

/* Hamburger Button */
.hamburger-btn {
    background: none;
    border: none;
    color: #777;
    font-size: 1.5rem;
    padding: 0rem;
    border-radius: var(--spacing-6);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hamburger-btn:hover {
    background: #f7f7f7;
    color: #3c3c3c;
}

/* Right Offcanvas */
.offcanvas-end {
    background: white;
    border: none;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.15);
    width: 320px !important;
    transition: none !important;
}

.offcanvas.offcanvas-end {
    transform: translateX(100%) !important;
}

.offcanvas.offcanvas-end.show {
    transform: translateX(0) !important;
}

.offcanvas-header {
    padding: var(--card-padding);
    border-bottom: 1px solid #e5e5e5;
}

.offcanvas-title {
    font-weight: 300;
    color: #3c3c3c;
    display: flex;
    align-items: center;
    gap: var(--spacing-6);
    font-size: 1.125rem;
}

/* Mobile Stats in Offcanvas */
.mobile-stats {
    padding: var(--card-padding);
    border-bottom: 1px solid #f7f7f7;
    margin-bottom: var(--spacing-8);
}

.mobile-stats .stat-item {
    padding: var(--spacing-8);
    margin-bottom: var(--spacing-6);
    justify-content: space-between;
    border-radius: 1rem;
    font-size: 0.875rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

.mobile-controls {
    padding: 0 1.5rem;
}

.mobile-language, .mobile-share, .mobile-login {
    margin-bottom: var(--spacing-8);
}

.language-btn-mobile, .share-btn-mobile, .login-btn-mobile {
    width: 100%;
    justify-content: center;
    padding: var(--spacing-8);
}

/* Sidebar Navigation */
.sidebar-nav {
    padding: 0 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-2);
}

.sidebar-nav .nav-item {
    display: flex;
    align-items: center;
    gap: var(--grid-gap);
    padding: var(--spacing-8);
    color: #777;
    text-decoration: none;
    border-radius: 1rem;
    transition: all 0.2s ease;
    font-weight: 300;
}

.sidebar-nav .nav-item:hover,
.sidebar-nav .nav-item.active {
    background: #ddf4ff;
    color: #1cb0f6;
}

.sidebar-nav .nav-item i {
    font-size: 1.25rem;
    width: 1.5rem;
    height: 1.5rem;
}

/* Main Container with Side Margins */
.main-wrapper {
    padding: 0 var(--spacing-16); /* Side margins for entire content */
    max-width: 1400px;
    margin: 0 auto;
}


.main-container {
    padding: 2rem 0;
}

.main-content {
    padding: 0 1rem;
}

/* Current Category Section */
.current-category-section {
    margin-bottom: var(--spacing-24);
}

.roadmap-header {
    margin-bottom: var(--spacing-16);
    background: linear-gradient(135deg, #58cc02 0%, #46a302 100%);
    border-radius: var(--spacing-12);
    padding: var(--card-padding);
    color: white;
    position: relative;
    overflow: hidden;
}

.roadmap-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    animation: none;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    50% { transform: translateX(100%) translateY(100%) rotate(45deg); }
    100% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
}

.category-info {
    display: flex;
    align-items: center;
    gap: var(--spacing-12);
}

.category-icon-large {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.category-emoji {
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-breadcrumb {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
    font-weight: 300;
    display: block;
    margin-bottom: 0.25rem;
}

.category-title {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
}

.category-desc {
    opacity: 0.9;
    font-weight: 300;
    margin: 0;
}

/* Learning Path - Vertical Layout */
.learning-path {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-12);
    padding: 2rem 0;
}

.path-level {
    display: flex;
    align-items: center;
    gap: var(--spacing-12);
    width: 100%;
    max-width: 400px;
    position: relative;
}

.level-circle {
    width: 5rem;
    height: 5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    border: 3px solid transparent;
    box-shadow: 0 6px 0 rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.level-circle.easy.active {
    background: linear-gradient(135deg, #58cc02, #46a302);
    color: white;
    box-shadow: 0 6px 0 #3d7302;
}

.level-circle.medium.active {
    background: linear-gradient(135deg, #1cb0f6, #1899d6);
    color: white;
    box-shadow: 0 6px 0 #1484b8;
}

.level-circle.hard.active {
    background: linear-gradient(135deg, #ff9600, #e08500);
    color: white;
    box-shadow: 0 6px 0 #cc7400;
}

.level-circle.expert.active {
    background: linear-gradient(135deg, #ce82ff, #b066d9);
    color: white;
    box-shadow: 0 6px 0 #9954cc;
}

.treasure-circle.active {
    background: linear-gradient(135deg, #ffd900, #ffb800);
    box-shadow: 0 6px 0 #e6a500;
    border: 3px solid #fff;
}

.level-circle:hover:not(.locked) {
    transform: none;
    box-shadow: 0 10px 0 rgba(0, 0, 0, 0.1);
}

.level-icon {
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.level-icon.treasure-icon {
    animation: none;
}

@keyframes treasure-glow {
    0% {
        filter: drop-shadow(0 0 5px #ffd900) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    }
    100% {
        filter: drop-shadow(0 0 15px #ffd900) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    }
}

.level-stars {
    position: absolute;
    top: -8px;
    right: -8px;
    display: flex;
    gap: 2px;
}

.star {
    font-size: 0.75rem;
    color: #ffd900;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.star:not(.completed) {
    color: rgba(255, 255, 255, 0.3);
}

.level-info {
    flex: 1;
    text-align: left;
}

.level-info h4 {
    font-size: 1.125rem;
    font-weight: 300;
    color: #3c3c3c;
    margin-bottom: 0.25rem;
}

.level-progress {
    font-size: 0.875rem;
    color: #777;
    font-weight: 300;
}

.path-line {
    position: absolute;
    left: 2.4rem;
    top: 5rem;
    width: 4px;
    height: 1.5rem;
    background: #58cc02;
    border-radius: 2px;
    z-index: -1;
}

.path-line.completed {
    background: #58cc02;
}

.path-line.locked {
    background: #e5e5e5;
}

/* All Categories Section */
.all-categories-section {
    margin-bottom: var(--spacing-24);
}

.section-title {
    font-size: 1.375rem;
    font-weight: 300;
    color: #3c3c3c;
    margin-bottom: var(--spacing-12);
    text-align: center;
}

/* Categories Grid - 4 per row */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--grid-gap);
    margin-bottom: var(--spacing-16);
}

.category-card {
    background: white;
    border-radius: var(--spacing-12);
    padding: var(--card-padding);
    border: 1px solid #e5e5e5;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    border-color: #1cb0f6;
}

.category-card.coming-soon {
    opacity: 0.6;
    cursor: not-allowed;
}

.category-card.coming-soon:hover {
    transform: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border-color: #e5e5e5;
}

.category-icon {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
    margin-bottom: var(--spacing-8);
}

.icon-wrapper {
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-card:hover .category-icon {
    background: linear-gradient(135deg, #ddf4ff, #bfdbfe);
}

.category-info-text h4 {
    font-size: 1.125rem;
    font-weight: 300;
    color: #3c3c3c;
    margin-bottom: 0.25rem;
}

.category-info-text p {
    color: #777;
    font-size: 0.875rem;
    margin: 0 0 0.75rem 0;
}

.progress-bar {
    height: 0.5rem;
    background: #e5e5e5;
    border-radius: 0.25rem;
    overflow: hidden;
    width: 100%;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #58cc02, #46a302);
    border-radius: 0.25rem;
    transition: width 0.3s ease;
}

/* Accordion Content */
.accordion-content {
    margin-top: 2rem;
}

.accordion-body {
    padding: var(--spacing-16);
    background: transparent;
    margin-bottom: var(--spacing-8);
}

.levels-row {
    display: flex;
    justify-content: center;
    gap: var(--spacing-16);
    flex-wrap: wrap;
}

.level-item-circle {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-4);
    cursor: pointer;
    transition: all 0.3s ease;
}

.level-item-circle:hover {
    transform: translateY(-4px);
}

.circle-icon {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #1cb0f6, #1899d6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    box-shadow: 0 4px 0 #1484b8;
    transition: all 0.3s ease;
}

.level-item-circle.active .circle-icon {
    background: linear-gradient(135deg, #58cc02, #46a302);
    box-shadow: 0 4px 0 #3d7302;
}

.level-item-circle span {
    font-size: 0.875rem;
    font-weight: 300;
    color: #3c3c3c;
}

/* Rankings Section */
.rankings-section {
    margin-bottom: var(--spacing-16);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-12);
}

.ranking-list {
    background: white;
    border-radius: var(--spacing-12);
    border: 1px solid #e5e5e5;
    overflow: hidden;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.02);
}

.ranking-item {
    display: flex;
    align-items: center;
    gap: var(--grid-gap);
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f7f7f7;
    transition: all 0.2s ease;
}

.ranking-item:last-child {
    border-bottom: none;
}

.ranking-item:hover {
    background: #f8fafc;
}

.ranking-item.current-user {
    background: linear-gradient(135deg, #ddf4ff, #f0f9ff);
    border-color: #1cb0f6;
}

.rank-badge {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 300;
    font-size: 0.875rem;
    flex-shrink: 0;
    position: relative;
}

.rank-1-badge {
    background: linear-gradient(135deg, #ffd900, #ffb800);
    color: white;
    box-shadow: 0 4px 12px rgba(255, 217, 0, 0.4);
}

.rank-2-badge {
    background: linear-gradient(135deg, #e5e5e5, #ccc);
    color: white;
    box-shadow: 0 4px 12px rgba(204, 204, 204, 0.4);
}

.rank-3-badge {
    background: linear-gradient(135deg, #ff9600, #e08500);
    color: white;
    box-shadow: 0 4px 12px rgba(255, 150, 0, 0.4);
}

.rank-4-badge {
    background: linear-gradient(135deg, #1cb0f6, #0b8cc7);
    color: white;
    box-shadow: 0 4px 12px rgba(28, 176, 246, 0.4);
}

.rank-number {
    color: #777;
    font-weight: 300;
}

.player-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-2);
}

.player-name {
    font-weight: 300;
    color: #3c3c3c;
    font-size: 1rem;
}

.player-score {
    font-weight: 300;
    color: #777;
    font-size: 0.875rem;
}

.player-streak {
    display: flex;
    align-items: center;
    gap: var(--spacing-2);
    color: #ff9600;
    font-weight: 300;
    font-size: 0.875rem;
}

.player-streak i {
    font-size: 1rem;
}

/* Right Sidebar Widgets */
.right-sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-12);
    position: sticky;
    top: 120px;
}

.widget {
    background: white;
    border-radius: var(--spacing-12);
    border: 1px solid #e5e5e5;
    padding: var(--card-padding);
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.02);
}

.widget-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-12);
}

.widget-title {
    font-size: 1.125rem;
    font-weight: 300;
    color: #3c3c3c;
    margin: 0;
    display: flex;
    align-items: center;
    gap: var(--spacing-4);
}

.widget-icon {
    font-size: 1.25rem;
    color: #1cb0f6;
}

.widget-icon.gray{
    color: #9b9b9b;
}


/* Widget Icon Animations - Subtle */
.widget-icon.bounce {
    animation: none;
}

.widget-icon.float {
    animation: none;
}

.pulse {
    animation: none;
    color: #ff9600;
}

.glow {
    animation: none;
    color: #ffd900;
}
.challenge-icon .glow.achieved {
    stroke: #ffffff;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.6));
}
.challenge-icon.achieved {
    background: linear-gradient(135deg, #00ff0a, #007905);
}
.progress-bar.animated.achieved {
    background: linear-gradient(90deg, #00ff0a, #007905);
}
@keyframes subtle-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

@keyframes subtle-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-2px); }
}

@keyframes subtle-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes subtle-glow {
    0%, 100% { filter: drop-shadow(0 0 3px currentColor); }
    50% { filter: drop-shadow(0 0 8px currentColor); }
}

.challenge-item {
    display: flex;
    align-items: center;
    gap: var(--grid-gap);
}

.challenge-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff9600, #e08500);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
}

.challenge-info {
    flex: 1;
}

.challenge-info h5 {
    font-size: 1rem;
    font-weight: 300;
    color: #3c3c3c;
    margin-bottom: var(--spacing-4);
}

.progress {
    height: 0.75rem;
    background: #e5e5e5;
    border-radius: var(--spacing-3);
    overflow: hidden;
    margin-bottom: var(--spacing-4);
}

.progress-bar.animated {
    background: linear-gradient(90deg, #ff9600, #e08500);
    height: 100%;
    border-radius: var(--spacing-3);
    transition: width 0.3s ease;
    animation: none;
}

@keyframes progress-fill {
    0%, 100% { background: linear-gradient(90deg, #ff9600, #e08500); }
    50% { background: linear-gradient(90deg, #ffb800, #ff9600); }
}

.progress-text {
    font-size: 0.75rem;
    color: #777;
    font-weight: 300;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--grid-gap);
}

.stat-box {
    text-align: center;
    padding: var(--spacing-8);
    background: #f8fafc;
    border-radius: 1rem;
    border: 1px solid #e5e5e5;
    transition: all 0.2s ease;
    cursor: pointer;
}

.stat-box.hover-scale:hover {
    transform: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-box.correct {
    background: #d7ffb8;
    border-color: #58cc02;
}

.stat-box.incorrect {
    background: #ffe5e5;
    border-color: #ff4b4b;
}

.stat-box.accuracy {
    background: #ddf4ff;
    border-color: #1cb0f6;
}

.stat-box.speed {
    /* background: #fff4e6;
    border-color: #ff9600; */
}

.stat-box i {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-4);
    display: block;
}

.stat-box.correct i { color: #58cc02; }
.stat-box.incorrect i { color: #ff4b4b; }
.stat-box.accuracy i { color: #1cb0f6; }
.stat-box.speed i { color: #ff9600; }

.stat-number {
    display: block;
    font-size: 1.25rem;
    font-weight: 300;
    color: #3c3c3c;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.75rem;
    color: #777;
    font-weight: 300;
}

/* AdSense Widget */
.ad-widget {
    border: 1px dashed #e5e5e5;
    background: #f8fafc;
}

.ad-container {
    text-align: center;
    padding: var(--spacing-8);
}

.ad-label {
    font-size: 0.75rem;
    color: #777;
    font-weight: 300;
    margin-bottom: var(--spacing-4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ad-placeholder {
    min-height: 250px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: var(--spacing-6);
    border: 1px solid #e5e5e5;
}

.ad-placeholder i {
    font-size: 2rem;
    color: #ccc;
    margin-bottom: var(--spacing-4);
}

.ad-placeholder p {
    color: #777;
    margin: 0;
    font-weight: 300;
}

.ad-placeholder small {
    color: #999;
    font-size: 0.75rem;
}

/* Footer */
.main-footer {
    background: #f8fafc;
    border-top: 1px solid #e5e5e5;
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-16);
}

.footer-info p {
    margin: 0 0 0.5rem 0;
    font-size: 0.875rem;
    color: #777;
}

.footer-info a {
    color: #1cb0f6;
    text-decoration: none;
}

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

.footer-links {
    display: flex;
    gap: var(--spacing-16);
}

.footer-links a {
    color: #777;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: #1cb0f6;
}

/* Login Modal */
.modal-content {
    border-radius: var(--spacing-12);
    border: none;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.04);
}

.modal-header {
    border-bottom: 1px solid #f7f7f7;
    padding: var(--card-padding);
}

.modal-title {
    display: flex;
    align-items: center;
    gap: var(--spacing-6);
    font-weight: 300;
    color: #3c3c3c;
}

.login-tabs .nav-tabs {
    border: none;
    margin-bottom: var(--spacing-12);
}

.login-tabs .nav-link {
    border: 1px solid #e5e5e5;
    border-radius: 1rem;
    margin-right: 0.5rem;
    color: #777;
    font-weight: 300;
    display: flex;
    align-items: center;
    gap: var(--spacing-4);
    transition: all 0.2s ease;
}

.login-tabs .nav-link.active {
    background: #ddf4ff;
    border-color: #1cb0f6;
    color: #1cb0f6;
}

.form-label {
    display: flex;
    align-items: center;
    gap: var(--spacing-4);
    font-weight: 300;
    color: #3c3c3c;
    margin-bottom: var(--spacing-4);
}

.form-control {
    border: 1px solid #e5e5e5;
    border-radius: 1rem;
    padding: 0.75rem 1rem;
    transition: all 0.2s ease;
}

.form-control:focus {
    border-color: #1cb0f6;
    box-shadow: 0 0 0 0.2rem rgba(28, 176, 246, 0.1);
}

.guest-login {
    margin-top: 1rem;
}

/* Responsive Design - Mobile First */
@media (max-width: 575px) {
    .header-content {
        padding: 0 1rem;
    }
    
    .main-wrapper {
        padding: 0 1rem;
    }
    
    .footer-content {
        padding: 0 1rem;
        flex-direction: column;
        gap: var(--grid-gap);
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
    }
    
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .levels-row {
        gap: var(--grid-gap);
    }
    
    .level-item-circle .circle-icon {
        width: 3rem;
        height: 3rem;
        font-size: 1.25rem;
    }
}

@media (min-width: 576px) {
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 768px) {
    .path-level {
        max-width: 500px;
    }
    
    .level-circle {
        width: 6rem;
        height: 6rem;
        font-size: 1.75rem;
    }
    
    .path-line {
        left: 2.9rem;
    }
    
    .categories-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 992px) {
    .main-container {
        padding: 2rem 0;
    }
    
    .levels-row {
        gap: var(--spacing-16);
    }
}

@media (min-width: 1200px) {
    .header-content {
        padding: 0 var(--spacing-16);
    }
    
    .main-content {
        padding: 0 var(--spacing-16);
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f7f7f7;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #e5e5e5;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #ccc;
}

/* Focus States */
button:focus,
a:focus {
    outline: 3px solid #1cb0f6;
    outline-offset: 2px;
}

/* Loading Animation */
.animate__animated {
    animation-duration: 0.8s;
}

/* Utilities */
.cursor-pointer {
    cursor: pointer;
}

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

.d-flex {
    display: flex;
}

.align-items-center {
    align-items: center;
}

.justify-content-between {
    justify-content: space-between;
}

.gap-1 {
    gap: var(--grid-gap);
}

.mb-0 {
    margin-bottom: 0;
}

.text-muted {
    color: #777;
}

/* Horizontal Accordion Styles */
.horizontal-accordions-section {
    margin-bottom: var(--spacing-16);
}

/* Bootstrap Alert Color Categories */
.category-success .accordion-button {
    background-color: #d4edda;
    color: #155724;
}

.category-success .accordion-button:not(.collapsed) {
    background: linear-gradient(135deg, #28a745, #218838);
    color: white;
}

.category-success .category-icon {
    background: rgba(40, 167, 69, 0.1);
    border-color: rgba(40, 167, 69, 0.2);
}

.category-danger .accordion-button {
    background-color: #f8d7da;
    color: #721c24;
}

.category-danger .accordion-button:not(.collapsed) {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
}

.category-danger .category-icon {
    background: rgba(220, 53, 69, 0.1);
    border-color: rgba(220, 53, 69, 0.2);
}

.category-warning .accordion-button {
    background-color: #fff3cd;
    color: #856404;
}

.category-warning .accordion-button:not(.collapsed) {
    background: linear-gradient(135deg, #ffc107, #e0a800);
    color: #212529;
}

.category-warning .category-icon {
    background: rgba(255, 193, 7, 0.1);
    border-color: rgba(255, 193, 7, 0.2);
}

.category-warning .accordion-button:not(.collapsed) .category-accordion-header .category-text h4,
.category-warning .accordion-button:not(.collapsed) .category-accordion-header .category-text p {
    color: #212529;
}


.horizontal-accordions-section .accordion {
    border: none;
}

.horizontal-accordions-section .accordion-item {
    border: 1px solid #e5e5e5;
    border-radius: 1rem;
    margin-bottom: var(--spacing-8);
    overflow: hidden;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.horizontal-accordions-section .accordion-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.horizontal-accordions-section .accordion-button {
    background: white;
    border: none;
    padding: var(--card-padding);
    font-weight: 300;
    box-shadow: none;
    border-radius: 0;
    width: 100%;
    text-align: left;
    display: flex;
    align-items: center;
    position: relative;
}

.horizontal-accordions-section .accordion-button:not(.collapsed) {
    background: linear-gradient(135deg, #1cb0f6, #0ea5e9);
    color: white;
    box-shadow: none;
}

.horizontal-accordions-section .accordion-button:focus {
    border-color: transparent;
    box-shadow: 0 0 0 0.25rem rgba(28, 176, 246, 0.25);
}

.horizontal-accordions-section .accordion-button::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='currentColor'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
    position: absolute !important;
    right: 1.5rem !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    flex-shrink: 0 !important;
    margin-left: auto !important;
    width: 1.25rem !important;
    height: 1.25rem !important;
}

.horizontal-accordions-section .accordion-button:not(.collapsed)::after {
    filter: brightness(0) invert(1);
}

/* 모든 아코디언 버튼 화살표 위치 - 아이콘 중앙에 정확히 맞춤 */
#categoryAccordions .accordion-button::after {
    position: absolute !important;
    right: 1.5rem !important;
    top: calc(1.5rem + 2rem) !important; /* 패딩 + 아이콘 중앙 */
    transform: translateY(-50%) !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    flex-shrink: 0 !important;
    width: 1.25rem !important;
    height: 1.25rem !important;
}


.category-accordion-header {
    display: flex;
    align-items: center;
    gap: var(--grid-gap);
    flex: 1;
    padding-right: 3rem; /* Space for arrow */
}

.category-accordion-header .category-icon {
    font-size: 2.5rem;
    width: 4rem;
    height: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(28, 176, 246, 0.1);
    border-radius: 1rem;
    border: 1px solid rgba(28, 176, 246, 0.2);
}

.category-accordion-header .category-text h4 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 300;
    color: #3c3c3c;
}

.accordion-button:not(.collapsed) .category-accordion-header .category-text h4 {
    color: white;
}

.category-accordion-header .category-text p {
    margin: 0;
    font-size: 0.9rem;
    color: #777;
}

.accordion-button:not(.collapsed) .category-accordion-header .category-text p {
    color: rgba(255, 255, 255, 0.8);
}

.horizontal-accordions-section .accordion-body {
    padding: var(--spacing-16);
    background: transparent;
}

.horizontal-accordions-section .levels-row {
    display: flex;
    gap: var(--spacing-12);
    justify-content: center;
    flex-wrap: wrap;
}

.horizontal-accordions-section .level-item-circle {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-6);
    padding: var(--spacing-8);
    background: white;
    border-radius: 1rem;
    border: 1px solid #e5e5e5;
    transition: all 0.3s ease;
    cursor: pointer;
    min-width: 120px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.horizontal-accordions-section .level-item-circle:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #1cb0f6;
}

.horizontal-accordions-section .level-item-circle.active {
    border-color: #58cc02;
    background: linear-gradient(135deg, #58cc02, #46a302);
    color: white;
}

.horizontal-accordions-section .level-item-circle.active:hover {
    border-color: #46a302;
    transform: translateY(-3px) scale(1.05);
}

.horizontal-accordions-section .circle-icon {
    font-size: 2rem;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.horizontal-accordions-section .level-item-circle.active .circle-icon {
    background: white;
    border-color: rgba(255, 255, 255, 0.8);
}

.horizontal-accordions-section .level-item-circle span {
    font-weight: 300;
    font-size: 0.9rem;
    text-align: center;
    color: #3c3c3c;
}

.horizontal-accordions-section .level-item-circle.active span {
    color: white;
}
.header-qna{
    background-color: #58cc02;
    border: none;
    border-radius: 1rem;
    padding: var(--button-padding-md);
    font-weight: 300;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: var(--spacing-4);
}
.header-qna a{
    color: #fff;
    text-decoration: none;
}
.header-qna-mobile{
    background-color: #58cc02;
    border: none;
    border-radius: 1rem;
    padding: var(--button-padding-md);
    font-weight: 300;
    transition: all 0.2s ease;
    padding: var(--spacing-8);
    display: flex;
    align-items: center;
    width: 100%;
    justify-content: center;
    gap: var(--spacing-4);
    margin-bottom: var(--spacing-8);
}
.header-qna-mobile a{
    color: #fff;
    text-decoration: none;
}

/* Mobile hamburger menu improvements */
@media (max-width: 991.98px) {
    /* Hide desktop controls on mobile */
    .header-stats,
    .share-section,
    .language-selector,
    .login-btn,
    .header-qna {
        display: none !important;
    }
    .login-btn.modal-btn{
        display: block !important;
    }
    
    /* Show hamburger menu on mobile */
    .hamburger-btn {
        display: block !important;
    }
    
    /* Mobile widgets styling */
    .mobile-widgets .widget {
        margin-bottom: var(--spacing-12);
        background: white;
        border-radius: 1rem;
        padding: var(--spacing-8);
        border: 1px solid #e5e5e5;
    }
    
    .mobile-widgets .stats-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-6);
    }
    
    .mobile-widgets .stat-box {
        padding: 0.75rem;
        text-align: center;
    }
}

@media (min-width: 992px) {
    /* Hide hamburger menu on desktop */
    .hamburger-btn {
        display: none !important;
    }
    
    /* Hide mobile widgets on desktop */
    .mobile-widgets {
        display: none !important;
    }
}

/* Responsive adjustments for horizontal accordions */
@media (max-width: 768px) {
    .horizontal-accordions-section .accordion-button {
        padding: var(--spacing-8);
    }
    
    .category-accordion-header .category-icon {
        width: 3rem;
        height: 3rem;
        font-size: 2rem;
    }
    
    .category-accordion-header .category-text h4 {
        font-size: 1.25rem;
    }
    
    .horizontal-accordions-section .levels-row {
        gap: var(--grid-gap);
    }
    
    .horizontal-accordions-section .level-item-circle {
        min-width: 100px;
        padding: 0.75rem;
    }
    
    .horizontal-accordions-section .circle-icon {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1.5rem;
    }
}

.heart-icon {
    color: #FF4B4B;
    width: 20px;
    height: 20px;
}
.level-item-circle.locked {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(100%);
}
.level-item-circle.locked:hover {
    transform: none;
    box-shadow: none;
}