/* VOIDBOUND - Main Styles */
/* Sleek Mass Effect-inspired UI */

/* ============================================
   CSS Variables
   ============================================ */
:root {
    /* Background Colors - Deep space feel */
    --bg-dark: #050508;
    --bg-medium: #0c0d12;
    --bg-light: #14161e;
    --bg-panel: rgba(12, 15, 25, 0.95);
    --bg-glass: rgba(20, 25, 40, 0.85);
    --bg-glass-hover: rgba(30, 40, 60, 0.9);

    /* Primary Colors - Clean cyan/blue holographic */
    --primary: #00d4ff;
    --primary-dim: #0099bb;
    --primary-glow: rgba(0, 212, 255, 0.4);
    --primary-subtle: rgba(0, 212, 255, 0.1);

    /* Secondary Colors - Warm orange accents */
    --secondary: #ff8c42;
    --secondary-dim: #cc6a2a;
    --secondary-glow: rgba(255, 140, 66, 0.4);

    /* Accent Colors - Purple for special elements */
    --accent: #9b6dff;
    --accent-dim: #7a4ddd;
    --accent-glow: rgba(155, 109, 255, 0.4);

    /* Text Colors - High contrast legibility */
    --text-bright: #ffffff;
    --text-normal: #b8c0d8;
    --text-dim: #6a7088;
    --text-muted: #454860;

    /* Status Colors - Clear visual hierarchy */
    --health: #ff5555;
    --health-bg: rgba(255, 85, 85, 0.15);
    --shield: #55bbff;
    --shield-bg: rgba(85, 187, 255, 0.15);
    --energy: #ffcc44;
    --energy-bg: rgba(255, 204, 68, 0.15);
    --morale: #dd99ff;
    --morale-bg: rgba(221, 153, 255, 0.15);
    --hull: #44dd88;
    --hull-bg: rgba(68, 221, 136, 0.15);
    --fuel: #ff66cc;
    --fuel-bg: rgba(255, 102, 204, 0.15);

    /* Semantic Colors */
    --success: #44dd88;
    --warning: #ffcc44;
    --danger: #ff5555;
    --info: #55bbff;

    /* Fonts */
    --font-display: 'Orbitron', sans-serif;
    --font-body: 'Rajdhani', sans-serif;
    --font-mono: 'Share Tech Mono', monospace;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;

    /* Borders - Subtle glow */
    --border-color: rgba(0, 212, 255, 0.25);
    --border-color-hover: rgba(0, 212, 255, 0.5);
    --border-glow: 0 0 15px var(--primary-glow);
    --border-glow-strong: 0 0 25px var(--primary-glow), 0 0 50px rgba(0, 212, 255, 0.2);

    /* Glass Effects */
    --glass-blur: blur(12px);
    --glass-border: 1px solid rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.4s ease;
}

/* ============================================
   Reset & Base
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.5;
    color: var(--text-normal);
    background-color: var(--bg-dark);
    background-image:
        radial-gradient(ellipse at 50% 0%, rgba(0, 50, 80, 0.3) 0%, transparent 60%),
        radial-gradient(circle at 80% 80%, rgba(50, 0, 80, 0.2) 0%, transparent 40%);
}

/* Scanlines Effect */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 9999;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.1) 0px,
        rgba(0, 0, 0, 0.1) 1px,
        transparent 1px,
        transparent 3px
    );
    opacity: 0.3;
}

/* Display Effect Toggles */
body.no-scanlines .scanlines {
    display: none !important;
}

body.no-glow * {
    text-shadow: none !important;
    box-shadow: none !important;
}

body.no-glow .glow-text,
body.no-glow [class*="glow"] {
    text-shadow: none !important;
}

/* Screen Flicker Effect */
@keyframes screen-flicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.98; }
    75% { opacity: 0.96; }
}

body.screen-flicker {
    animation: screen-flicker 0.1s infinite;
}

/* ============================================
   Screens
   ============================================ */
.screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.screen.active {
    display: flex;
    opacity: 1;
}

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

/* ============================================
   Main Menu
   ============================================ */
.menu-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: var(--space-xl);
}

