/* =====================
   COMPONENTS - GLASSMORPHISM & UTILITIES
   ===================== */

/* Glassmorphism UI Utils */
.glass-panel {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 24px;
    border: 1px solid var(--bg-glass-border);
    box-shadow: var(--shadow-soft);
}

.squishy {
    transition: transform 0.1s cubic-bezier(0.4, 0, 0.2, 1);
}
.squishy:active {
    transform: scale(0.95) !important;
}

/* XP Bar System */
.xp-bar-container {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    height: 12px;
    overflow: hidden;
    margin-top: 5px;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.xp-bar-fill {
    height: 100%;
    background: var(--xp-color);
    border-radius: 10px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.xp-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 2s infinite;
}

.level-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--level-bg);
    border-radius: 50%;
    font-size: 0.85rem;
    font-weight: 700;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.5);
    margin-right: 5px;
}

/* Game Type Toggle (Dual Mode System) */
.game-type-toggle {
    display: flex;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 25px;
    transform: scale(0.85);
    transform-origin: top center;
    gap: 4px;
}

.game-type-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 20px;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    font-family: 'Fredoka', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.game-type-btn.active {
    background: white;
    color: var(--primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.game-type-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.game-type-btn .mode-icon {
    font-size: 1rem;
}

/* All Mode Specific Styles */
.tile.all-mode .tile-number {
    display: none;
}

.tile.all-mode .tile-icon {
    font-size: 2.2rem;
    margin-bottom: 4px;
}

.tile.all-mode .tile-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Game Mode Tabs */
.mode-tab {
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.8);
    font-family: 'Fredoka', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.mode-tab:hover {
    background: rgba(255, 255, 255, 0.3);
    color: white;
}

.mode-tab.active {
    background: white;
    color: var(--primary);
    border-color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Game Buttons */
.game-btn {
    width: 100%;
    padding: 20px;
    font-size: 1.4rem;
    font-family: 'Fredoka', sans-serif;
    font-weight: 700;
    border: none;
    border-radius: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    transition: all 0.15s;
    box-shadow: 0 6px 0 rgba(0, 0, 0, 0.2);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.game-btn:active {
    transform: translateY(4px);
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.2);
}

.game-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 0 rgba(0, 0, 0, 0.2);
}

.game-btn-start {
    background: linear-gradient(135deg, #00c853, #00e676);
    color: white;
}

.game-btn-load {
    background: linear-gradient(135deg, #ff9800, #ffc107);
    color: #333;
}

.game-btn-admin {
    background: linear-gradient(135deg, #6C5CE7, #a29bfe);
    color: white;
}

/* Player Toggle */
.player-toggle {
    padding: 10px 20px;
    border-radius: 25px;
    border: none;
    font-weight: 700;
    font-family: 'Fredoka', sans-serif;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 3px 0 rgba(0, 0, 0, 0.15);
}

.player-toggle:active {
    transform: translateY(2px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.15);
}

.player-toggle.on {
    background: linear-gradient(135deg, #6C5CE7, #a29bfe);
    color: white;
}

.player-toggle.off {
    background: #dfe6e9;
    color: #636e72;
}

/* Player Name Input */
.player-name-input {
    width: 100%;
    max-width: 140px;
    padding: 8px 12px;
    border: 2px solid #e0e5ff;
    border-radius: 12px;
    font-family: 'Fredoka', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
    color: var(--text-dark);
    background: linear-gradient(135deg, #fff, #f8f7ff);
    transition: all 0.3s ease;
    outline: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.player-name-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.2), 0 4px 10px rgba(108, 92, 231, 0.15);
    background: white;
    transform: scale(1.02);
}

.player-name-input:hover {
    border-color: var(--primary-light);
    background: white;
}

.player-name-input::placeholder {
    color: #b2bec3;
    font-weight: 400;
}

.player-name-input:active {
    transform: scale(0.98);
}

/* Menu Buttons */
.menu-btn {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 8px 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Fredoka', sans-serif;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.menu-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.menu-btn:active {
    transform: translateY(-1px);
}

.menu-btn i {
    font-size: 1.5rem;
    margin-bottom: 2px;
}

.menu-btn span {
    font-weight: 700;
    font-size: 0.75rem;
    color: var(--text-dark);
    text-align: center;
    line-height: 1.1;
}

.menu-btn .menu-badge {
    position: absolute;
    top: 3px;
    right: 3px;
    background: var(--accent);
    color: white;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 0.6rem;
    font-weight: 700;
}

.menu-btn-shop { border-color: #ffe0d6; }
.menu-btn-shop:hover { border-color: #e17055; background: #fff5f2; }
.menu-btn-shop i { color: #e17055; }

.menu-btn-achievement { border-color: #fff3cd; }
.menu-btn-achievement:hover { border-color: #fdcb6e; background: #fffef5; }
.menu-btn-achievement i { color: #fdcb6e; }

.menu-btn-leaderboard { border-color: #d1f2eb; }
.menu-btn-leaderboard:hover { border-color: #00b894; background: #f0fff9; }
.menu-btn-leaderboard i { color: #00b894; }

.menu-btn-help { border-color: #d1ecf1; }
.menu-btn-help:hover { border-color: #0984e3; background: #f0f9ff; }
.menu-btn-help i { color: #0984e3; }

/* HUD Buttons */
.hud-btn {
    background: rgba(255, 255, 255, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: white;
    padding: 8px 12px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    backdrop-filter: blur(4px);
    transition: all 0.3s;
}

.hud-btn:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.05);
}

.hud-btn.admin-btn {
    background: rgba(255, 215, 0, 0.3);
    border-color: rgba(255, 215, 0, 0.6);
}

.hud-btn.admin-btn:hover {
    background: rgba(255, 215, 0, 0.5);
    transform: scale(1.1);
    animation: pulseAdmin 1s infinite;
}

.hud-btn .badge-count {
    background: var(--accent);
    color: white;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 0.7rem;
    margin-left: 5px;
}

/* Action Buttons */
.action-btn {
    padding: 12px;
    border-radius: 12px;
    border: none;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    transition: all 0.2s;
    background: #f1f2f6;
    color: #57606f;
    font-family: 'Fredoka', sans-serif;
    font-size: 0.85rem;
}

.action-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.action-btn.correct { background: #55efc4; color: #006266; }
.action-btn.wrong { background: #ff7675; color: #630a0a; }
.action-btn.pause { background: #fdcb6e; color: #5d4037; }
.action-btn.voice { background: #74b9ff; color: #003566; }
.action-btn.skip { background: #a29bfe; color: #2d3436; }

/* Modal Close Button */
.modal-close {
    background: #f1f2f6;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    color: #636e72;
    transition: all 0.3s;
}

.modal-close:hover {
    background: var(--danger);
    color: white;
}

/* Avatar Selection Styles */
.av-opt {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    cursor: pointer;
    transition: all 0.2s;
    border: 3px solid transparent;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.av-opt:hover {
    transform: scale(1.1);
    border-color: var(--primary);
    box-shadow: 0 6px 20px rgba(108, 92, 231, 0.3);
}

.av-opt.selected {
    border-color: var(--gold);
    background: linear-gradient(135deg, #fff9e6, #fff3cd);
}

.av-opt.locked {
    opacity: 0.5;
    cursor: not-allowed;
}

.av-opt.locked:hover {
    transform: none;
    border-color: transparent;
}

/* Save Indicator */
.save-indicator {
    position: fixed;
    top: 10px;
    right: 10px;
    background: rgba(0, 184, 148, 0.9);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    display: none;
    align-items: center;
    gap: 8px;
    z-index: 5000;
}

.save-indicator.show {
    display: flex;
    animation: fadeInOut 2s ease forwards;
}

/* ============================================
   GAME SUMMARY SAVE METHOD TOGGLE STYLES
   ============================================ */

/* Setting Item Styles */
.setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 10px;
}

.setting-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: #333;
    flex: 1;
    min-width: 200px;
}

.setting-label i {
    font-size: 1.2rem;
    color: #667eea;
}

.setting-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.setting-desc {
    width: 100%;
    font-size: 0.8rem;
    color: #666;
    margin-top: 5px;
    padding-left: 35px;
}

/* Toggle Button for Save Method */
.toggle-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.4);
}

.toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.5);
}

.toggle-btn:active {
    transform: translateY(0);
}

.toggle-icon {
    font-size: 1.1rem;
}

.toggle-text {
    font-size: 0.85rem;
}

/* Switch Toggle for Auto Save */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .slider {
    background: linear-gradient(135deg, #00b894 0%, #00cec9 100%);
}

input:checked + .slider:before {
    transform: translateX(24px);
}

/* Game Settings Content */
.game-settings-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
