/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2ecc71;
    --primary-dark: #27ae60;
    --secondary-color: #3498db;
    --accent-color: #f39c12;
    --danger-color: #e74c3c;
    --success-color: #2ecc71;
    --dark-bg: #1a1a1a;
    --card-bg: #ffffff;
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --border-color: #e0e0e0;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 5px 20px rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Screen Management */
.screen {
    display: none;
    min-height: 100vh;
}

.screen.active {
    display: block;
}

/* Auth Screen */
#auth-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.auth-container {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 40px;
    max-width: 450px;
    width: 100%;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.5s ease;
}

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

.logo-section {
    text-align: center;
    margin-bottom: 30px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
}

.logo i {
    font-size: 48px;
    color: var(--primary-color);
}

.logo h1 {
    font-size: 36px;
    color: var(--primary-color);
    font-weight: 700;
}

.tagline {
    color: var(--text-secondary);
    font-size: 14px;
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.auth-form h2 {
    margin-bottom: 25px;
    color: var(--text-primary);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s;
    font-family: 'Noto Sans KR', sans-serif;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.1);
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Noto Sans KR', sans-serif;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    width: 100%;
    padding: 14px;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    z-index: -1;
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-primary:active {
    transform: translateY(0);
}

.auth-switch {
    text-align: center;
    margin-top: 20px;
    color: var(--text-secondary);
}

.auth-switch a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.auth-switch a:hover {
    text-decoration: underline;
}

/* Dashboard Layout */
#dashboard-screen {
    background: #f5f7fa;
}

.navbar {
    background: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
}

.nav-brand i {
    font-size: 28px;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 20px;
}

.energy-coins {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #f39c12, #f1c40f);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.4);
    animation: coinGlow 2s ease-in-out infinite;
}

@keyframes coinGlow {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(243, 156, 18, 0.4);
    }
    50% {
        box-shadow: 0 4px 20px rgba(243, 156, 18, 0.6);
    }
}

.energy-coins i {
    font-size: 20px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    font-weight: 500;
}

.btn-logout {
    background: var(--danger-color);
    color: white;
    padding: 10px 20px;
}

.btn-logout:hover {
    background: #c0392b;
}

.main-container {
    display: flex;
    min-height: calc(100vh - 70px);
}

.sidebar {
    width: 280px;
    background: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 70px;
    height: calc(100vh - 70px);
    overflow-y: auto;
}

.nav-menu {
    list-style: none;
    padding: 20px 0;
}

.nav-item {
    padding: 15px 30px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
    font-weight: 500;
    position: relative;
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary-color);
    transform: scaleY(0);
    transition: transform 0.3s;
}

.nav-item:hover::before {
    transform: scaleY(1);
}

.nav-item i {
    font-size: 20px;
    width: 25px;
}

.nav-item:hover {
    background: #f5f7fa;
    color: var(--primary-color);
}

.nav-item.active {
    background: linear-gradient(90deg, rgba(46, 204, 113, 0.1), transparent);
    color: var(--primary-color);
    border-left: 4px solid var(--primary-color);
}

.badge {
    background: var(--danger-color);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    margin-left: auto;
}

.content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

.content-section {
    display: none;
    animation: fadeIn 0.3s ease;
}

.content-section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.section-header {
    margin-bottom: 30px;
}