.title-section {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.game-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 700;
    color: var(--text-bright);
    text-shadow:
        0 0 30px var(--primary-glow),
        0 0 60px rgba(0, 212, 255, 0.2);
    letter-spacing: 0.3em;
    animation: titleGlow 4s ease-in-out infinite;
    position: relative;
}

.game-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -8px;
    transform: translateX(-50%);
    width: 60%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0.6;
}

@keyframes titleGlow {
    0%, 100% {
        text-shadow: 0 0 30px var(--primary-glow), 0 0 60px rgba(0, 212, 255, 0.2);
    }
    50% {
        text-shadow: 0 0 40px var(--primary-glow), 0 0 80px rgba(0, 212, 255, 0.3);
    }
}

.subtitle {
    font-family: var(--font-display);
    font-size: 0.9rem;
    color: var(--text-dim);
    letter-spacing: 0.4em;
    margin-top: var(--space-lg);
    text-transform: uppercase;
}

.tagline {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--primary-dim);
    margin-top: var(--space-md);
    opacity: 0.8;
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.menu-btn {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-bright);
    background: var(--bg-glass);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-md) var(--space-xl);
    min-width: 280px;
    min-height: 52px;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    position: relative;
    overflow: hidden;
}

.menu-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-glow), transparent);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.menu-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary-subtle), transparent);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.menu-btn:hover:not(:disabled) {
    background: var(--bg-glass-hover);
    border-color: var(--border-color-hover);
    box-shadow: var(--border-glow), inset 0 1px 0 rgba(255,255,255,0.05);
    transform: translateY(-2px);
}

.menu-btn:hover:not(:disabled)::before,
.menu-btn:hover:not(:disabled)::after {
    opacity: 1;
}

.menu-btn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: var(--border-glow);
}

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

.menu-btn.primary {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.2), rgba(0, 212, 255, 0.08));
    border-color: var(--primary-dim);
    box-shadow: 0 0 20px var(--primary-glow);
}

.menu-btn.primary:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.3), rgba(0, 212, 255, 0.15));
    box-shadow: var(--border-glow-strong);
}

.menu-btn.secondary {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--text-muted);
    color: var(--text-dim);
}

.menu-btn.secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--text-dim);
    color: var(--text-normal);
    box-shadow: none;
}

.menu-btn.danger {
    border-color: rgba(255, 85, 85, 0.4);
}

.menu-btn.danger:hover:not(:disabled) {
    background: rgba(255, 85, 85, 0.15);
    border-color: var(--danger);
    box-shadow: 0 0 15px rgba(255, 85, 85, 0.3);
}

.btn-icon {
    font-family: var(--font-mono);
    color: var(--primary);
}

.version-info {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-dim);
    position: absolute;
    bottom: var(--space-lg);
}

.separator {
    margin: 0 var(--space-md);
    color: var(--border-color);
}

/* ============================================
   Opening Sequence Screen
   ============================================ */
.opening-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    position: relative;
}

/* Skip button for opening sequence */
.skip-btn {
    position: absolute;
    bottom: 30px;
    right: 30px;
    padding: 10px 20px;
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.3s ease;
    z-index: 100;
}

.skip-btn:hover {
    opacity: 1;
    background: rgba(0, 255, 255, 0.1);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

.boot-sequence {
    width: 100%;
    max-width: 1000px;
    padding: var(--space-xl);
}

.boot-text {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--primary);
    line-height: 1.8;
    white-space: pre-wrap;
}

.boot-text .cursor {
    display: inline-block;
    width: 10px;
    height: 1.2em;
    background: var(--primary);
    animation: blink 0.7s infinite;
    vertical-align: text-bottom;
}

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

.scene-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================
   Character Creation Screen
   ============================================ */
.creation-container {
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.creation-scene {
    position: relative;
    overflow: hidden;
}

.creation-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--space-xl);
    background: rgba(0, 0, 0, 0.8);
}

.creation-stage {
    animation: fadeIn 0.5s ease;
}

.stage-prompt {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    color: var(--text-normal);
    line-height: 1.8;
    margin-bottom: var(--space-xl);
}

