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

:root {
    /* Color Palette */
    --primary: #FF006E;
    --secondary: #00FF88;
    --accent: #00D4FF;
    --gold: #FFD700;
    --pink: #FF0080;
    
    /* Holographic Colors */
    --holo-1: linear-gradient(45deg, #FF006E, #00FF88, #00D4FF, #FFD700);
    --holo-2: linear-gradient(135deg, #00D4FF, #FF0080, #FFD700, #00FF88);
    --holo-3: linear-gradient(90deg, #FFD700, #FF006E, #00D4FF, #00FF88);
    
    /* Dark Theme */
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --bg-card: #2a2a2a;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --text-muted: #888888;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    
    /* Border Radius */
    --radius-sm: 0.5rem;
    --radius-md: 1rem;
    --radius-lg: 1.5rem;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    
    /* Holographic Shadow */
    --holo-shadow: 0 0 20px rgba(255, 0, 110, 0.3), 0 0 40px rgba(0, 255, 136, 0.2), 0 0 60px rgba(0, 212, 255, 0.1);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 50%, rgba(255, 0, 110, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(0, 255, 136, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 40% 80%, rgba(0, 212, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* App Container */
#app {
    max-width: 100vw;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-bottom: 80px;
}

/* Header */
.app-header {
    background: var(--bg-secondary);
    padding: var(--spacing-md) var(--spacing-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.app-header h1 {
    font-size: 1.5rem;
    background: var(--holo-1);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

.language-toggle .lang-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    transition: all 0.3s ease;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 0;
}

.app-section {
    display: none;
    padding: var(--spacing-lg);
    animation: fadeIn 0.3s ease;
}

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

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

/* Home Section */
.welcome-container {
    max-width: 800px;
    margin: 0 auto;
}

.stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--holo-1);
    opacity: 0.8;
}

.stat-card i {
    font-size: 1.5rem;
    color: var(--secondary);
    margin-bottom: var(--spacing-sm);
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xs);
}

.stat-value {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
    background: var(--holo-2);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Game Modes */
.game-modes h2 {
    text-align: center;
    margin-bottom: var(--spacing-lg);
    background: var(--holo-1);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.mode-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}

.mode-btn {
    background: var(--bg-card);
    border: 2px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: var(--spacing-lg);
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.mode-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--holo-1);
    opacity: 0;
    transition: all 0.3s ease;
}

.mode-btn:hover::before,
.mode-btn.selected::before {
    left: 0;
    opacity: 0.1;
}

.mode-btn:hover,
.mode-btn.selected {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--holo-shadow);
}

.mode-btn i {
    font-size: 2rem;
    margin-bottom: var(--spacing-sm);
}

.mode-btn span {
    font-weight: 600;
}

/* Difficulty Selector */
.difficulty-selector {
    margin-bottom: var(--spacing-xl);
    text-align: center;
}

.difficulty-selector h3 {
    margin-bottom: var(--spacing-lg);
    color: var(--text-secondary);
}

.difficulty-buttons {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
}

.difficulty-btn {
    background: var(--bg-card);
    border: 2px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 100px;
}

.difficulty-btn:hover,
.difficulty-btn.active {
    border-color: var(--accent);
    background: rgba(0, 212, 255, 0.1);
    transform: translateY(-2px);
}

.difficulty-btn small {
    color: var(--text-muted);
    font-size: 0.7rem;
    margin-top: var(--spacing-xs);
}

/* Game Type Selector */
.game-type-selector {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
    justify-content: center;
    flex-wrap: wrap;
}

.game-type-btn {
    background: var(--bg-card);
    border: 2px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    transition: all 0.3s ease;
    flex: 1;
    max-width: 200px;
    justify-content: center;
}

.game-type-btn:hover,
.game-type-btn.active {
    border-color: var(--gold);
    background: rgba(255, 215, 0, 0.1);
    transform: translateY(-2px);
}

/* Start Button */
.start-btn {
    width: 100%;
    background: var(--holo-1);
    border: none;
    color: white;
    padding: var(--spacing-lg) var(--spacing-xl);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.start-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.start-btn:hover::before {
    left: 100%;
}

.start-btn:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* Game Section */
.game-container {
    max-width: 600px;
    margin: 0 auto;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-xl);
    background: var(--bg-card);
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.level-indicator {
    font-weight: 600;
    color: var(--text-secondary);
}

.timer-display {
    font-family: 'Courier New', monospace;
    font-size: 1.2rem;
    font-weight: 700;
    background: var(--holo-2);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.pause-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.3s ease;
}

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

/* Game Stage */
.game-stage {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    margin-bottom: var(--spacing-lg);
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.game-stage::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, rgba(255, 0, 110, 0.05), transparent, rgba(0, 255, 136, 0.05), transparent);
    animation: rotate 10s linear infinite;
    pointer-events: none;
}

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

.sequence-display {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: var(--spacing-md);
    max-width: 400px;
    width: 100%;
}

.sequence-item {
    aspect-ratio: 1;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.sequence-item.flash {
    transform: scale(1.1);
    box-shadow: var(--holo-shadow);
}

/* Input Stage */
.input-stage h3 {
    text-align: center;
    margin-bottom: var(--spacing-lg);
    color: var(--text-secondary);
}

.input-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
    gap: var(--spacing-md);
    max-width: 400px;
    width: 100%;
    margin-bottom: var(--spacing-lg);
}

.input-item {
    aspect-ratio: 1;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    transition: all 0.3s ease;
    user-select: none;
}

.input-item:hover {
    border-color: var(--primary);
    transform: scale(1.05);
}

.input-item.selected {
    border-color: var(--secondary);
    background: rgba(0, 255, 136, 0.2);
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.3);
}

/* Input Actions */
.input-actions {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
}

.action-btn {
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    transition: all 0.3s ease;
    min-width: 120px;
    justify-content: center;
}

.action-btn.primary {
    background: var(--holo-1);
    color: white;
}

.action-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-top: var(--spacing-lg);
}

.progress-fill {
    height: 100%;
    background: var(--holo-1);
    width: 0%;
    transition: width 0.3s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Statistics Section */
.stats-container {
    max-width: 800px;
    margin: 0 auto;
}

.stats-container h2 {
    text-align: center;
    margin-bottom: var(--spacing-xl);
    background: var(--holo-1);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stats-summary {
    margin-bottom: var(--spacing-xl);
}

.summary-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
}

.summary-card h3 {
    margin-bottom: var(--spacing-lg);
    color: var(--text-secondary);
    text-align: center;
}

.performance-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-lg);
}

.metric {
    text-align: center;
    padding: var(--spacing-md);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.05);
}

