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

html {
    /* Prevent pull-to-refresh on mobile */
    overscroll-behavior: none;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #000000;
    color: #eee;
    min-height: 100vh;
    /* Safe area for notched phones */
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
    /* Prevent text selection on interactive elements */
    -webkit-tap-highlight-color: transparent;
}

#app {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    padding-top: 90px; /* Space for fixed header */
}

/* Site Header */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 75px;
    background: linear-gradient(135deg, #000000 0%, #0a0a0a 100%);
    border-bottom: 1px solid #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 1000;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: transform 0.2s;
}

.header-logo:hover {
    transform: scale(1.05);
}

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

.logo-text {
    font-size: 1.5rem;
    font-weight: bold;
    color: #00d4ff;
}

.header-level {
    position: relative;
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
}

.header-level:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
}

.header-level .xp-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.header-avatar {
    font-size: 1.5rem;
    z-index: 1;
}

.header-level-text {
    font-size: 0.7rem;
    color: #fff;
    margin-top: 2px;
    z-index: 1;
}

/* White mode for site header */
body.white-mode .site-header {
    background: linear-gradient(135deg, #fff 0%, #f5f5f5 100%);
    border-bottom-color: #ddd;
}

body.white-mode .logo-text {
    color: #000000;
}

body.white-mode .header-level {
    background: rgba(0, 0, 0, 0.05);
}

body.white-mode .header-level:hover {
    background: rgba(0, 0, 0, 0.1);
}

body.white-mode .header-level-text {
    color: #000000;
}

/* Global Home Button - hidden, replaced by site header */
.global-home-btn {
    display: none;
}

/* XP Notification */
.xp-notification {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #00d4ff, #00ff88);
    color: #000000;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 1.2rem;
    font-weight: bold;
    z-index: 9999;
    animation: xpPopIn 0.3s ease-out;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.4);
}

@keyframes xpPopIn {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px) scale(0.8);
    }
    100% {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }
}

/* Level Up Notification */
.level-up-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    color: #000000;
    padding: 24px 48px;
    border-radius: 30px;
    font-size: 2rem;
    font-weight: bold;
    z-index: 10000;
    animation: levelUpAnimation 0.5s ease-out;
    box-shadow: 0 8px 30px rgba(255, 215, 0, 0.5);
    text-align: center;
    display: flex;
    align-items: center;
    gap: 12px;
}

.level-up-text {
    font-size: 2rem;
}

.level-up-number {
    font-size: 3rem;
    display: inline-block;
    min-width: 60px;
}

.level-up-number.animating {
    animation: numberChange 0.5s ease-out;
}

@keyframes levelUpAnimation {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.3);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes numberChange {
    0% {
        transform: scale(1.5) translateY(-20px);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
    }
    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

/* Confetti */
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.confetti {
    position: absolute;
    top: -10px;
    width: 10px;
    height: 10px;
    animation: confettiFall 3s ease-out forwards;
}

.confetti:nth-child(odd) {
    border-radius: 50%;
}

.confetti:nth-child(even) {
    border-radius: 2px;
    transform: rotate(45deg);
}

@keyframes confettiFall {
    0% {
        top: -10px;
        opacity: 1;
        transform: translateX(0) rotate(0deg);
    }
    25% {
        transform: translateX(50px) rotate(180deg);
    }
    50% {
        transform: translateX(-30px) rotate(360deg);
    }
    75% {
        transform: translateX(40px) rotate(540deg);
    }
    100% {
        top: 100vh;
        opacity: 0;
        transform: translateX(-20px) rotate(720deg);
    }
}

/* Menu View */
.menu-view {
    min-height: calc(100vh - 75px);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px;
    position: relative;
}

/* Menu Settings Button */
.menu-settings-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 55px;
    height: 45px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
    z-index: 100;
}

.menu-settings-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.menu-settings-btn .settings-icon {
    font-size: 1.4rem;
    color: #fff;
}

.menu-settings-btn:hover .settings-icon {
    color: #ffffff;
}

.menu-circle {
    position: absolute;
    top: 16px;
    left: 16px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
}

.menu-circle .xp-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.menu-circle:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
}

.xp-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: rotate(90deg);
}

.xp-ring-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.3);
    stroke-width: 6;
    stroke-linecap: round;
}

.xp-ring-progress {
    fill: none;
    stroke: #00d4ff;
    stroke-width: 6;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.3s ease;
}

.menu-avatar {
    font-size: 38px;
    line-height: 1;
    margin-top: -5px;
    z-index: 1;
}

.menu-level {
    font-size: 11px;
    color: #fff;
    margin-top: 2px;
    z-index: 1;
}

.menu-view .menu-header {
    margin-top: auto;
}

.menu-view .menu-grid {
    margin-bottom: auto;
}

.menu-header {
    text-align: center;
    margin-bottom: 50px;
}

.menu-header h1 {
    font-size: 3rem;
    color: #00d4ff;
    margin-bottom: 15px;
    text-shadow: 0 0 30px rgba(0, 212, 255, 0.3);
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    max-width: 900px;
    width: 100%;
}