.option-buttons {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.option-btn {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-medium);
    border: 1px solid var(--border-color);
    color: var(--text-bright);
    font-family: var(--font-body);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.option-btn:hover {
    background: var(--bg-light);
    border-color: var(--primary);
    transform: translateX(5px);
}

.option-btn .option-name {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--text-bright);
}

.option-btn .info-icon {
    margin-left: auto;
}

.name-selection {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-lg);
}

.generated-name {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--primary);
    text-align: center;
    padding: var(--space-lg);
    background: var(--bg-medium);
    border: 1px solid var(--border-color);
    min-width: 300px;
}

.name-buttons {
    display: flex;
    gap: var(--space-md);
}

.custom-name-input {
    display: flex;
    gap: var(--space-md);
    align-items: center;
    margin-top: var(--space-lg);
}

.character-summary {
    background: var(--bg-medium);
    border: 1px solid var(--border-color);
    padding: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.character-summary .summary-row {
    display: flex;
    justify-content: space-between;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.character-summary .summary-label {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--text-dim);
}

.character-summary .summary-value {
    font-family: var(--font-display);
    color: var(--primary);
}

/* ============================================
   Game Screen
   ============================================ */
.game-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) var(--space-xl);
    background: var(--bg-glass);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--glass-shadow);
    min-height: 56px;
    position: relative;
}

.game-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-glow), transparent);
}

.header-left {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.ship-name {
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--primary);
    letter-spacing: 0.1em;
}

.location {
    font-family: var(--font-mono);
    color: var(--text-dim);
    font-size: 0.875rem;
}

.stardate {
    font-family: var(--font-mono);
    color: var(--secondary);
    font-size: 0.875rem;
}

.header-right {
    display: flex;
    gap: var(--space-sm);
}

.icon-btn {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    color: var(--text-dim);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    padding: var(--space-sm) var(--space-md);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.icon-btn:hover {
    color: var(--primary);
    background: var(--primary-subtle);
    border-color: var(--border-color);
    box-shadow: 0 0 12px var(--primary-glow);
}

.game-main {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr minmax(320px, 25vw);
    gap: 0;
    overflow: hidden;
    min-height: 0; /* Fix for flex + grid */
}

/* Scene Panel */
.scene-panel {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-right: 1px solid var(--border-color);
}

.scene-display {
    flex-shrink: 0;
    height: 35vh;
    min-height: 250px;
    max-height: 450px;
    background: var(--bg-dark);
    position: relative;
}

.scene-image-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.scene-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Prevent layout shift while loading */
    min-height: 250px;
    background: var(--bg-dark);
}

/* Hide scene loading text when image is loaded */
.scene-display:has(img[src]:not([src=""]):not([src^="data:"])) .scene-loading {
    display: none !important;
}

.scene-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    background: linear-gradient(
        to bottom,
        transparent 60%,
        rgba(10, 10, 15, 0.8) 100%
    );
}

.scene-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 15, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    color: var(--primary);
    font-family: var(--font-mono);
}

/* Narrative Panel */
.narrative-panel {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.narrative-content {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.narrative-entry {
    animation: fadeIn 0.3s ease;
}

.narrative-text {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-normal);
}

.narrative-text.player-action {
    color: var(--primary);
    font-family: var(--font-mono);
    padding-left: var(--space-md);
    border-left: 2px solid var(--primary);
}

.narrative-text.dialogue {
    color: var(--secondary);
    font-style: italic;
}

.narrative-text.system {
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: 0.875rem;
}

.narrative-text.ai {
    color: var(--accent);
    padding: var(--space-sm) var(--space-md);
    background: rgba(123, 46, 255, 0.1);
    border-left: 2px solid var(--accent);
}

/* Actions Panel */
.actions-panel {
    flex-shrink: 0;
    background: var(--bg-glass);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-top: 1px solid var(--border-color);
    padding: var(--space-sm) var(--space-md);
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: var(--space-xs);
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: var(--space-sm) var(--space-xs);
    min-height: 60px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-sm);
    color: var(--text-dim);
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.action-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, var(--primary-subtle), transparent);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-color);
    color: var(--text-bright);
    box-shadow: 0 0 15px var(--primary-glow);
}

.action-btn:hover::before {
    opacity: 1;
}