.metric span {
    display: block;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: var(--spacing-xs);
}

.metric strong {
    font-size: 1.2rem;
    background: var(--holo-2);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Charts */
.stats-charts {
    margin-bottom: var(--spacing-xl);
}

.chart-container {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
}

.chart-container h3 {
    margin-bottom: var(--spacing-lg);
    color: var(--text-secondary);
    text-align: center;
}

#progress-chart {
    width: 100%;
    height: auto;
    max-height: 200px;
}

/* Game History */
.game-history {
    margin-bottom: var(--spacing-xl);
}

.game-history h3 {
    margin-bottom: var(--spacing-lg);
    color: var(--text-secondary);
    text-align: center;
}

.history-list {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.history-item {
    padding: var(--spacing-md) var(--spacing-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease;
}

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

.history-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.history-info {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.history-mode {
    font-weight: 600;
    color: var(--text-primary);
}

.history-details {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.history-stats {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.history-score {
    font-weight: 700;
    background: var(--holo-2);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.history-time {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Export Options */
.export-options h3 {
    margin-bottom: var(--spacing-lg);
    color: var(--text-secondary);
    text-align: center;
}

.export-buttons {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
}

.export-btn {
    background: var(--bg-card);
    border: 2px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    transition: all 0.3s ease;
    min-width: 140px;
    justify-content: center;
}

.export-btn:hover {
    border-color: var(--accent);
    background: rgba(0, 212, 255, 0.1);
    transform: translateY(-2px);
}

/* Settings Section */
.settings-container {
    max-width: 600px;
    margin: 0 auto;
}

.settings-container h2 {
    text-align: center;
    margin-bottom: var(--spacing-xl);
    background: var(--holo-1);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.settings-group {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.settings-group h3 {
    margin-bottom: var(--spacing-lg);
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: var(--spacing-sm);
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.setting-item label {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    color: var(--text-primary);
    cursor: pointer;
    flex: 1;
}

.setting-item label i {
    color: var(--secondary);
    width: 20px;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 50px;
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.3s ease;
    appearance: none;
    border: none;
    outline: none;
}

.toggle-switch::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: var(--text-primary);
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.toggle-switch:checked {
    background: var(--secondary);
}

.toggle-switch:checked::before {
    transform: translateX(26px);
}

/* Range Slider */
input[type="range"] {
    width: 150px;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    outline: none;
    appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    background: var(--secondary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
}

input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: var(--secondary);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
}

#speed-value {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-left: var(--spacing-sm);
    min-width: 40px;
}

/* Data Actions */
.data-actions {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.danger-btn {
    background: rgba(255, 0, 110, 0.1);
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    transition: all 0.3s ease;
    justify-content: center;
}

.danger-btn:hover {
    background: rgba(255, 0, 110, 0.2);
    transform: translateY(-2px);
}

/* About Info */
.about-info p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: var(--spacing-md);
}

.version-info {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* FAQ Section */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-container h2 {
    text-align: center;
    margin-bottom: var(--spacing-xl);
    background: var(--holo-1);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.faq-list {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.faq-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.faq-question {
    width: 100%;
    background: none;
    border: none;
    color: var(--text-primary);
    padding: var(--spacing-lg);
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    font-size: 1rem;
    font-weight: 600;
}

.faq-question:hover {
    background: rgba(255, 255, 255, 0.05);
}

.faq-icon {
    color: var(--secondary);
    transition: transform 0.3s ease;
}

.faq-question[aria-expanded="true"] .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 var(--spacing-lg) var(--spacing-lg);
    color: var(--text-secondary);
    line-height: 1.6;
    overflow: hidden;
    max-height: 0;
    transition: all 0.3s ease;
}

.faq-answer:not([hidden]) {
    max-height: 200px;
    padding: var(--spacing-md) var(--spacing-lg) var(--spacing-lg);
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-around;
    padding: var(--spacing-sm) 0;
    backdrop-filter: blur(10px);
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--spacing-sm);
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: var(--radius-sm);
    min-width: 60px;
}

.nav-item i {
    font-size: 1.2rem;
    margin-bottom: var(--spacing-xs);
}

.nav-item span {
    font-size: 0.7rem;
    font-weight: 500;
}

.nav-item:hover,
.nav-item.active {
    color: var(--secondary);
    background: rgba(0, 255, 136, 0.1);
    transform: translateY(-2px);
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
    animation: modalFadeIn 0.3s ease;
}

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

.modal-content {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease;
    box-shadow: var(--shadow-lg);
}

@keyframes modalSlideIn {
    from { transform: translateY(-50px) scale(0.9); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

.result-header,
.confirm-header {
    padding: var(--spacing-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.result-header h2,
.confirm-header h3 {
    background: var(--holo-1);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.close-modal {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: var(--spacing-sm);
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
}

.close-modal:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
}

.result-body,
.confirm-body {
    padding: var(--spacing-lg);
}

.result-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.result-stat {
    text-align: center;
    padding: var(--spacing-md);
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
}

.result-stat span {
    display: block;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: var(--spacing-xs);
}

.result-stat strong {
    font-size: 1.2rem;
    background: var(--holo-2);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.result-feedback {
    text-align: center;
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.05);
}

.result-actions,
.confirm-actions {
    padding: var(--spacing-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
}

/* Footer */
footer {
    text-align: center;
    padding: var(--spacing-lg);
    color: var(--text-muted);
    font-size: 0.8rem;
    background: var(--bg-secondary);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: auto;
    margin-bottom: 75px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .app-header {
        padding: var(--spacing-sm) var(--spacing-md);
    }
    
    .app-header h1 {
        font-size: 1.2rem;
    }
    
    .app-section {
        padding: var(--spacing-md);
    }
    
    .mode-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-sm);
    }
    
    .mode-btn {
        padding: var(--spacing-md);
    }
    
    .mode-btn i {
        font-size: 1.5rem;
    }
    
    .difficulty-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .difficulty-btn {
        min-width: 150px;
    }
    
    .game-type-selector {
        flex-direction: column;
        align-items: center;
    }
    
    .game-type-btn {
        max-width: none;
        width: 100%;
        max-width: 250px;
    }
    
    .sequence-display {
        grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
        gap: var(--spacing-sm);
    }
    
    .sequence-item {
        font-size: 1.2rem;
    }
    
    .input-grid {
        grid-template-columns: repeat(auto-fit, minmax(50px, 1fr));
        gap: var(--spacing-sm);
    }
    
    .input-item {
        font-size: 1rem;
    }
    
    .input-actions {
        flex-direction: column;
    }
    
    .action-btn {
        width: 100%;
    }
    
    .performance-metrics {
        grid-template-columns: 1fr;
    }
    
    .result-stats {
        grid-template-columns: 1fr;
    }
    
    .result-actions,
    .confirm-actions {
        flex-direction: column;
    }
    
    .export-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .export-btn {
        width: 100%;
        max-width: 200px;
    }
    
    .nav-item span {
        font-size: 0.6rem;
    }
}

@media (max-width: 480px) {
    .stats-overview {
        grid-template-columns: 1fr;
    }
    
    .game-header {
        flex-direction: column;
        gap: var(--spacing-md);
        text-align: center;
    }
    
    .game-info {
        justify-content: center;
    }
    
    .modal-content {
        margin: var(--spacing-md);
        max-width: calc(100vw - 2rem);
    }
    
    .faq-question {
        padding: var(--spacing-md);
        font-size: 0.9rem;
    }
    
    .faq-answer {
        padding: 0 var(--spacing-md) var(--spacing-md);
    }
    
    .faq-answer:not([hidden]) {
        padding: var(--spacing-sm) var(--spacing-md) var(--spacing-md);
    }
}

/* Color Variations for Game Elements */
.color-red { background: #FF006E; }
.color-green { background: #00FF88; }
.color-blue { background: #00D4FF; }
.color-yellow { background: #FFD700; }
.color-purple { background: #FF0080; }
.color-orange { background: #FF8800; }

.pattern-circle::before {
    content: '●';
    font-size: 2rem;
    color: var(--secondary);
}

.pattern-square::before {
    content: '■';
    font-size: 2rem;
    color: var(--accent);
}

.pattern-triangle::before {
    content: '▲';
    font-size: 2rem;
    color: var(--gold);
}

.pattern-diamond::before {
    content: '♦';
    font-size: 2rem;
    color: var(--primary);
}

.pattern-star::before {
    content: '★';
    font-size: 2rem;
    color: var(--pink);
}

/* Animations */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 5px rgba(255, 255, 255, 0.2); }
    50% { box-shadow: 0 0 20px rgba(255, 255, 255, 0.4), 0 0 30px rgba(0, 255, 136, 0.3); }
}

.pulse { animation: pulse 1s infinite; }
.bounce { animation: bounce 1s infinite; }
.glow { animation: glow 2s infinite; }

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --bg-primary: #000000;
        --bg-secondary: #111111;
        --bg-card: #222222;
        --text-primary: #ffffff;
        --text-secondary: #ffffff;
        --text-muted: #cccccc;
    }
    
    .sequence-item,
    .input-item {
        border-width: 3px;
    }
}

/* Print styles */
@media print {
    .bottom-nav,
    .app-header,
    .modal {
        display: none !important;
    }
    
    .app-section {
        display: block !important;
    }
    
    body {
        background: white;
        color: black;
    }
}