.menu-card {
    background: linear-gradient(145deg, #1a1a1a, #121212);
    border-radius: 16px;
    padding: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.menu-card:hover:not(.disabled) {
    transform: translateY(-5px);
    border-color: #ffffff;
    box-shadow: 0 10px 40px rgba(255, 255, 255, 0.2);
}

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

.menu-card-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.menu-card h2 {
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 10px;
}

.menu-card p {
    color: #888;
    font-size: 0.95rem;
    line-height: 1.5;
}

.menu-card-arrow {
    display: none;
}

/* Selection View */
.selection-view header {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

.selection-view header .back-btn {
    position: absolute;
    left: 0;
    top: 0;
}

.selection-view h1 {
    font-size: 2.5rem;
    color: #00d4ff;
    margin-bottom: 10px;
}

.red-arrow {
    color: #ff0000;
}

.tagline {
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.subtitle {
    color: #888;
    font-size: 1.1rem;
}

/* Controls */
.controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
}

.trainer-btn {
    background: linear-gradient(135deg, #00d4ff, #00ff88);
    color: #000000;
    border: none;
    padding: 15px 40px;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.trainer-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 212, 255, 0.4);
}

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

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

.quick-actions button {
    background: #1a1a1a;
    color: #aaa;
    border: 1px solid #444;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
}

.quick-actions button:hover {
    background: #2a2a2a;
    color: #fff;
}

/* Subsets */
.subsets {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.subset {
    background: #1a1a1a;
    border-radius: 10px;
    overflow: hidden;
}

.subset-header {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    cursor: pointer;
    transition: background 0.2s;
}

.subset-header:hover {
    background: #2a2a2a;
}

.subset-header h2 {
    font-size: 1.2rem;
    color: #00d4ff;
    margin-right: 15px;
}

.subset-count {
    color: #888;
    font-size: 0.9rem;
    margin-right: auto;
}

.subset-toggle {
    background: #000000;
    color: #00d4ff;
    border: 1px solid #00d4ff;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    margin-right: 15px;
    transition: all 0.2s;
}

.subset-toggle:hover {
    background: #00d4ff;
    color: #000000;
}

.expand-icon {
    color: #666;
    font-size: 0.8rem;
}

.cases-container {
    background: #000000;
    padding: 10px 15px 15px;
}

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

.case-group:last-child {
    margin-bottom: 0;
}

.group-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 5px;
    border-bottom: 1px solid #2a2a2a;
    margin-bottom: 12px;
}

.group-header h3 {
    color: #00ff88;
    font-size: 1rem;
    font-weight: 600;
}

.group-count {
    color: #666;
    font-size: 0.85rem;
}

.group-select-btn {
    margin-left: auto;
    background: transparent;
    color: #888;
    border: 1px solid #444;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.group-select-btn:hover {
    color: #00d4ff;
    border-color: #00d4ff;
}

.cases {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 10px;
}

.case {
    background: #1a1a1a;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
}

.case:hover {
    background: #2a2a2a;
}

.case.selected {
    background: #00d4ff22;
    border-color: #00d4ff;
}

.case-image {
    width: 70px;
    height: 70px;
    border-radius: 6px;
    background: #000000;
    object-fit: contain;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.case-image[src=""],
.case-image:not([src]) {
    background: #333;
}

.case-checkbox {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 2px solid #555;
    background: #000000;
    transition: all 0.2s;
}

.case-checkbox.checked {
    background: #00d4ff;
    border-color: #00d4ff;
}

.case-checkbox.checked::after {
    content: '✓';
    display: block;
    color: #000000;
    font-size: 12px;
    text-align: center;
    line-height: 16px;
    font-weight: bold;
}

.case-name {
    font-size: 0.85rem;
    color: #ccc;
}

.case-alg {
    font-size: 0.75rem;
    color: #aaa;
    word-break: break-all;
    line-height: 1.3;
    max-width: 100%;
    padding: 4px 6px;
    text-align: center;
    display: block;
}

.case.selected .case-name {
    color: #00d4ff;
}

.case.selected .case-alg {
    color: #00a8cc;
}

/* Trainer View */
.trainer-view {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.back-btn {
    background: transparent;
    color: #888;
    border: 1px solid #444;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    margin-bottom: 20px;
    transition: all 0.2s;
    align-self: flex-start;
}

.back-btn:hover {
    color: #fff;
    border-color: #666;
}

/* Cross Trainer View */
.cross-trainer-view {
    position: fixed;
    top: 75px;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow: hidden;
    background: #000000;
}

.cross-trainer-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
}

.cross-trainer-container h1 {
    font-size: 2rem;
    margin-bottom: 40px;
    color: #fff;
}

.cross-scramble {
    background: #1a1a1a;
    padding: 30px 50px;
    border-radius: 12px;
    margin-bottom: 40px;
}

.cross-scramble .scramble {
    font-size: 1.8rem;
    font-family: 'Courier New', monospace;
    color: #fff;
    letter-spacing: 2px;
}

.cross-optimal {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 40px;
}

.optimal-label {
    font-size: 1.2rem;
    color: #888;
}

.optimal-solution {
    font-size: 2rem;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    color: #00ff88;
    letter-spacing: 2px;
}

.cross-face {
    color: #ffaa00;
    margin-right: 10px;
}

.cross-hint {
    color: #666;
    font-size: 1.1rem;
}

/* Two-Sided PLL Styles */
.twosided-pll-image {
    margin-bottom: 40px;
}

.twosided-pll-image img {
    width: 200px;
    height: 200px;
}

.pll-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 30px;
    max-width: 300px;
}

.pll-option-btn {
    padding: 20px 30px;
    font-size: 1.4rem;
    font-weight: bold;
    background: #1a1a1a;
    color: #fff;
    border: 2px solid #444;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.pll-option-btn:hover {
    background: #2a2a2a;
    border-color: #00d4ff;
}

.pll-result {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.result-feedback {
    font-size: 1.8rem;
    font-weight: bold;
    padding: 10px 30px;
    border-radius: 8px;
}

.result-feedback.correct {
    color: #00ff88;
    background: rgba(0, 255, 136, 0.1);
}

.result-feedback.wrong {
    color: #ff4466;
    background: rgba(255, 68, 102, 0.1);
}

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

.pll-name {
    font-size: 2.5rem;
    font-weight: bold;
    color: #00d4ff;
    display: block;
    margin-bottom: 10px;
}

.pll-alg {
    font-size: 1.2rem;
    font-family: 'Courier New', monospace;
    color: #aaa;
}

.pll-progress {
    font-size: 1.2rem;
    color: #888;
    margin-bottom: 30px;
}

.quiz-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin: 40px 0;
}

.score-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: bold;
    border: 6px solid;
}

.score-circle.score-great {
    color: #00ff88;
    border-color: #00ff88;
    background: rgba(0, 255, 136, 0.1);
}

.score-circle.score-good {
    color: #ffaa00;
    border-color: #ffaa00;
    background: rgba(255, 170, 0, 0.1);
}

.score-circle.score-okay {
    color: #ff4466;
    border-color: #ff4466;
    background: rgba(255, 68, 102, 0.1);
}

.score-detail {
    font-size: 1.3rem;
    color: #aaa;
}

/* Standalone Timer View */
.timer-view {
    position: fixed;
    top: 75px;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #000000;
}

.timer-layout {
    display: flex;
    flex: 1;
    padding: 0 20px;
    justify-content: center;
    align-items: center;
}

.stats-sidebar {
    position: fixed;
    right: 75px;
    top: 100px;
    width: 280px;
    background: #1a1a1a;
    border-radius: 12px;
    padding: 20px;
    max-height: 300px;
}

.stats-sidebar .stats-header {
    text-align: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #333;
}

.stats-sidebar .stats-header h3 {
    color: #fff;
    font-size: 1rem;
    margin: 0;
}

.stats-sidebar .clear-times-btn {
    background: transparent;
    border: 1px solid #ff6b6b;
    color: #ff6b6b;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    cursor: pointer;
}

.stats-sidebar .clear-times-btn:hover {
    background: #ff6b6b;
    color: #fff;
}

.stats-sidebar .stats-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stats-sidebar .stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid #333;
    background: transparent;
}

.stats-sidebar .stat-label {
    color: #888;
    font-size: 0.85rem;
}

.stats-sidebar .stat-value {
    color: #fff;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.9rem;
}

.stats-sidebar .stat-value.best {
    color: #00ff88;
}

.times-sidebar {
    position: fixed;
    right: 75px;
    top: 405px;
    width: 280px;
    background: #1a1a1a;
    border-radius: 12px;
    padding: 16px;
    max-height: calc(100vh - 445px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.times-sidebar h4 {
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #333;
}

.times-sidebar .timer-times-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.times-sidebar .timer-times-list::-webkit-scrollbar {
    display: none;
}

.times-sidebar .timer-time-entry {
    padding: 8px 10px;
    background: #1a1a1a;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.times-sidebar .timer-time-entry:nth-child(5) {
    margin-bottom: 15px;
}

.times-sidebar .timer-time-entry:hover {
    background: #2a2a2a;
}

.times-sidebar .time-entry-main {
    display: flex;
    align-items: center;
    gap: 8px;
}

.times-sidebar .time-index {
    color: #666;
    font-size: 0.85rem;
    min-width: 28px;
}

.times-sidebar .time-ao5 {
    color: #fff;
    font-size: 0.85rem;
    font-family: 'Roboto Mono', monospace;
    flex: 1;
    text-align: center;
}

.times-sidebar .time-value {
    flex: 1;
    color: #fff;
    font-family: 'Roboto Mono', monospace;
    text-align: right;
}

.times-sidebar .time-value.is-best {
    color: #00ff88;
}

.times-sidebar .time-value.ao5-best {
    color: #00ff88;
}

.times-sidebar .time-value.ao5-worst {
    color: #ff4444;
}

.times-sidebar .time-value.is-dnf {
    color: #ff6b6b;
}

.times-sidebar .delete-time-btn {
    background: transparent;
    border: none;
    color: #666;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0 4px;
    opacity: 1;
    transition: all 0.2s;
}

.times-sidebar .delete-time-btn:hover {
    color: #ff6b6b;
}

.times-sidebar .time-entry-scramble {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #333;
    font-size: 0.8rem;
}

.times-sidebar .scramble-detail-label {
    color: #666;
}

.times-sidebar .scramble-detail-text {
    color: #aaa;
    display: block;
    margin-top: 4px;
    word-break: break-all;
}

.timer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.timer-header .back-btn {
    margin-bottom: 0;
}

.settings-btn {
    position: fixed;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    padding: 0;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.settings-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.settings-icon {
    font-size: 1.4rem;
    color: #fff;
}

.settings-btn:hover .settings-icon {
    color: #00d4ff;
}

/* Inline Settings Button (Round) */
.settings-btn-inline {
    background: #1a1a1a;
    border: 1px solid #444;
    border-radius: 50%;
    width: 46px;
    height: 46px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
}

.settings-btn-inline:hover {
    border-color: #00d4ff;
}

.settings-btn-inline:hover .settings-icon {
    color: #00d4ff;
}

.timer-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    max-width: 700px;
    width: 100%;
}

.timer-title {
    font-size: 3.5rem;
    color: #fff;
    margin: 0 0 50px 0;
    font-weight: 600;
}

/* Timer Selectors Container */
.timer-selectors {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
    width: 100%;
}

/* Top Row: Pinned Sessions */
.pinned-sessions-row {
    display: flex;
    width: 100%;
    gap: 8px;
}

/* Bottom Row: Controls */
.controls-row {
    display: flex;
    justify-content: center;
    gap: 12px;
}

/* Mobile Statistics Button - hidden on desktop */
.mobile-stats-btn {
    display: none;
}

/* Mobile Statistics Modal */
.mobile-stats-modal .stats-modal {
    background: #000000;
    border-radius: 16px;
    padding: 25px;
    max-width: 400px;
    width: 90%;
    position: relative;
}

.mobile-stats-modal .stats-modal h2 {
    color: #fff;
    text-align: center;
    margin-bottom: 20px;
}

.mobile-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.mobile-stats-grid .stat-item {
    background: #1a1a1a;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
}

.mobile-stats-grid .stat-label {
    display: block;
    color: #888;
    font-size: 0.8rem;
    margin-bottom: 5px;
}

.mobile-stats-grid .stat-value {
    color: #fff;
    font-size: 1.2rem;
    font-weight: bold;
}

.mobile-stats-grid .stat-value.best {
    color: #00ff88;
}

.no-stats-message {
    text-align: center;
    color: #888;
    padding: 30px;
}

/* Mobile Times Section */
.mobile-times-section {
    margin-top: 20px;
    border-top: 1px solid #2a2a2a;
    padding-top: 20px;
}

.mobile-times-section h3 {
    color: #fff;
    font-size: 1rem;
    margin-bottom: 12px;
}

.mobile-times-list {
    max-height: 200px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mobile-time-entry {
    display: flex;
    align-items: center;
    background: #1a1a1a;
    padding: 10px 12px;
    border-radius: 8px;
}

.mobile-time-entry .time-index {
    color: #666;
    font-size: 0.85rem;
    min-width: 35px;
}

.mobile-time-entry .time-value {
    flex: 1;
    color: #fff;
    font-family: 'Courier New', monospace;
    font-weight: bold;
}

.mobile-time-entry .time-value.is-best {
    color: #00ff88;
}

.mobile-time-entry .time-value.is-dnf {
    color: #ff4444;
}

.mobile-time-entry .dnf-time-btn {
    background: transparent;
    border: 1px solid #666;
    border-radius: 4px;
    color: #666;
    font-size: 0.75rem;
    cursor: pointer;
    padding: 4px 8px;
    margin-right: 8px;
}

.mobile-time-entry .dnf-time-btn.active {
    background: #ff4444;
    border-color: #ff4444;
    color: #fff;
}

.mobile-time-entry .delete-time-btn {
    background: transparent;
    border: none;
    color: #666;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0 5px;
}

.mobile-time-entry .delete-time-btn:hover {
    color: #ff6b6b;
}

/* White mode for mobile times */
body.white-mode .mobile-times-section {
    border-top-color: #ddd;
}

body.white-mode .mobile-times-section h3 {
    color: #000000;
}

body.white-mode .mobile-time-entry {
    background: #f5f5f5;
}

body.white-mode .mobile-time-entry .time-value {
    color: #000000;
}

body.white-mode .mobile-time-entry .time-value.is-best {
    color: #00aa55;
}

/* White mode for mobile stats modal */
body.white-mode .mobile-stats-modal .stats-modal {
    background: #fff;
}

body.white-mode .mobile-stats-modal .stats-modal h2 {
    color: #000000;
}

body.white-mode .mobile-stats-grid .stat-item {
    background: #f5f5f5;
}

body.white-mode .mobile-stats-grid .stat-label {
    color: #666;
}

body.white-mode .mobile-stats-grid .stat-value {
    color: #000000;
}

body.white-mode .mobile-stats-grid .stat-value.best {
    color: #00aa55;
}

/* Session Selector */
.session-selector {
    position: relative;
    display: flex;
    gap: 0;
}

.pinned-session-btn {
    flex: 1;
    background: #1a1a1a;
    border: 1px solid #444;
    padding: 10px 14px;
    color: #fff;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: all 0.3s ease;
    min-width: 46px;
    border-radius: 23px;
    margin-right: 8px;
}

.pinned-session-btn:hover {
    background: #2a2a2a;
}

/* Active pinned session is 75% bigger */
.pinned-session-btn.active {
    flex: 1.75;
    background: #00d4ff22;
    border-color: #00d4ff;
}


.pinned-session-name {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
    color: #fff;
}

.pinned-session-count {
    color: #888;
    font-size: 0.8rem;
}

body.white-mode .pinned-session-name {
    color: #000000;
}

body.white-mode .pinned-session-count {
    color: #666;
}

/* Unpinned Session Label */
.unpinned-session-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 10px 14px;
    background: #2a2a2a;
    border: 2px dashed #00d4ff;
    border-radius: 23px;
    margin-right: 8px;
    flex: 1;
}

.unpinned-session-name {
    font-weight: 500;
    color: #00d4ff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

.unpinned-session-count {
    color: #888;
    font-size: 0.8rem;
}

body.white-mode .unpinned-session-label {
    background: #f0f0f0;
    border-color: #000000;
}

body.white-mode .unpinned-session-name {
    color: #000000;
}

/* Session Menu Button (Round) */
.session-menu-btn {
    background: #1a1a1a;
    border: 1px solid #444;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    width: 46px;
    height: 46px;
    margin-left: 8px;
}

.session-menu-btn:hover {
    background: #2a2a2a;
    border-color: #ffffff;
}

.session-menu-icon {
    font-size: 1.2rem;
}

/* Legacy styles kept for compatibility */
.session-current {
    width: 100%;
    background: #1a1a1a;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 12px 16px;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.session-current:hover {
    border-color: #00d4ff;
}

.session-current .session-name {
    flex: 1;
    text-align: left;
    font-weight: 500;
}

.session-current .session-count {
    color: #888;
    font-size: 0.85rem;
}

.session-current .session-arrow {
    color: #666;
    font-size: 0.7rem;
}

.session-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 250px;
    background: #1a1a1a;
    border: 1px solid #444;
    border-radius: 8px;
    margin-top: 4px;
    overflow: hidden;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.session-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid #2a2a2a;
    transition: background 0.2s;
}

.session-item:last-of-type {
    border-bottom: none;
}

.session-item:hover {
    background: #2a2a2a;
}

.session-item.active {
    background: #00d4ff22;
}

.session-item-content {
    flex: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.session-item-name {
    color: #fff;
    font-size: 0.95rem;
}

.session-item.active .session-item-name {
    color: #00d4ff;
}

.session-item-count {
    color: #666;
    font-size: 0.8rem;
}

body.white-mode .session-item-name {
    color: #000000;
}

body.white-mode .session-item.active .session-item-name {
    color: #000000;
    font-weight: 600;
}

body.white-mode .session-item-count {
    color: #666;
}

body.white-mode .session-item {
    border-color: #ddd;
}

body.white-mode .session-item:hover {
    background: #f0f0f0;
}

body.white-mode .session-add-btn {
    color: #000000;
    border-color: #ddd;
}

body.white-mode .session-add-btn:hover {
    background: #f0f0f0;
}

.session-name-input {
    flex: 1;
    min-width: 0;
    width: 100%;
    background: #000000;
    border: 2px solid #00d4ff;
    border-radius: 4px;
    padding: 8px 10px;
    color: #fff;
    font-size: 0.95rem;
    outline: none;
}

body.white-mode .session-name-input {
    background: #fff;
    border-color: #000000;
    color: #000000;
}

.session-item-actions {
    display: flex;
    gap: 4px;
}

.session-pin-btn,
.session-edit-btn,
.session-clear-btn,
.session-delete-btn {
    background: transparent;
    border: none;
    color: #666;
    font-size: 1rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.session-pin-btn:hover {
    background: #ffd70022;
}

.session-edit-btn:hover {
    color: #00d4ff;
    background: #00d4ff22;
}

.session-clear-btn:hover {
    color: #ffaa00;
    background: #ffaa0022;
}

.session-delete-btn:hover {
    color: #ff6b6b;
    background: #ff6b6b22;
}

.session-item.pinned {
    background: #ffd70011;
}

.session-add-btn {
    width: 100%;
    background: transparent;
    border: none;
    border-top: 1px solid #2a2a2a;
    color: #00d4ff;
    padding: 12px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s;
}

.session-add-btn:hover {
    background: #00d4ff22;
}

/* Event Selector */
.event-selector {
    position: relative;
    display: flex;
    margin-left: 8px;
}

.event-current {
    background: #1a1a1a;
    border: 1px solid #444;
    border-radius: 50%;
    width: 46px;
    height: 46px;
    color: #fff;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.event-current:hover {
    border-color: #00d4ff;
}

.event-icon {
    font-weight: 600;
    color: #00d4ff;
}

.event-arrow {
    display: none;
}

.event-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: #1a1a1a;
    border: 1px solid #444;
    border-radius: 8px;
    margin-top: 4px;
    overflow: hidden;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    min-width: 150px;
}

.event-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid #2a2a2a;
    transition: background 0.2s;
}

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

.event-item:hover {
    background: #2a2a2a;
}

.event-item.active {
    background: #00d4ff22;
}

.event-item-icon {
    color: #00d4ff;
    font-weight: 600;
    min-width: 40px;
}

.event-item-name {
    color: #ccc;
    font-size: 0.9rem;
}

.event-item.active .event-item-name {
    color: #00d4ff;
}

/* Settings Modal */
.settings-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.settings-modal {
    background: #1a1a1a;
    border-radius: 12px;
    width: 100%;
    max-width: 400px;
    animation: modalIn 0.2s ease-out;
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #2a2a2a;
}

.settings-header h2 {
    color: #00d4ff;
    font-size: 1.3rem;
    margin: 0;
}

.settings-close {
    background: none;
    border: none;
    color: #888;
    font-size: 1.8rem;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}

.settings-close:hover {
    color: #fff;
}

.settings-content {
    padding: 25px;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.setting-label {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.setting-name {
    color: #fff;
    font-weight: 500;
}

.setting-description {
    color: #666;
    font-size: 0.85rem;
}

.setting-options {
    display: flex;
    gap: 4px;
    background: #000000;
    padding: 4px;
    border-radius: 8px;
}

.setting-option {
    background: transparent;
    border: none;
    color: #888;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.setting-option:hover {
    color: #fff;
}

.setting-option.active {
    background: #00d4ff;
    color: #000000;
    font-weight: 500;
}

.setting-input {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ao-size-input {
    width: 80px;
    padding: 10px 12px;
    background: #000000;
    border: 1px solid #444;
    border-radius: 6px;
    color: #fff;
    font-size: 1rem;
    text-align: center;
}

.ao-size-input:focus {
    outline: none;
    border-color: #00d4ff;
}

.ao-size-label {
    color: #00d4ff;
    font-weight: 500;
    font-size: 1rem;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #444;
    transition: 0.3s;
    border-radius: 26px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: #fff;
    transition: 0.3s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: #00d4ff;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

/* Theme Switcher */
.theme-switcher {
    display: flex;
    align-items: stretch;
    border-radius: 12px;
    overflow: hidden;
    margin-top: 10px;
    background: linear-gradient(to right, #000000 0%, #000000 25%, #f5f5f5 75%, #f5f5f5 100%);
}

.theme-side {
    flex: 1;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-dark {
    color: #fff;
}

.theme-light {
    color: #000000;
}

.theme-label {
    font-weight: 600;
    font-size: 1rem;
}

.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
}

.theme-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.theme-toggle-slider {
    position: relative;
    width: 50px;
    height: 26px;
    background: #444;
    border-radius: 26px;
    cursor: pointer;
    transition: 0.3s;
}

.theme-toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: #fff;
    transition: 0.3s;
    border-radius: 50%;
}

.theme-toggle input:checked + .theme-toggle-slider {
    background: #aaa;
}

.theme-toggle input:checked + .theme-toggle-slider:before {
    transform: translateX(24px);
}

/* White Mode Theme */
body.white-mode {
    background-color: #f5f5f5;
    color: #000000;
}

body.white-mode #app {
    color: #000000;
}

body.white-mode .menu-view,
body.white-mode .timer-view,
body.white-mode .pll-trainer-view,
body.white-mode .oll-trainer-view,
body.white-mode .multiplayer-view,
body.white-mode .multiplayer-setup-view,
body.white-mode .multiplayer-game-view,
body.white-mode .streak-view,
body.white-mode .virtual-cube-view,
body.white-mode .cross-trainer-view {
    background: #f5f5f5;
}

/* Streak Challenge White Mode */
body.white-mode .streak-view {
    background: #f5f5f5 !important;
}

body.white-mode .streak-content {
    background: transparent;
}

body.white-mode .streak-event-btn {
    background: #fff;
    border-color: #ff6b35;
    color: #000000;
}

body.white-mode .streak-event-btn:hover {
    background: #f0f0f0;
}

body.white-mode .streak-event-menu {
    background: #fff;
    border-color: #ddd;
}

body.white-mode .streak-event-option {
    color: #000000;
}

body.white-mode .streak-event-option:hover {
    background: #f0f0f0;
}

body.white-mode .streak-scramble {
    background: #fff !important;
    border: 1px solid #ddd;
}

body.white-mode .streak-scramble .scramble {
    color: #000000 !important;
    background: #fff !important;
}

body.white-mode .streak-time-box {
    background: #fff;
    border: 1px solid #ddd;
}

body.white-mode .streak-time-box .time-value {
    color: #000000;
}

body.white-mode .streak-time-box.beat-this {
    background: #f0fff4;
    border-color: #4ade80;
}

body.white-mode .streak-timer-section {
    background: #fff;
    border-radius: 10px;
}

body.white-mode .streak-timer {
    color: #000000;
}

body.white-mode .streak-instructions {
    color: #666;
}

body.white-mode .streak-message {
    color: #000000;
}

/* 2-Side PLL White Mode */
body.white-mode .cross-trainer-container h1 {
    color: #000000;
}

body.white-mode .cross-scramble {
    background: #fff;
    border: 1px solid #ddd;
}

body.white-mode .cross-scramble .scramble {
    color: #000000;
}

body.white-mode .optimal-label {
    color: #666;
}

body.white-mode .optimal-solution {
    color: #00aa55;
}

body.white-mode .cross-hint {
    color: #888;
}

body.white-mode .pll-option-btn {
    background: #fff;
    border-color: #ccc;
    color: #000000;
}

body.white-mode .pll-option-btn:hover {
    background: #eee;
    border-color: #000000;
}

body.white-mode .pll-name {
    color: #000000;
}

body.white-mode .pll-alg {
    color: #666;
}

/* Multiplayer White Mode */
body.white-mode .multiplayer-header h1,
body.white-mode .setup-section h2 {
    color: #000000;
}

body.white-mode .player-count-btn,
body.white-mode .mode-btn,
body.white-mode .format-btn {
    background: #fff;
    border-color: #ccc;
    color: #000000;
}

body.white-mode .player-count-btn:hover,
body.white-mode .mode-btn:hover,
body.white-mode .format-btn:hover {
    background: #eee;
    border-color: #000000;
}

body.white-mode .player-count-btn.active,
body.white-mode .mode-btn.active,
body.white-mode .format-btn.active {
    background: rgba(0, 0, 0, 0.1);
    border-color: #000000;
}

body.white-mode .multiplayer-scramble-bar {
    background: #fff;
    border-color: #ddd;
}

body.white-mode .multiplayer-scramble-bar .scramble-label {
    color: #666;
}

body.white-mode .multiplayer-scramble-bar .scramble-text {
    color: #000000;
}

body.white-mode .player-panel {
    background: #fff;
    border-color: #ddd;
}

body.white-mode .player-label {
    color: #000000;
}

body.white-mode .player-timer {
    color: #000000;
}

body.white-mode .player-stats {
    color: #666;
}

body.white-mode .multiplayer-exit-btn {
    color: #000000;
    border-color: #ccc;
}

body.white-mode .multiplayer-exit-btn:hover {
    background: #eee;
}

/* Virtual Cube White Mode */
body.white-mode .virtual-cube-view h1 {
    color: #000000;
}

body.white-mode .view-btn {
    background: rgba(0, 0, 0, 0.1);
    border-color: #ccc;
    color: #000000;
}

body.white-mode .view-btn:hover {
    background: rgba(0, 0, 0, 0.2);
    border-color: #000000;
}

body.white-mode .move-btn {
    background: #fff;
    border-color: #ccc;
    color: #000000;
}

body.white-mode .move-btn:hover {
    background: #eee;
    border-color: #000000;
}

body.white-mode .move-btn:active {
    background: #ddd;
}

body.white-mode .move-history {
    background: #fff;
    border: 1px solid #ddd;
}

body.white-mode .move-history h3 {
    color: #000000;
}

body.white-mode .moves-display {
    color: #000000;
}

body.white-mode .cube-buttons .btn {
    background: #fff;
    border-color: #ccc;
    color: #000000;
}

body.white-mode .cube-buttons .btn:hover {
    background: #eee;
    border-color: #000000;
}

body.white-mode .menu-card {
    background: #fff;
    border-color: #ddd;
    color: #000000;
}

body.white-mode .menu-card:hover {
    border-color: #000000;
}

body.white-mode .menu-card h2,
body.white-mode .menu-card p {
    color: #000000;
}

body.white-mode .menu-header h1,
body.white-mode .timer-title {
    color: #000000;
}

body.white-mode .tagline {
    color: #666;
}

body.white-mode .session-menu,
body.white-mode .event-menu {
    background: #fff;
    border-color: #ddd;
}

body.white-mode .scramble-text {
    color: #000000;
}

body.white-mode .pinned-session-btn,
body.white-mode .session-menu-btn,
body.white-mode .event-current,
body.white-mode .settings-btn-inline {
    background: #fff;
    border-color: #ddd;
    color: #000000;
}

body.white-mode .pinned-session-btn:hover,
body.white-mode .session-menu-btn:hover,
body.white-mode .event-current:hover,
body.white-mode .settings-btn-inline:hover {
    border-color: #000000;
}

body.white-mode .pinned-session-btn.active {
    background: #e0f7ff;
    border-color: #000000;
}

body.white-mode .timer-display-section {
    background: #f5f5f5;
}

body.white-mode .timer-display-section:active {
    background: #e0e0e0;
}

body.white-mode .timer-display {
    color: #000000;
}

body.white-mode .stats-section,
body.white-mode .solves-section {
    background: #fff;
    border-color: #ddd;
}

body.white-mode .stat-value,
body.white-mode .stat-label {
    color: #000000;
}

body.white-mode .stat-value.best {
    color: #00aa55;
}

body.white-mode .solve-item {
    background: #f9f9f9;
    border-color: #ddd;
    color: #000000;
}

/* Stats and Times Sidebar White Mode */
body.white-mode .stats-sidebar,
body.white-mode .times-sidebar {
    background: #fff;
    border-color: #ddd;
}

body.white-mode .stats-sidebar .stat-item {
    border-color: #eee;
}

body.white-mode .stats-sidebar .stat-label {
    color: #666;
}

body.white-mode .stats-sidebar .stat-value {
    color: #000000;
}

body.white-mode .stats-sidebar .stat-value.best {
    color: #00aa55;
}

body.white-mode .times-sidebar h4 {
    color: #000000;
}

body.white-mode .time-entry {
    background: #f5f5f5;
    border-color: #ddd;
}

body.white-mode .time-entry:hover {
    background: #eee;
}

body.white-mode .time-entry .solve-index {
    color: #888;
}

body.white-mode .time-entry .solve-time {
    color: #000000;
}

body.white-mode .time-entry .solve-time.best {
    color: #00aa55;
}

body.white-mode .time-entry-scramble {
    border-color: #ddd;
    color: #666;
}

body.white-mode .scramble-detail-label {
    color: #888;
}

body.white-mode .scramble-detail-text {
    color: #000000;
}

body.white-mode .stat-item {
    background: #f5f5f5;
}

body.white-mode .times-list-section h4 {
    color: #000000;
}

body.white-mode .delete-time-btn {
    color: #cc0000;
}

body.white-mode .delete-time-btn:hover {
    background: rgba(204, 0, 0, 0.1);
}

/* Timer times list white mode */
body.white-mode .timer-times-list {
    background: #fff;
}

body.white-mode .timer-time-entry {
    background: #f5f5f5;
}

body.white-mode .timer-time-entry:hover,
body.white-mode .timer-time-entry.expanded {
    background: #eee;
}

body.white-mode .time-index {
    color: #888;
}

body.white-mode .timer-time-entry .time-value {
    color: #000000;
}

body.white-mode .timer-time-entry .time-value.is-best {
    color: #00aa55;
}

body.white-mode .timer-time-entry .time-value.is-dnf {
    color: #cc0000;
}

body.white-mode .stats-header h3 {
    color: #000000;
}

body.white-mode .stat-item {
    background: #f5f5f5;
}

/* Penalty buttons white mode */
body.white-mode .penalty-btn {
    background: #f5f5f5;
    border-color: #ccc;
    color: #666;
}

body.white-mode .penalty-btn:hover {
    background: #e0e0e0;
    color: #000000;
    border-color: #999;
}

body.white-mode .modal,
body.white-mode .settings-modal {
    background: #fff;
    color: #000000;
}

body.white-mode .setting-item {
    border-color: #eee;
}

body.white-mode .setting-name {
    color: #000000;
}

body.white-mode .setting-description {
    color: #666;
}

body.white-mode .global-home-btn,
body.white-mode .menu-settings-btn {
    background: rgba(0, 0, 0, 0.05);
    border-color: #ddd;
    color: #000000;
}

body.white-mode .menu-circle {
    background: #fff;
    border: 1px solid #ddd;
}

body.white-mode .menu-circle:hover {
    background: #f5f5f5;
    border-color: #000000;
}

body.white-mode .menu-level,
body.white-mode .settings-icon {
    color: #000000;
}

body.white-mode .menu-avatar {
    color: #000000;
}

body.white-mode .xp-ring-bg {
    stroke: rgba(0, 0, 0, 0.15);
}

body.white-mode .xp-ring-progress {
    stroke: #000000;
}

body.white-mode .profile-modal {
    background: #fff;
    color: #000000;
}

body.white-mode .profile-header h2 {
    color: #000000;
}

body.white-mode .profile-stats {
    background: #f5f5f5;
}

body.white-mode .stat-item .stat-value,
body.white-mode .stat-item .stat-label {
    color: #000000;
}

body.white-mode .quest-item {
    background: #f5f5f5;
    color: #000000;
}

body.white-mode .quest-text {
    color: #000000;
}

body.white-mode .quest-xp {
    color: #000000;
}

body.white-mode .quest-count {
    background: rgba(0, 0, 0, 0.1);
    color: #000000;
}

body.white-mode .profile-xp-text {
    color: #000000;
}

body.white-mode .section-title {
    color: #000000;
}

body.white-mode .xp-bar {
    background: rgba(0, 0, 0, 0.15);
}

body.white-mode .xp-bar-fill {
    background: linear-gradient(90deg, #000000, #444);
}

body.white-mode .xp-text {
    color: #666;
}

/* Algorithm Trainers White Mode */
body.white-mode .cases-container {
    background: #f5f5f5;
}

body.white-mode .case {
    background: #fff;
    border-color: #ddd;
}

body.white-mode .case:hover {
    background: #f0f0f0;
    border-color: #000000;
}

body.white-mode .case.selected {
    background: #e0f7ff;
    border-color: #000000;
}

body.white-mode .case-name {
    color: #000000;
}

body.white-mode .case-image {
    background: #eee;
}

body.white-mode .group-header {
    color: #000000;
}

body.white-mode .modal {
    background: #fff;
    color: #000000;
}

body.white-mode .modal h2,
body.white-mode .modal h3 {
    color: #000000;
}

body.white-mode .alg-item {
    background: #f5f5f5;
    color: #000000;
}

body.white-mode .trainer-view {
    background: #f5f5f5;
}

body.white-mode .setup-scramble {
    background: #fff;
    color: #000000;
}

body.white-mode .trainer-timer {
    color: #000000;
}

body.white-mode .trainer-view .timer {
    color: #000000;
}

body.white-mode .back-btn {
    background: #fff;
    border-color: #ddd;
    color: #000000;
}

body.white-mode .back-btn:hover {
    background: #f0f0f0;
    border-color: #000000;
}

body.white-mode .trainer-btn {
    background: linear-gradient(135deg, #000000, #444);
    color: #fff;
}

body.white-mode .trainer-btn:hover:not(:disabled) {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

body.white-mode .subset {
    background: #fff;
}

body.white-mode .subset-header {
    color: #000000;
}

body.white-mode .subset-header:hover {
    background: #f0f0f0;
}

body.white-mode .subset-header h2 {
    color: #000000;
}

body.white-mode .subset-toggle {
    background: #fff;
    color: #000000;
    border-color: #000000;
}

body.white-mode .subset-toggle:hover {
    background: #000000;
    color: #fff;
}

body.white-mode .selection-view h1 {
    color: #000000;
}

/* Typing Input Mode */
.typing-input-section {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px;
}

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

.time-input {
    background: #1a1a1a;
    border: 2px solid #444;
    border-radius: 12px;
    padding: 20px 30px;
    font-size: 3rem;
    font-family: 'Courier New', monospace;
    color: #fff;
    text-align: center;
    width: 280px;
    outline: none;
    transition: border-color 0.2s;
}

.time-input:focus {
    border-color: #00d4ff;
}

.time-input::placeholder {
    color: #555;
}

.submit-time-btn {
    background: linear-gradient(135deg, #00d4ff, #00ff88);
    color: #000000;
    border: none;
    padding: 20px 30px;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.submit-time-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 212, 255, 0.4);
}

.typing-hint {
    color: #666;
    font-size: 0.95rem;
}

.typing-hint kbd {
    background: #1a1a1a;
    padding: 4px 10px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: #00d4ff;
}

.scramble-section {
    width: 100%;
    padding: 20px;
    margin-bottom: 40px;
}

.scramble-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.scramble-label {
    color: #666;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.new-scramble-btn {
    background: transparent;
    border: 1px solid #444;
    color: #888;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s;
}

.new-scramble-btn:hover {
    background: #2a2a2a;
    color: #00d4ff;
    border-color: #00d4ff;
}

.scramble-text {
    font-family: 'Courier New', monospace;
    font-size: 1.4rem;
    color: #fff;
    letter-spacing: 2px;
    line-height: 1.6;
    text-align: center;
    max-width: 450px;
    margin: 0 auto;
}

.timer-display-section {
    text-align: center;
    margin-bottom: 40px;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    -ms-user-select: none;
    padding: 20px;
    border-radius: 16px;
    transition: background 0.2s;
    /* Prevent scrolling while holding */
    touch-action: manipulation;
}

.timer-display-section:active {
    background: #1a1a1a;
}

.timer-display {
    font-size: 8rem;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: #fff;
    margin-bottom: 20px;
    transition: color 0.2s;
    user-select: none;
}

.timer-display.timer-holding {
    color: #ff6b6b;
}

.timer-display.timer-ready {
    color: #00ff88;
}

.timer-display.timer-running {
    color: #00d4ff;
}

.penalty-buttons {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
}

.penalty-btn {
    background: #1a1a1a;
    border: 2px solid #444;
    color: #888;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
}

.penalty-btn:hover {
    background: #2a2a2a;
    color: #fff;
    border-color: #666;
}

.penalty-btn.active {
    background: #ff6b6b;
    border-color: #ff6b6b;
    color: #fff;
}

.penalty-btn.dnf.active {
    background: #ff4444;
    border-color: #ff4444;
}

.timer-hold-progress {
    width: 300px;
    height: 6px;
    background: #1a1a1a;
    border-radius: 3px;
    margin: 0 auto 20px;
    overflow: hidden;
}

.timer-hold-bar {
    height: 100%;
    background: linear-gradient(90deg, #ff6b6b, #00ff88);
    transition: width 0.05s linear;
}

.timer-instruction {
    color: #666;
    font-size: 1rem;
}

.timer-instruction kbd {
    background: #1a1a1a;
    padding: 4px 12px;
    border-radius: 4px;
    font-family: inherit;
    color: #00d4ff;
}

/* Inspection styles */
.inspection-display {
    text-align: center;
    padding: 20px;
}

.inspection-time {
    font-size: 10rem;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: #00ff88;
    transition: color 0.3s;
}

.inspection-display.inspection-warning .inspection-time {
    color: #ffaa00;
}

.inspection-display.inspection-danger .inspection-time {
    color: #ff6b6b;
}

.inspection-display.inspection-penalty .inspection-time {
    color: #ff0000;
    animation: blink 0.5s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.inspection-hint {
    color: #888;
    font-size: 1.2rem;
    margin-top: 20px;
}

.penalty-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ff6b6b;
    color: #fff;
    padding: 5px 15px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1.2rem;
}

.timer-stats-panel {
    width: 100%;
    background: #1a1a1a;
    border-radius: 12px;
    padding: 25px;
}

.stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.stats-header h3 {
    color: #ffffff;
    font-size: 1.1rem;
}

.clear-times-btn {
    background: transparent;
    border: 1px solid #ff6b6b;
    color: #ff6b6b;
    padding: 6px 14px;
    border-radius: 5px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.clear-times-btn:hover {
    background: #ff6b6b;
    color: #000000;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.stat-item {
    background: #000000;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.stat-label {
    display: block;
    color: #666;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.stat-value {
    font-family: 'Courier New', monospace;
    font-size: 1.3rem;
    color: #fff;
}

.stat-value.best {
    color: #00ff88;
}

.times-list-section h4 {
    color: #888;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.timer-times-list {
    max-height: 300px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.timer-time-entry {
    display: flex;
    flex-direction: column;
    padding: 12px 15px;
    background: #000000;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.timer-time-entry:hover {
    background: #252545;
}

.timer-time-entry.expanded {
    background: #252545;
}

.time-entry-main {
    display: flex;
    align-items: center;
    gap: 12px;
}

.time-index {
    color: #666;
    font-size: 0.9rem;
    min-width: 30px;
}

.timer-time-entry .time-value {
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    color: #fff;
    flex: 1;
}

.timer-time-entry .time-value.is-best {
    color: #00ff88;
}

.timer-time-entry .time-value.is-dnf {
    color: #ff4444;
}

.timer-time-entry .penalty-indicator {
    position: static;
    background: none;
    padding: 0;
    color: #ffaa00;
    font-size: 0.9rem;
    font-weight: bold;
    margin-left: 8px;
}

.delete-time-btn {
    background: transparent;
    border: none;
    color: #666;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 0 5px;
    transition: color 0.2s;
}

.delete-time-btn:hover {
    color: #ff6b6b;
}

.time-entry-scramble {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #2a2a2a;
}

.scramble-detail-label {
    display: block;
    color: #666;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.scramble-detail-text {
    display: block;
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    color: #00d4ff;
    line-height: 1.5;
}

/* Timer menu card highlight */
.menu-card.timer-card {
    border: 1px solid #00d4ff33;
}

.trainer-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 50px;
}

.case-info {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.case-info .case-subset {
    background: #00d4ff;
    color: #000000;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: bold;
}

.case-info .case-name {
    color: #888;
    font-size: 1.1rem;
}

.trainer-case-image {
    margin-bottom: 25px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.trainer-case-image img,
.trainer-case-image > div {
    border-radius: 10px;
    background: #1a1a1a;
    padding: 10px;
    box-sizing: content-box;
}

.setup-scramble {
    text-align: center;
    margin-bottom: 50px;
}

.setup-scramble h2 {
    color: #666;
    font-size: 1rem;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.scramble {
    font-size: 1.8rem;
    font-family: 'Courier New', monospace;
    color: #fff;
    background: #1a1a1a;
    padding: 20px 40px;
    border-radius: 10px;
    letter-spacing: 2px;
}

.timer-section {
    text-align: center;
    margin-bottom: 40px;
}

.timer {
    font-size: 6rem;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: #fff;
    margin-bottom: 20px;
    transition: color 0.2s;
}

.timer.timer-ready {
    color: #00ff88;
}

.timer.timer-running {
    color: #00d4ff;
}

.timer.timer-holding {
    color: #ff6b6b;
}

/* Case reveal section */
.case-reveal {
    text-align: center;
    margin-bottom: 30px;
    width: 100%;
    max-width: 400px;
}

.reveal-btn {
    background: linear-gradient(135deg, #00d4ff, #00ff88);
    color: #000000;
    border: none;
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.reveal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 212, 255, 0.4);
}

.revealed-case {
    background: #1a1a1a;
    border-radius: 12px;
    padding: 25px;
    animation: fadeIn 0.3s ease-out;
}

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

.revealed-case .case-info {
    justify-content: center;
    margin-bottom: 20px;
}

.revealed-case .trainer-case-image {
    margin-bottom: 20px;
}

.revealed-case .trainer-case-image img {
    width: 140px;
    height: 140px;
}

.algorithm-section {
    background: #000000;
    border-radius: 8px;
    padding: 15px;
}

.algorithm-section h3 {
    color: #666;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.algorithm {
    font-family: 'Courier New', monospace;
    font-size: 1.2rem;
    color: #00d4ff;
    letter-spacing: 1px;
}

.next-case-btn {
    background: #00d4ff;
    color: #000000;
    border: none;
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.next-case-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 212, 255, 0.4);
}

.trainer-timer-touch {
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    touch-action: manipulation;
    padding: 30px;
    border-radius: 16px;
    transition: background 0.2s;
}

.trainer-timer-touch:active {
    background: #1a1a1a;
}

.hold-progress {
    width: 200px;
    height: 6px;
    background: #1a1a1a;
    border-radius: 3px;
    margin: 0 auto 20px;
    overflow: hidden;
}

.hold-bar {
    height: 100%;
    background: linear-gradient(90deg, #00d4ff, #00ff88);
    transition: width 0.05s linear;
}

.timer-hint {
    color: #666;
    font-size: 1rem;
}

.timer-hint kbd {
    background: #1a1a1a;
    padding: 3px 10px;
    border-radius: 4px;
    font-family: inherit;
    color: #00d4ff;
}

/* Times List */
.times-list {
    width: 100%;
    max-width: 500px;
    background: #1a1a1a;
    border-radius: 10px;
    padding: 20px;
}

.times-list h3 {
    color: #888;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.times {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
}

.time-entry {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #000000;
    border-radius: 5px;
}

.time-value {
    font-family: 'Courier New', monospace;
    font-size: 1.2rem;
    color: #00d4ff;
}

.time-case {
    color: #666;
    font-size: 0.85rem;
}

.stats {
    display: flex;
    gap: 30px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #444;
}

.stats p {
    color: #888;
    font-family: 'Courier New', monospace;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    overflow-x: hidden;
    overflow-y: auto;
}

.modal {
    background: #1a1a1a;
    border-radius: 15px;
    max-width: 400px;
    width: 100%;
    position: relative;
    animation: modalIn 0.2s ease-out;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    color: #888;
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}

.modal-close:hover {
    color: #fff;
}

.modal-content {
    padding: 30px;
    text-align: center;
}

.modal-image {
    width: 180px;
    height: 180px;
    margin-bottom: 20px;
    border-radius: 10px;
    background: transparent;
    padding: 10px;
}

.modal-title {
    color: #00d4ff;
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.modal-algorithms {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.modal-algorithm {
    background: #000000;
    border-radius: 10px;
    padding: 15px;
    flex: 1;
}

.modal-algorithm h3 {
    color: #666;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.algorithm-text {
    font-family: 'Courier New', monospace;
    font-size: 1.2rem;
    color: #fff;
    letter-spacing: 1px;
}

.modal-select-btn {
    background: #000000;
    color: #00d4ff;
    border: 2px solid #00d4ff;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
}

.modal-select-btn:hover {
    background: #00d4ff22;
}

.modal-select-btn.selected {
    background: #00d4ff;
    color: #000000;
}

/* Responsive */
@media (max-width: 768px) {
    .menu-header h1 {
        font-size: 2rem;
    }

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

    .menu-card {
        padding: 15px 20px;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 15px;
        height: 85px;
    }

    .menu-card-icon {
        font-size: 2rem;
        margin-bottom: 0;
    }

    .menu-card-content {
        flex: 1;
    }

    .menu-card h2 {
        font-size: 1.1rem;
        margin-bottom: 3px;
    }

    .menu-card p {
        font-size: 0.75rem;
        margin: 0;
        line-height: 1.3;
    }

    .menu-card-arrow {
        position: static;
        opacity: 1;
        font-size: 1.2rem;
    }

    .selection-view {
        padding-top: 20px;
    }

    .selection-view header .back-btn {
        position: relative;
        margin-bottom: 20px;
    }

    .selection-view h1 {
        font-size: 1.8rem;
    }

    .cases {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    .case-image {
        width: 65px;
        height: 65px;
    }

    .trainer-case-image img {
        width: 140px;
        height: 140px;
    }

    .scramble {
        font-size: 1.2rem;
        padding: 15px 20px;
    }

    .timer {
        font-size: 4rem;
    }

    /* Timer responsive */
    .timer-display {
        font-size: 4rem;
    }

    .scramble-text {
        font-size: 1.1rem;
    }

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

    .timer-hold-progress {
        width: 200px;
    }

    .timer-selectors {
        flex-direction: column;
        max-width: 100%;
    }

    .event-menu {
        right: auto;
        left: 0;
    }

    .setting-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .time-input {
        font-size: 2rem;
        padding: 15px 20px;
        width: 200px;
    }

    .submit-time-btn {
        padding: 15px 20px;
        font-size: 1rem;
    }

    .subset-header {
        flex-wrap: wrap;
        gap: 10px;
    }

    .subset-toggle {
        margin-right: 0;
    }

    .modal-image {
        width: 140px;
        height: 140px;
    }

    .algorithm-text {
        font-size: 1rem;
    }
}

/* Small phones */
@media (max-width: 480px) {
    #app {
        padding: 10px;
        padding-top: 90px;
    }

    .menu-header h1 {
        font-size: 1.6rem;
    }

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

    .menu-card {
        padding: 20px;
    }

    .menu-card-icon {
        font-size: 2rem;
    }

    .menu-card h2 {
        font-size: 1.2rem;
    }

    .menu-card p {
        font-size: 0.85rem;
    }

    /* Timer mobile */
    .timer-layout {
        flex-direction: column;
        padding: 0 10px;
    }

    .stats-sidebar {
        position: static;
        width: 100%;
        max-height: none;
        margin-bottom: 20px;
        left: auto;
        top: auto;
    }

    .times-sidebar {
        position: static;
        width: 100%;
        max-height: 300px;
        margin-top: 20px;
        right: auto;
        top: auto;
    }

    .timer-header {
        margin-bottom: 15px;
    }

    .back-btn {
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    .settings-btn {
        padding: 8px 12px;
    }

    .settings-icon {
        font-size: 1.1rem;
    }

    .timer-main {
        padding: 10px;
        margin-left: 0;
    }

    .timer-selectors {
        gap: 8px;
        margin-bottom: 15px;
    }

    .pinned-sessions-row {
        width: 100%;
    }

    .pinned-session-btn {
        flex: 1;
        min-width: 0;
    }

    .controls-row {
        justify-content: center;
    }

    .mobile-stats-btn {
        display: block;
        width: 100%;
        padding: 12px;
        background: #1a1a1a;
        border: 1px solid #444;
        border-radius: 10px;
        color: #fff;
        font-size: 1rem;
        cursor: pointer;
        transition: all 0.2s;
    }

    .mobile-stats-btn:hover {
        background: #2a2a2a;
        border-color: #00d4ff;
    }

    body.white-mode .mobile-stats-btn {
        background: #f5f5f5;
        border-color: #ccc;
        color: #000000;
    }

    body.white-mode .mobile-stats-btn:hover {
        background: #e0e0e0;
        border-color: #000000;
    }

    /* Hide desktop stats and times sidebars on mobile */
    .stats-sidebar,
    .times-sidebar {
        display: none !important;
    }

    .session-current,
    .event-current {
        padding: 10px 12px;
        font-size: 0.9rem;
    }

    .scramble-section {
        padding: 15px;
        margin-bottom: 25px;
    }

    .scramble-text {
        font-size: 0.95rem;
        letter-spacing: 1px;
        line-height: 1.8;
    }

    .timer-display {
        font-size: 3rem;
        margin-bottom: 15px;
    }

    .timer-display-section {
        padding: 15px;
        margin-bottom: 25px;
    }

    .timer-hold-progress {
        width: 150px;
    }

    .timer-instruction {
        font-size: 0.85rem;
    }

    /* Typing mode mobile */
    .typing-input-section {
        padding: 15px;
        margin-bottom: 25px;
    }

    .typing-form {
        flex-direction: column;
        gap: 10px;
    }

    .time-input {
        width: 100%;
        font-size: 2.5rem;
        padding: 15px;
    }

    .submit-time-btn {
        width: 100%;
        padding: 15px;
    }

    .typing-hint {
        font-size: 0.85rem;
    }

    /* Stats mobile */
    .timer-stats-panel {
        padding: 15px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .stat-item {
        padding: 12px;
    }

    .stat-label {
        font-size: 0.7rem;
    }

    .stat-value {
        font-size: 1.1rem;
    }

    .timer-times-list {
        max-height: 250px;
    }

    .timer-time-entry {
        padding: 10px 12px;
    }

    .timer-time-entry .time-value {
        font-size: 1rem;
    }

    /* Session menu mobile */
    .session-menu,
    .event-menu {
        max-height: 300px;
        overflow-y: auto;
    }

    .session-item {
        padding: 12px;
    }

    .session-edit-btn,
    .session-clear-btn,
    .session-delete-btn {
        padding: 6px 10px;
        font-size: 1.1rem;
    }

    /* Settings modal mobile */
    .settings-modal {
        margin: 10px;
        max-height: 90vh;
        overflow-y: auto;
    }

    .settings-header {
        padding: 15px;
    }

    .settings-header h2 {
        font-size: 1.1rem;
    }

    .settings-content {
        padding: 15px;
    }

    .setting-options {
        width: 100%;
    }

    .setting-option {
        flex: 1;
        padding: 10px 12px;
    }

    /* Trainer mobile */
    .trainer-container {
        padding-top: 20px;
    }

    .case-info {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .trainer-case-image img {
        width: 120px;
        height: 120px;
    }

    .scramble {
        font-size: 1rem;
        padding: 12px 15px;
    }

    .timer {
        font-size: 3rem;
    }

    .trainer-timer-touch {
        padding: 20px;
    }

    .case-reveal {
        max-width: 100%;
    }

    .reveal-btn {
        padding: 12px 30px;
        font-size: 1rem;
    }

    .revealed-case {
        padding: 20px;
    }

    .revealed-case .trainer-case-image img {
        width: 100px;
        height: 100px;
    }

    .algorithm {
        font-size: 1rem;
    }

    .next-case-btn {
        padding: 12px 25px;
        font-size: 0.95rem;
        width: 100%;
    }

    /* Selection view mobile */
    .selection-view h1 {
        font-size: 1.5rem;
    }

    .subtitle {
        font-size: 0.95rem;
    }

    .controls {
        gap: 10px;
    }

    .trainer-btn {
        padding: 12px 25px;
        font-size: 1rem;
    }

    .quick-actions button {
        padding: 6px 12px;
        font-size: 0.85rem;
    }

    .subset-header {
        padding: 12px 15px;
    }

    .subset-header h2 {
        font-size: 1rem;
    }

    .subset-toggle {
        padding: 4px 10px;
        font-size: 0.75rem;
    }

    .cases {
        grid-template-columns: repeat(auto-fill, minmax(85px, 1fr));
        gap: 8px;
    }

    .case {
        padding: 8px;
    }

    .case-image {
        width: 55px;
        height: 55px;
    }

    .case-name {
        font-size: 0.75rem;
    }

    .case-checkbox {
        width: 18px;
        height: 18px;
        top: 5px;
        right: 5px;
    }

    /* Modal mobile */
    .modal {
        margin: 10px;
        max-height: 90vh;
        overflow-y: auto;
    }

    .modal-content {
        padding: 20px;
    }

    .modal-image {
        width: 120px;
        height: 120px;
    }

    .modal-title {
        font-size: 1.2rem;
    }

    .modal-algorithms {
        flex-direction: column;
        gap: 10px;
    }

    .modal-algorithm {
        padding: 15px;
    }

    .algorithm-text {
        font-size: 0.9rem;
    }

    .modal-select-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    /* Increase touch targets */
    .back-btn,
    .settings-btn,
    .session-current,
    .event-current,
    .new-scramble-btn {
        min-height: 44px;
    }

    .session-item,
    .event-item {
        min-height: 48px;
    }

    .session-edit-btn,
    .session-clear-btn,
    .session-delete-btn {
        min-width: 44px;
        min-height: 44px;
    }

    .delete-time-btn {
        min-width: 40px;
        min-height: 40px;
        font-size: 1.5rem;
    }

    /* Better tap feedback */
    .menu-card:active,
    .case:active,
    .session-item:active,
    .event-item:active {
        transform: scale(0.98);
    }

    .timer-display-section:active {
        background: #1a1a1a;
    }
}

/* ==================== */
/* Virtual Cube Styles  */
/* ==================== */

.virtual-cube-view {
    position: fixed;
    top: 75px;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow: hidden;
    background: linear-gradient(135deg, #000000 0%, #0a0a0a 100%);
}

.virtual-cube-view header {
    text-align: center;
    margin-bottom: 30px;
}

.virtual-cube-view h1 {
    font-size: 2rem;
    margin: 15px 0 10px;
}

.virtual-cube-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

/* 3D Cube - 7cm x 7cm x 7cm */
.cube-3d-wrapper {
    perspective: 800px;
    perspective-origin: 50% 50%;
    width: 7cm;
    height: 7cm;
    margin: 50px auto;
    cursor: grab;
    user-select: none;
}

.cube-3d-wrapper:active {
    cursor: grabbing;
}

.cube-3d {
    width: 7cm;
    height: 7cm;
    position: relative;
    transform-style: preserve-3d;
}

.cube-face-3d {
    position: absolute;
    width: 7cm;
    height: 7cm;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3px;
    padding: 3px;
    background: #111;
    backface-visibility: visible;
}

.sticker-3d {
    border-radius: 4px;
    border: 1px solid #000;
}

.face-front {
    transform: translateZ(3.5cm);
}

.face-back {
    transform: rotateY(180deg) translateZ(3.5cm);
}

.face-right {
    transform: rotateY(90deg) translateZ(3.5cm);
}

.face-left {
    transform: rotateY(-90deg) translateZ(3.5cm);
}

.face-top {
    transform: rotateX(90deg) translateZ(3.5cm);
}

.face-bottom {
    transform: rotateX(-90deg) translateZ(3.5cm);
}

.cube-controls {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.view-rotation-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.view-btn {
    width: 44px;
    height: 44px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.view-btn:hover {
    background: rgba(0, 212, 255, 0.3);
    border-color: #00d4ff;
}

.view-btn:active {
    transform: scale(0.95);
}

.move-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.move-row {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.move-btn {
    width: 50px;
    height: 44px;
    background: #1a1a1a;
    border: 1px solid #444;
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.move-btn:hover {
    background: #2a2a2a;
    border-color: #00d4ff;
}

.move-btn:active {
    transform: scale(0.95);
    background: #00d4ff33;
}

.move-history {
    background: #1a1a1a;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    min-width: 300px;
}

.move-history h3 {
    margin: 0 0 10px;
    color: #00d4ff;
}

.moves-display {
    font-family: monospace;
    font-size: 1.1rem;
    color: #fff;
    word-wrap: break-word;
    max-width: 400px;
}

.cube-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.cube-buttons button {
    background: linear-gradient(135deg, #00d4ff, #00ff88);
    color: #000000;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.cube-buttons button:hover {
    transform: scale(1.05);
}

/* ==================== */
/* Multiplayer Styles   */
/* ==================== */

/* Multiplayer Setup View */
.multiplayer-setup-view {
    position: fixed;
    top: 75px;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow: hidden;
    background: linear-gradient(135deg, #000000 0%, #0a0a0a 100%);
}

.multiplayer-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 50px;
}

.multiplayer-header h1 {
    color: #fff;
    font-size: 2.5rem;
    margin: 0;
}

.multiplayer-setup-content {
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
}

.setup-section {
    margin-bottom: 40px;
}

.setup-section h2 {
    color: #fff;
    font-size: 1.4rem;
    margin-bottom: 20px;
    text-align: center;
}

.player-count-selector,
.mode-selector,
.format-selector {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.player-count-btn,
.mode-btn,
.format-btn {
    flex: 1;
    min-width: 120px;
    max-width: 150px;
    padding: 35px 15px;
    background: #1a1a1a;
    border: 2px solid #2a2a2a;
    border-radius: 16px;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.player-count-btn:hover,
.mode-btn:hover,
.format-btn:hover {
    border-color: #00d4ff;
    background: #2a2a2a;
}

.player-count-btn.active,
.mode-btn.active,
.format-btn.active {
    border-color: #00d4ff;
    background: rgba(0, 212, 255, 0.2);
}

.count-icon {
    display: block;
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.count-label,
.mode-label,
.format-label {
    display: block;
    font-size: 1.3rem;
    font-weight: bold;
}

.mode-desc,
.format-desc {
    display: block;
    font-size: 0.9rem;
    color: #888;
    margin-top: 8px;
}

.start-multiplayer-btn {
    width: 100%;
    max-width: 300px;
    padding: 20px;
    font-size: 1.3rem;
    font-weight: bold;
    background: linear-gradient(135deg, #00d4ff, #00ff88);
    color: #000000;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    margin: 40px auto 0 auto;
    display: block;
    transition: transform 0.2s, box-shadow 0.2s;
}

.start-multiplayer-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.3);
}

/* Multiplayer Game View */
.multiplayer-game-view {
    position: fixed;
    top: 75px;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    background: #000000;
    overflow: hidden;
}

.multiplayer-scramble-bar {
    padding: 15px 20px;
    background: #1a1a1a;
    text-align: center;
    flex-shrink: 0;
}

.multiplayer-scramble-bar .scramble-label {
    color: #888;
    margin-right: 10px;
}

.multiplayer-scramble-bar .scramble-text {
    font-family: 'Courier New', monospace;
    color: #fff;
    font-size: 1rem;
    letter-spacing: 1px;
}

.multiplayer-scramble-bar.scramble-middle {
    flex-shrink: 0;
    padding: 10px 20px;
    border-top: 1px solid #2a2a2a;
    border-bottom: 1px solid #2a2a2a;
}

.multiplayer-arena {
    flex: 1;
    display: flex;
    overflow: hidden;
}

/* 2 Player Layout - Horizontal split (top/bottom) */
.multiplayer-2 {
    flex-direction: column;
}

.player-panel-2 {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    transition: background 0.2s;
}

.player-panel-2:first-child {
    border-bottom: 2px solid #2a2a2a;
}

/* 4 Player Layout */
.multiplayer-4 {
    flex-wrap: wrap;
}

.player-panel-4 {
    width: 50%;
    height: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px;
    box-sizing: border-box;
    border: 1px solid #2a2a2a;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    transition: background 0.2s;
}

/* Player Panel States */
.player-panel {
    background: #000000;
}

.player-panel.player-holding {
    background: rgba(255, 107, 107, 0.1);
}

.player-panel.player-ready {
    background: rgba(0, 255, 136, 0.1);
}

.player-panel.player-running {
    background: rgba(0, 212, 255, 0.1);
}

.player-panel.player-finished {
    background: rgba(255, 215, 0, 0.1);
}

.player-label {
    font-size: 1.5rem;
    color: #888;
    margin-bottom: 10px;
}

.player-timer {
    font-size: 4rem;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: #fff;
    transition: color 0.2s;
}

.player-panel-4 .player-timer {
    font-size: 2.5rem;
}

.player-holding .player-timer {
    color: #ff6b6b;
}

.player-ready .player-timer {
    color: #00ff88;
}

.player-running .player-timer {
    color: #00d4ff;
}

.player-progress {
    width: 80%;
    max-width: 200px;
    height: 6px;
    background: #1a1a1a;
    border-radius: 3px;
    margin: 15px 0;
    overflow: hidden;
}

.player-progress .progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #ff6b6b, #00ff88);
    transition: width 0.05s linear;
}

.player-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 15px;
}

.stat-row {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
}

.stat-name {
    color: #888;
    font-size: 1rem;
}

.stat-value {
    color: #fff;
    font-size: 1.2rem;
    font-weight: bold;
    font-family: 'Courier New', monospace;
}

.stat-value.is-winning {
    color: #00ff88;
}

.player-stats-compact {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.stat-compact {
    color: #aaa;
    font-size: 0.9rem;
    font-family: 'Courier New', monospace;
}

.stat-compact.is-winning {
    color: #00ff88;
    font-weight: bold;
}

.player-solve-count {
    font-size: 1rem;
    color: #666;
    margin-top: 10px;
}

.multiplayer-exit-btn {
    position: fixed;
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    background: rgba(255, 107, 107, 0.8);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 100;
}

/* Multiplayer Mobile Adjustments */
@media (max-width: 768px) {
    .player-timer {
        font-size: 3rem;
    }

    .player-panel-4 .player-timer {
        font-size: 2rem;
    }

    .player-label {
        font-size: 1.2rem;
    }

    .multiplayer-scramble-bar .scramble-text {
        font-size: 0.85rem;
    }
}

/* Streak Challenge View */
.streak-view {
    position: fixed;
    top: 75px;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    overflow-y: auto;
    background: #000000;
}

.streak-view header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.streak-view header h1 {
    color: #ff6b35;
    font-size: 2rem;
}

.streak-event-selector {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    position: relative;
}

.streak-event-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: #1a1a1a;
    border: 2px solid #ff6b35;
    border-radius: 8px;
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.streak-event-btn:hover {
    background: #2a2a2a;
}

.streak-event-btn .event-icon {
    font-size: 1.3rem;
}

.streak-event-btn .dropdown-arrow {
    font-size: 0.8rem;
    color: #888;
}

.streak-event-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 5px;
    background: #1a1a1a;
    border: 1px solid #444;
    border-radius: 8px;
    overflow: hidden;
    z-index: 100;
    min-width: 180px;
}

.streak-event-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 16px;
    background: transparent;
    border: none;
    color: #ccc;
    font-size: 1rem;
    cursor: pointer;
    text-align: left;
    transition: background 0.2s;
}

.streak-event-option:hover {
    background: #2a2a2a;
}

.streak-event-option.active {
    background: #ff6b35;
    color: #fff;
}

.streak-event-option .event-icon {
    font-size: 1.2rem;
}

.streak-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    max-width: 600px;
    margin: 0 auto;
}

.streak-stats {
    display: flex;
    gap: 40px;
    justify-content: center;
}

.streak-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.streak-label {
    font-size: 0.9rem;
    color: #888;
    text-transform: uppercase;
}

.streak-value {
    font-size: 3rem;
    font-weight: bold;
    color: #fff;
}

.streak-value.streak-current {
    color: #ff6b35;
}

.streak-value.streak-best {
    color: #ff6b35;
}

.streak-times {
    display: flex;
    gap: 30px;
    justify-content: center;
}

.streak-time-box {
    background: #252542;
    padding: 15px 25px;
    border-radius: 10px;
    text-align: center;
}

.streak-time-box.beat-this {
    background: #2a3a2a;
    border: 2px solid #4ade80;
}

.streak-time-box .time-label {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 5px;
    display: block;
}

.streak-time-box .time-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #fff;
}

.streak-time-box.beat-this .time-value {
    color: #4ade80;
}

.streak-scramble {
    background: #252542;
    padding: 20px;
    border-radius: 10px;
    width: 100%;
    text-align: center;
}

.streak-scramble .scramble {
    font-size: 1.2rem;
    font-family: monospace;
    word-break: break-all;
    line-height: 1.6;
}

.streak-timer-section {
    width: 100%;
    padding: 40px 20px;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}

.streak-timer {
    font-size: 5rem;
    font-weight: bold;
    text-align: center;
    font-family: 'Courier New', monospace;
    color: #fff;
    transition: color 0.2s;
}

.streak-timer.holding {
    color: #ff6b35;
}

.streak-timer.ready {
    color: #4ade80;
}

.streak-timer.failed {
    color: #ef4444;
    font-size: 2.5rem;
}

.streak-message {
    background: #3a2525;
    border: 2px solid #ef4444;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

.streak-message p {
    color: #ef4444;
    margin-bottom: 15px;
}

.restart-btn {
    background: #ff6b35;
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 1.1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.restart-btn:hover {
    background: #ff8555;
}

.streak-instructions {
    text-align: center;
    color: #888;
}

.streak-instructions p {
    margin-bottom: 10px;
}

@media (max-width: 600px) {
    .streak-timer {
        font-size: 3rem;
    }

    .streak-timer.failed {
        font-size: 1.8rem;
    }

    .streak-value {
        font-size: 2.5rem;
    }

    .streak-times {
        flex-direction: column;
        gap: 15px;
    }
}

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

::-webkit-scrollbar-track {
    background: #000000;
}

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

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

/* Profile Modal */
.profile-modal {
    background: #000000;
    border-radius: 16px;
    padding: 30px;
    max-width: 450px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-avatar-large {
    width: 100px;
    height: 100px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.xp-ring-large {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: rotate(90deg);
}

.avatar-emoji {
    font-size: 50px;
    z-index: 1;
}

.profile-info {
    flex: 1;
}

.profile-info h2 {
    color: #fff;
    margin: 0 0 10px 0;
    font-size: 1.5rem;
}

.xp-bar {
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 5px;
}

.xp-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #00d4ff, #00ff88);
    border-radius: 5px;
    transition: width 0.3s ease;
}

.xp-text {
    color: #888;
    font-size: 0.85rem;
    margin: 0;
}

.profile-section {
    margin-bottom: 20px;
}

.profile-section h3 {
    color: #00d4ff;
    font-size: 1rem;
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.profile-stats {
    display: flex;
    gap: 15px;
}

.profile-stat {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 15px;
    text-align: center;
}

.profile-stat .stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
    color: #fff;
}

.profile-stat .stat-label {
    display: block;
    font-size: 0.75rem;
    color: #888;
    margin-top: 5px;
}

.quests-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quest-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    transition: background 0.2s;
}

.quest-item.completed {
    background: rgba(0, 255, 136, 0.1);
}

.quest-item.completed .quest-icon {
    color: #00ff88;
}

.quest-icon {
    font-size: 1rem;
    color: #666;
    width: 20px;
    text-align: center;
}

.quest-count {
    min-width: 28px;
    height: 28px;
    background: rgba(0, 212, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: bold;
    color: #00d4ff;
}

.quest-text {
    flex: 1;
    color: #fff;
    font-size: 0.9rem;
}

.quest-xp {
    color: #00d4ff;
    font-size: 0.85rem;
    font-weight: bold;
}