.action-btn:active {
    transform: scale(0.98);
}

.action-btn.active {
    background: var(--primary-subtle);
    border-color: var(--primary-dim);
    color: var(--primary);
}

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

.action-icon {
    font-size: 1.25rem;
}

.action-label {
    font-family: var(--font-display);
    font-size: 0.65rem;
    letter-spacing: 0.05em;
}

.action-btn.small {
    flex-direction: row;
    padding: var(--space-xs) var(--space-md);
}

.action-btn.small .action-label {
    font-size: 0.75rem;
}

.action-btn.primary {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.2), rgba(0, 240, 255, 0.1));
    border-color: var(--primary);
    color: var(--primary);
}

.action-btn.primary:hover {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.3), rgba(0, 240, 255, 0.2));
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.3);
}

.action-btn.large {
    padding: var(--space-md) var(--space-xl);
    font-size: 1rem;
}

/* Sub Actions */
.sub-actions {
    margin-top: var(--space-md);
    background: var(--bg-medium);
    border: 1px solid var(--border-color);
    padding: var(--space-md);
    animation: fadeIn 0.2s ease;
}

.sub-actions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--border-color);
}

.sub-actions-header span {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--text-dim);
}

.sub-actions-grid {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.sub-action-btn {
    font-family: var(--font-body);
    font-size: 0.875rem;
    color: var(--text-bright);
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    padding: var(--space-xs) var(--space-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.sub-action-btn:hover {
    border-color: var(--primary);
    background: rgba(0, 240, 255, 0.1);
}

/* Dialogue Options */
.dialogue-options {
    margin-top: var(--space-md);
    background: var(--bg-medium);
    border: 1px solid var(--accent);
    padding: var(--space-md);
    animation: fadeIn 0.2s ease;
}

.dialogue-header {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--accent);
    margin-bottom: var(--space-md);
}

.dialogue-buttons {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.dialogue-btn {
    font-family: var(--font-body);
    font-size: 0.875rem;
    color: var(--text-bright);
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    padding: var(--space-sm) var(--space-md);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.dialogue-btn:hover {
    border-color: var(--accent);
    background: rgba(123, 46, 255, 0.1);
    transform: translateX(3px);
}

.dialogue-btn .tone {
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 3px;
    text-transform: uppercase;
}

/* Side Panel */
.side-panel {
    background: var(--bg-glass);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    padding: var(--space-md);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    border-left: 1px solid var(--border-color);
    box-shadow: var(--glass-shadow);
}

/* Side Panel Overlay - Hidden on desktop, shown on mobile */
.side-panel-overlay {
    display: none;
}

.status-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    position: relative;
}

.status-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 40%;
    height: 1px;
    background: linear-gradient(90deg, var(--primary-dim), transparent);
}

.card-title {
    font-family: var(--font-display);
    font-size: 0.75rem;
    color: var(--primary);
    letter-spacing: 0.15em;
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-xs);
    border-bottom: 1px solid var(--border-color);
}

.character-info {
    margin-bottom: var(--space-md);
}

.character-name {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--text-bright);
}

.character-class {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-dim);
}

.stat-bars {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.stat-row {
    display: grid;
    grid-template-columns: 60px 1fr 50px;
    gap: var(--space-sm);
    align-items: center;
}

.stat-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-dim);
    letter-spacing: 0.05em;
}

.stat-bar {
    height: 6px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 3px;
    position: relative;
    overflow: hidden;
}

.stat-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
    position: relative;
}

.stat-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.2) 0%, transparent 50%);
}