.section-header h1 {
    font-size: 32px;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.section-header h1 i {
    color: var(--primary-color);
    margin-right: 10px;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 16px;
}

/* Home Section */
.welcome-banner {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 40px;
    border-radius: 20px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.welcome-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.welcome-banner h1 {
    font-size: 36px;
    margin-bottom: 10px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: all 0.3s;
    border-left: 4px solid var(--primary-color);
}

.stat-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transition: transform 0.3s;
}

.stat-card:hover::after {
    transform: scaleX(1);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-card i {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.stat-card h3 {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 10px;
    font-weight: 500;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
}

.game-intro h2 {
    font-size: 28px;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.game-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.game-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(46, 204, 113, 0.2), transparent);
    transition: left 0.5s;
}

.game-card:hover::before {
    left: 100%;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border: 2px solid var(--primary-color);
}

.game-card i {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.game-card h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.game-card p {
    color: var(--text-secondary);
    margin-bottom: 15px;
    font-size: 14px;
}

.game-card .reward {
    display: inline-block;
    background: linear-gradient(135deg, #f39c12, #f1c40f);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
}

/* Game Sections */
.game-start {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    max-width: 800px;
    margin: 0 auto;
}

.game-instructions {
    margin-bottom: 30px;
}

.game-instructions h3 {
    font-size: 22px;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.game-instructions ul {
    list-style: none;
    padding: 0;
}

.game-instructions li {
    padding: 10px 0;
    padding-left: 30px;
    position: relative;
    color: var(--text-secondary);
}

.game-instructions li:before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

.reward-table {
    background: #f5f7fa;
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
}

.reward-table h4 {
    margin-bottom: 15px;
    color: var(--text-primary);
}

.reward-table table {
    width: 100%;
    border-collapse: collapse;
}

.reward-table td {
    padding: 10px;
    border-bottom: 1px solid var(--border-color);
}

.reward-table td:last-child {
    text-align: right;
    font-weight: 600;
    color: var(--accent-color);
}

.btn-large {
    padding: 18px 40px;
    font-size: 18px;
}

.game-content {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

/* Quiz Game */
.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.quiz-progress span {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
    display: block;
}

.progress-bar {
    width: 300px;
    height: 10px;
    background: var(--border-color);
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width 0.3s ease;
}

.quiz-timer {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 24px;
    font-weight: 700;
    color: var(--accent-color);
}

.quiz-question {
    background: #f5f7fa;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
}

.quiz-question h3 {
    font-size: 22px;
    color: var(--text-primary);
    line-height: 1.6;
}

.quiz-options {
    display: grid;
    gap: 15px;
}

.quiz-option {
    background: white;
    border: 2px solid var(--border-color);
    padding: 20px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 16px;
    position: relative;
    overflow: hidden;
}

.quiz-option::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: var(--primary-color);
    transform: scaleY(0);
    transition: transform 0.3s;
}

.quiz-option:hover::before {
    transform: scaleY(1);
}

.quiz-option:hover {
    border-color: var(--primary-color);
    background: rgba(46, 204, 113, 0.05);
}

.quiz-option.selected {
    border-color: var(--primary-color);
    background: rgba(46, 204, 113, 0.1);
}

.quiz-option.correct {
    border-color: var(--success-color);
    background: rgba(46, 204, 113, 0.2);
}

.quiz-option.incorrect {
    border-color: var(--danger-color);
    background: rgba(231, 76, 60, 0.2);
}

/* Bike Game */
.bike-container {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    height: 250px;
}

.propeller-icon {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    font-size: 48px;
    color: var(--primary-color);
    z-index: 10;
}

.propeller-icon.spinning {
    animation: spinIcon 1.2s linear infinite;
}

@keyframes spinIcon {
    from {
        transform: translateX(-50%) rotate(0deg);
    }
    to {
        transform: translateX(-50%) rotate(360deg);
    }
}

.propeller {
    width: 120px;
    height: 120px;
    position: relative;
    margin: 0 auto 20px;
    transition: transform 0.3s;
}

.propeller.spinning {
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
        filter: drop-shadow(0 0 10px rgba(46, 204, 113, 0.5));
    }
    to {
        transform: rotate(360deg);
        filter: drop-shadow(0 0 15px rgba(46, 204, 113, 0.8));
    }
}

.blade {
    position: absolute;
    width: 100%;
    height: 10px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--primary-color));
    top: 50%;
    left: 50%;
    transform-origin: center;
    box-shadow: 0 0 10px rgba(46, 204, 113, 0.5);
}

.blade:nth-child(1) {
    transform: translate(-50%, -50%) rotate(0deg);
}

.blade:nth-child(2) {
    transform: translate(-50%, -50%) rotate(60deg);
}

.blade:nth-child(3) {
    transform: translate(-50%, -50%) rotate(120deg);
}

.blade:after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--primary-dark);
    border-radius: 50%;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.bike {
    font-size: 80px;
    color: var(--primary-color);
}

.timer-display {
    text-align: center;
    margin-bottom: 30px;
}

.timer-display h2 {
    font-size: 72px;
    font-weight: 700;
    color: var(--primary-color);
    font-family: 'Courier New', monospace;
}

.timer-display p {
    color: var(--text-secondary);
    font-size: 18px;
}

.game-controls {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.btn-success {
    background: var(--success-color);
    color: white;
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
}

.btn-success:hover:not(:disabled) {
    background: #27ae60;
    box-shadow: 0 6px 20px rgba(46, 204, 113, 0.5);
    transform: translateY(-2px);
}

.btn-danger {
    background: var(--danger-color);
    color: white;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.btn-danger:hover:not(:disabled) {
    background: #c0392b;
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.5);
    transform: translateY(-2px);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Propeller Matching Game */
.propeller-timer {
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 30px;
}

.matching-game {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 30px;
}

.matching-names,
.matching-images {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.match-name,
.match-image {
    padding: 20px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.match-name {
    background: #f5f7fa;
    border: 2px solid var(--border-color);
    font-weight: 600;
    color: var(--text-primary);
}

.match-name:hover,
.match-name.selected {
    border-color: var(--primary-color);
    background: rgba(46, 204, 113, 0.1);
}

.match-image {
    background: white;
    border: 2px solid var(--border-color);
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 10px;
}

.match-image:hover,
.match-image.selected {
    border-color: var(--secondary-color);
    background: rgba(52, 152, 219, 0.1);
}

.match-name.matched,
.match-image.matched {
    border-color: var(--success-color);
    background: rgba(46, 204, 113, 0.2);
    pointer-events: none;
}

.matching-status {
    text-align: center;
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

/* Solar Game */
.solar-timer {
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 20px;
}

#solar-canvas {
    display: block;
    margin: 0 auto;
    background: #e8f5e9;
    border-radius: 15px;
    box-shadow: var(--shadow);
    max-width: 100%;
    height: auto;
}

.solar-controls {
    text-align: center;
    margin-top: 20px;
}

.solar-controls p {
    color: var(--text-secondary);
    margin: 10px 0;
}

/* Game Result */
.game-result {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.result-icon {
    font-size: 80px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.game-result h2 {
    font-size: 32px;
    margin-bottom: 30px;
    color: var(--text-primary);
}

.result-stats {
    background: #f5f7fa;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.result-stats p {
    font-size: 18px;
    margin: 15px 0;
    color: var(--text-secondary);
}

.result-stats span {
    font-weight: 700;
    color: var(--text-primary);
}

.coins-earned {
    color: var(--accent-color) !important;
    font-size: 24px !important;
}

/* Shop */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.product-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    border: 2px solid transparent;
    position: relative;
}

.product-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(46, 204, 113, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.product-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.product-card:hover::after {
    opacity: 1;
}

.product-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
    color: white;
    position: relative;
    overflow: hidden;
}

.product-image::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 60%);
    animation: rotate 10s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.product-info {
    padding: 20px;
}

.product-name {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.product-description {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 15px;
}

.product-price {
    font-size: 24px;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 15px;
}

.product-actions {
    display: flex;
    gap: 10px;
}

.btn-add-cart {
    flex: 1;
    background: var(--primary-color);
    color: white;
}

.btn-add-cart:hover {
    background: var(--primary-dark);
}

/* Cart */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    background: white;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.empty-state i {
    font-size: 80px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.cart-list {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

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

.cart-item-image {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: white;
    flex-shrink: 0;
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text-primary);
}

.cart-item-price {
    color: var(--accent-color);
    font-weight: 700;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 10px;
}

.qty-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--border-color);
    border: none;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.qty-btn:hover {
    background: var(--primary-color);
    color: white;
}

.qty-value {
    font-weight: 600;
    min-width: 30px;
    text-align: center;
}

.cart-item-remove {
    background: var(--danger-color);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

.cart-item-remove:hover {
    background: #c0392b;
}

.cart-summary {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 16px;
}

.summary-row.total {
    border-bottom: none;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    padding-top: 20px;
}

/* Leaderboard */
.leaderboard-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 12px 24px;
    border: 2px solid var(--border-color);
    background: white;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
    font-family: 'Noto Sans KR', sans-serif;
}

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

.tab-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.leaderboard-content {
    background: white;
    border-radius: 15px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
}

.leaderboard-table thead {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
}

.leaderboard-table th,
.leaderboard-table td {
    padding: 15px;
    text-align: left;
}

.leaderboard-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background 0.3s;
}

.leaderboard-table tbody tr:hover {
    background: #f5f7fa;
}

.leaderboard-table .rank {
    font-weight: 700;
    color: var(--primary-color);
}

.leaderboard-table .rank-1 {
    color: #FFD700;
}

.leaderboard-table .rank-2 {
    color: #C0C0C0;
}

.leaderboard-table .rank-3 {
    color: #CD7F32;
}

/* Orders */
.orders-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.order-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: var(--shadow);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.order-id {
    font-weight: 600;
    color: var(--text-primary);
}

.order-date {
    color: var(--text-secondary);
    font-size: 14px;
}

.order-items {
    margin-bottom: 15px;
}

.order-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
}

.order-total {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    padding-top: 15px;
    border-top: 2px solid var(--border-color);
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--primary-color);
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s;
    z-index: 1000;
    border-left: 4px solid rgba(255, 255, 255, 0.5);
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.error {
    background: var(--danger-color);
}

.toast.success {
    background: var(--success-color);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .sidebar {
        width: 220px;
    }

    .nav-item {
        padding: 12px 20px;
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }

    .nav-user {
        flex-wrap: wrap;
        justify-content: center;
    }

    .main-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        top: 0;
    }

    .nav-menu {
        display: flex;
        overflow-x: auto;
        padding: 10px;
    }

    .nav-item {
        white-space: nowrap;
        flex-shrink: 0;
    }

    .content {
        padding: 20px;
    }

    .section-header h1 {
        font-size: 24px;
    }

    .stats-grid,
    .game-cards,
    .products-grid {
        grid-template-columns: 1fr;
    }

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

    .quiz-header {
        flex-direction: column;
        gap: 15px;
    }

    .progress-bar {
        width: 100%;
    }

    #solar-canvas {
        width: 100%;
        height: 400px;
    }
}

@media (max-width: 480px) {
    .auth-container {
        padding: 30px 20px;
    }

    .logo h1 {
        font-size: 28px;
    }

    .welcome-banner h1 {
        font-size: 24px;
    }

    .game-controls {
        flex-direction: column;
    }

    .btn-large {
        width: 100%;
    }
}