.stat-fill.health {
    background: linear-gradient(90deg, #cc3333, var(--health));
    box-shadow: 0 0 8px var(--health-bg);
}
.stat-fill.energy {
    background: linear-gradient(90deg, #cc9922, var(--energy));
    box-shadow: 0 0 8px var(--energy-bg);
}
.stat-fill.shield {
    background: linear-gradient(90deg, #3399cc, var(--shield));
    box-shadow: 0 0 8px var(--shield-bg);
}
.stat-fill.morale {
    background: linear-gradient(90deg, #9955cc, var(--morale));
    box-shadow: 0 0 8px var(--morale-bg);
}
.stat-fill.hull {
    background: linear-gradient(90deg, #229955, var(--hull));
    box-shadow: 0 0 8px var(--hull-bg);
}
.stat-fill.shields {
    background: linear-gradient(90deg, #3399cc, var(--shield));
    box-shadow: 0 0 8px var(--shield-bg);
}
.stat-fill.fuel {
    background: linear-gradient(90deg, #cc4488, var(--fuel));
    box-shadow: 0 0 8px var(--fuel-bg);
}

.stat-value {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-dim);
    text-align: right;
}

/* Quest List */
.quest-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.quest-item-mini {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--warning);
    padding: var(--space-xs) 0;
    border-bottom: 1px dashed rgba(255, 170, 0, 0.2);
}

.quest-item-mini::before {
    content: '> ';
    color: var(--warning);
}

/* Objects List */
.objects-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.object-item {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-dim);
    padding: var(--space-xs);
    cursor: pointer;
    transition: all 0.2s ease;
}

.object-item:hover {
    color: var(--primary);
    background: rgba(0, 240, 255, 0.05);
}

/* NPC Items in Objects List */
.npc-item {
    color: var(--warning);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.npc-item:hover {
    color: var(--text-bright);
    background: rgba(255, 170, 80, 0.1);
}

.npc-icon {
    font-size: 0.9rem;
}

/* AI Card */
.ai-card {
    background: linear-gradient(135deg, rgba(123, 46, 255, 0.1), rgba(0, 240, 255, 0.05));
    border-color: var(--accent);
}

.ai-name {
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--accent);
    margin-bottom: var(--space-sm);
}

.ai-status-indicator {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-dim);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-dot.connected {
    background: var(--success);
    box-shadow: 0 0 10px var(--success);
    animation: pulse 2s infinite;
}

.status-dot.disconnected {
    background: var(--danger);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Game Menu Overlay */
.game-menu-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;
}

.game-menu-panel {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    padding: var(--space-xl);
    min-width: 300px;
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.game-menu-panel h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--primary);
    text-align: center;
    margin-bottom: var(--space-md);
}

/* Audio Controls in Menu */
.menu-audio-controls {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    padding: var(--space-md);
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    margin-bottom: var(--space-md);
}

.toggle-control {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding: var(--space-xs) 0;
}

.toggle-control span:first-child {
    font-family: var(--font-body);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.toggle-control input {
    display: none;
}

.toggle-slider {
    position: relative;
    width: 44px;
    height: 22px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 11px;
    transition: all 0.3s ease;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: var(--text-dim);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.toggle-control input:checked + .toggle-slider {
    background: rgba(0, 240, 255, 0.3);
    border-color: var(--primary);
}

.toggle-control input:checked + .toggle-slider::before {
    transform: translateX(22px);
    background: var(--primary);
    box-shadow: 0 0 8px var(--primary);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 15, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

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

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto var(--space-lg);
}

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

.loading-text {
    font-family: var(--font-display);
    color: var(--primary);
    letter-spacing: 0.2em;
    animation: pulse 1s ease-in-out infinite;
}

/* Form Input */
.form-input {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--text-bright);
    background: var(--bg-medium);
    border: 1px solid var(--border-color);
    padding: var(--space-md);
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: var(--border-glow);
}

.form-input::placeholder {
    color: var(--text-dim);
}

/* Placeholder text */
.placeholder {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--text-dim);
    font-style: italic;
}

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

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dim);
}

/* ============================================
   Mobile-Only Elements
   ============================================ */
.mobile-only {
    display: none;
}

/* ============================================
   Responsive - Tablet
   ============================================ */
@media (max-width: 1200px) {
    .game-main {
        grid-template-columns: 1fr minmax(280px, 20vw);
    }
}

@media (max-width: 1024px) {
    .action-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .game-main {
        grid-template-columns: 1fr 260px;
    }
}

/* ============================================
   Responsive - Mobile
   ============================================ */
@media (max-width: 768px) {
    /* Show mobile-only elements */
    .mobile-only {
        display: inline-flex !important;
    }

    /* Base adjustments */
    body {
        font-size: 14px;
    }

    /* Main Menu */
    .menu-container {
        padding: var(--space-md);
    }

    .game-title {
        font-size: clamp(2rem, 12vw, 3.5rem);
        letter-spacing: 0.1em;
    }

    .subtitle {
        font-size: 0.9rem;
        letter-spacing: 0.2em;
    }

    .tagline {
        font-size: 0.85rem;
    }

    .menu-btn {
        min-width: 240px;
        padding: var(--space-md) var(--space-lg);
        font-size: 0.9rem;
    }

    .version-info {
        font-size: 0.65rem;
        flex-direction: column;
        text-align: center;
        gap: var(--space-xs);
    }

    .separator {
        display: none;
    }

    /* Skip button - mobile position */
    .skip-btn {
        bottom: 15px;
        right: 15px;
        padding: 8px 16px;
        font-size: 0.75rem;
    }

    /* Character Creation */
    .creation-container {
        grid-template-columns: 1fr;
        grid-template-rows: 30vh 1fr;
    }

    .creation-scene {
        display: block;
        height: 30vh;
    }

    .creation-content {
        padding: var(--space-md);
        overflow-y: auto;
    }

    .stage-prompt {
        font-size: 1rem;
        line-height: 1.6;
        margin-bottom: var(--space-md);
    }

    .option-btn {
        padding: var(--space-md);
        font-size: 0.95rem;
    }

    .generated-name {
        font-size: 1.5rem;
        min-width: auto;
        width: 100%;
    }

    .name-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }

    .custom-name-input {
        flex-direction: column;
        width: 100%;
    }

    .custom-name-input .form-input {
        width: 100%;
    }

    .character-summary {
        padding: var(--space-md);
    }

    /* Game Screen - Header */
    .game-header {
        padding: var(--space-sm) var(--space-md);
        flex-wrap: wrap;
        gap: var(--space-sm);
    }

    .header-left {
        flex: 1;
        min-width: 0;
        gap: var(--space-sm);
    }

    .ship-name {
        font-size: 1rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .location {
        display: none;
    }

    .header-center {
        order: 3;
        width: 100%;
        text-align: center;
        padding-top: var(--space-xs);
        border-top: 1px solid var(--border-color);
    }

    .header-right {
        gap: var(--space-xs);
    }

    .icon-btn {
        padding: var(--space-xs) var(--space-sm);
        font-size: 1rem;
        min-width: 40px;
        min-height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Game Main - Stack vertically */
    .game-main {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr;
    }

    /* Side panel becomes a slide-out drawer on mobile */
    .side-panel {
        position: fixed;
        top: 0;
        right: -280px;
        width: 280px;
        height: 100%;
        z-index: 500;
        transition: right 0.3s ease;
        border-left: 1px solid var(--border-color);
        display: flex;
    }

    .side-panel.open {
        right: 0;
    }

    /* Side panel close button */
    .side-panel-close {
        position: absolute;
        top: var(--space-sm);
        right: var(--space-sm);
        width: 36px;
        height: 36px;
        background: var(--bg-dark);
        border: 1px solid var(--border-color);
        color: var(--text-dim);
        font-size: 1.5rem;
        border-radius: 4px;
        cursor: pointer;
        z-index: 10;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s ease;
    }

    .side-panel-close:hover,
    .side-panel-close:active {
        background: var(--primary-dim);
        color: var(--text-primary);
        border-color: var(--primary-color);
    }

    /* Overlay for side panel */
    .side-panel-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.7);
        z-index: 499;
        display: none;
    }

    .side-panel-overlay.active {
        display: block;
    }

    /* Scene Panel */
    .scene-panel {
        border-right: none;
    }

    .scene-display {
        height: 25vh;
        min-height: 150px;
        max-height: 200px;
    }

    .scene-image-wrapper img {
        min-height: 150px;
    }

    /* Narrative Panel */
    .narrative-content {
        padding: var(--space-md);
        max-height: 35vh;
    }

    .narrative-text {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    /* Actions Panel - Bottom fixed */
    .actions-panel {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        padding: var(--space-sm);
        background: var(--bg-panel);
        border-top: 1px solid var(--border-color);
        z-index: 100;
        max-height: 40vh;
        overflow-y: auto;
    }

    .action-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-xs);
    }

    .action-btn {
        padding: var(--space-sm);
        min-height: 60px;
        touch-action: manipulation;
    }

    .action-icon {
        font-size: 1.5rem;
    }

    .action-label {
        font-size: 0.6rem;
    }

    /* Sub Actions */
    .sub-actions {
        margin-top: var(--space-sm);
    }

    .sub-actions-grid {
        gap: var(--space-xs);
    }

    .sub-action-btn {
        padding: var(--space-sm) var(--space-md);
        font-size: 0.85rem;
        min-height: 44px;
    }

    /* Dialogue Options */
    .dialogue-options {
        margin-top: var(--space-sm);
    }

    .dialogue-btn {
        padding: var(--space-md);
        font-size: 0.9rem;
        min-height: 48px;
    }

    /* Status Cards */
    .status-card {
        padding: var(--space-sm);
    }

    .card-title {
        font-size: 0.7rem;
        margin-bottom: var(--space-sm);
    }

    /* Game Menu Overlay */
    .game-menu-panel {
        width: 90%;
        max-width: 320px;
        padding: var(--space-lg);
    }

    .game-menu-panel h3 {
        font-size: 1.25rem;
    }

    .menu-audio-controls {
        padding: var(--space-sm);
    }

    /* Add padding at bottom to account for fixed actions panel */
    .scene-panel {
        padding-bottom: 180px;
    }
}

/* ============================================
   Responsive - Small Mobile (iPhone SE, etc)
   ============================================ */
@media (max-width: 375px) {
    .game-title {
        font-size: 1.8rem;
    }

    .menu-btn {
        min-width: 200px;
        padding: var(--space-sm) var(--space-md);
        font-size: 0.85rem;
    }

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

    .action-btn {
        min-height: 70px;
    }

    .scene-display {
        height: 20vh;
        min-height: 120px;
    }

    .narrative-content {
        max-height: 30vh;
    }

    .option-btn {
        padding: var(--space-sm);
        font-size: 0.9rem;
    }
}

/* ============================================
   Touch-Friendly Enhancements
   ============================================ */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .action-btn,
    .menu-btn,
    .option-btn,
    .icon-btn,
    .dialogue-btn,
    .sub-action-btn {
        min-height: 48px;
    }

    /* Remove hover transforms on touch */
    .action-btn:hover,
    .menu-btn:hover,
    .option-btn:hover,
    .dialogue-btn:hover {
        transform: none;
    }

    /* Active states for touch feedback */
    .action-btn:active,
    .menu-btn:active,
    .option-btn:active {
        transform: scale(0.98);
        opacity: 0.9;
    }

    /* Disable text selection on UI elements */
    .action-btn,
    .menu-btn,
    .option-btn,
    .icon-btn {
        -webkit-user-select: none;
        user-select: none;
        -webkit-tap-highlight-color: transparent;
    }
}

/* ============================================
   Landscape Mobile
   ============================================ */
@media (max-width: 896px) and (orientation: landscape) {
    .scene-display {
        height: 30vh;
    }

    .narrative-content {
        max-height: 25vh;
    }

    .actions-panel {
        max-height: 50vh;
    }

    .creation-container {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 1fr;
    }

    .creation-scene {
        height: 100%;
    }
}

/* ============================================
   Save/Load Overlay
   ============================================ */
.saveload-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.saveload-panel {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--border-glow), 0 10px 40px rgba(0, 0, 0, 0.5);
}

.saveload-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--border-color);
}

.saveload-header h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--primary);
    letter-spacing: 0.1em;
}

.saveload-content {
    padding: var(--space-lg);
    overflow-y: auto;
    flex: 1;
}

/* Current Save Info (for saving) */
.current-save-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.save-preview {
    background: var(--bg-dark);
    padding: var(--space-md);
    border-radius: 4px;
    border: 1px solid rgba(0, 240, 255, 0.1);
}

.save-details {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

.save-details span {
    color: var(--primary);
}

/* Save Games List */
.saves-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.saves-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-lg);
    color: var(--text-dim);
}

.saves-items {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.save-item {
    background: var(--bg-dark);
    padding: var(--space-md);
    border-radius: 4px;
    border: 1px solid rgba(0, 240, 255, 0.1);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.save-item:hover {
    border-color: var(--primary);
    background: rgba(0, 240, 255, 0.05);
}

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

.save-item-name {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--text-bright);
    margin-bottom: var(--space-xs);
}

.save-item-meta {
    font-size: 0.8rem;
    color: var(--text-dim);
    display: flex;
    gap: var(--space-md);
}

.save-item-actions {
    display: flex;
    gap: var(--space-sm);
}

.save-item-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-normal);
    padding: var(--space-xs) var(--space-sm);
    border-radius: 4px;
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.save-item-btn:hover {
    background: var(--primary);
    color: var(--bg-dark);
    border-color: var(--primary);
}

.save-item-btn.danger:hover {
    background: var(--danger);
    border-color: var(--danger);
}

/* Save/Load Status */
.saveload-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md);
    margin-top: var(--space-md);
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid var(--success);
    border-radius: 4px;
    color: var(--success);
    font-family: var(--font-mono);
}

.saveload-status.error {
    background: rgba(255, 68, 68, 0.1);
    border-color: var(--danger);
    color: var(--danger);
}

.status-icon {
    font-size: 1.2rem;
}

/* Local save indicator */
.save-item.local {
    border-left: 3px solid var(--warning);
}

.local-badge {
    background: var(--warning);
    color: var(--bg-dark);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: bold;
    margin-left: var(--space-sm);
}

/* ==========================================================================
   SETTINGS MODAL
   ========================================================================== */

.settings-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9000;
    backdrop-filter: blur(4px);
}

.settings-panel {
    background: var(--bg-dark);
    border: 1px solid var(--primary);
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.2);
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md);
    border-bottom: 1px solid var(--primary-dim);
    background: rgba(0, 240, 255, 0.05);
}

.settings-header h3 {
    margin: 0;
    color: var(--primary);
    font-family: var(--font-display);
    letter-spacing: 2px;
}

.settings-content {
    padding: var(--space-md);
    overflow-y: auto;
    flex: 1;
}

.settings-section {
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--primary-dim);
}

.settings-section:last-of-type {
    border-bottom: none;
}

.settings-section h4 {
    color: var(--primary);
    font-family: var(--font-display);
    font-size: 0.85rem;
    letter-spacing: 1px;
    margin: 0 0 var(--space-md) 0;
    opacity: 0.8;
}

/* Settings Note */
.settings-note {
    font-size: 0.75rem;
    color: var(--text-dim);
    font-style: italic;
    margin: var(--space-xs) 0 0 0;
    opacity: 0.7;
}

/* Volume Controls */
.volume-control {
    margin-bottom: var(--space-md);
}

.volume-control label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: var(--space-xs);
}

.slider-row {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.volume-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: rgba(0, 240, 255, 0.2);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 8px var(--primary);
    transition: all 0.2s ease;
}

.volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 12px var(--primary);
}

.volume-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--primary);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 8px var(--primary);
}

.volume-value {
    min-width: 45px;
    text-align: right;
    color: var(--primary);
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

/* Settings Actions */
.settings-actions {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--primary-dim);
}

.settings-btn {
    flex: 1;
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--primary-dim);
    background: transparent;
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 0.85rem;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 4px;
}

.settings-btn:hover {
    background: rgba(0, 240, 255, 0.1);
    border-color: var(--primary);
}

.settings-btn.primary {
    background: rgba(0, 240, 255, 0.2);
    border-color: var(--primary);
    color: var(--primary);
}

.settings-btn.primary:hover {
    background: rgba(0, 240, 255, 0.3);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}

.settings-btn.secondary {
    color: var(--text-secondary);
}

.settings-btn.secondary:hover {
    color: var(--warning);
    border-color: var(--warning);
}

/* Mobile adjustments for settings */
@media (max-width: 480px) {
    .settings-panel {
        width: 95%;
        max-height: 90vh;
    }

    .settings-content {
        padding: var(--space-sm);
    }

    .settings-actions {
        flex-direction: column;
    }

    .volume-value {
        min-width: 40px;
        font-size: 0.8rem;
    }
}
