/* Mobile-First CSS for Migrant Mania */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --primary-color: #e94560;
    --secondary-color: #0f3460;
    --background-dark: #1a1a2e;
    --background-light: #16213e;
    --text-color: #eaeaea;
    --text-muted: #a0a0a0;
    --success-color: #4ade80;
    --warning-color: #fbbf24;
    --danger-color: #ef4444;
    --money-color: #22c55e;
    --heat-color: #f97316;
    --safe-spacing: env(safe-area-inset-bottom, 0px);
}

html, body {
    height: 100%;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--background-dark);
    color: var(--text-color);
    user-select: none;
    -webkit-user-select: none;
}

#game-container {
    width: 100%;
    height: 100%;
    max-width: 480px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

/* Screens */
.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    flex-direction: column;
    background: var(--background-dark);
    overflow-y: auto;
}

.screen.active {
    display: flex;
}

.screen-content {
    padding: 20px;
    padding-bottom: calc(20px + var(--safe-spacing));
    flex: 1;
    overflow-y: auto;
}

/* Title Screen */
#title-screen {
    justify-content: center;
    align-items: center;
    text-align: center;
    background: linear-gradient(180deg, var(--background-dark) 0%, var(--secondary-color) 100%);
}

.title-content {
    padding: 20px;
}

.game-title {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--primary-color);
    text-shadow: 0 0 20px rgba(233, 69, 96, 0.5);
    letter-spacing: 4px;
    margin-bottom: 5px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 30px;
}

.title-art {
    margin: 30px 0;
}

.statue-liberty {
    font-size: 5rem;
    animation: sway 3s ease-in-out infinite;
}

@keyframes sway {
    0%, 100% { transform: rotate(-2deg); }
    50% { transform: rotate(2deg); }
}

.warning-text {
    margin-top: 15px;
    font-size: 0.9rem;
    color: var(--warning-color);
    animation: blink 1.5s ease-in-out infinite;
}

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

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 30px 0;
}

.menu-btn {
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    border: 2px solid var(--secondary-color);
    background: var(--background-light);
    color: var(--text-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.menu-btn.primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

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

.disclaimer {
    font-size: 0.75rem;
    color: var(--text-muted);
    max-width: 280px;
    margin: 0 auto;
}

/* Character Creation */
#character-screen h2 {
    text-align: center;
    margin-bottom: 25px;
    color: var(--primary-color);
}

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

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

.form-group input,
.form-group select {
    width: 100%;
    padding: 14px;
    font-size: 1rem;
    border: 2px solid var(--secondary-color);
    background: var(--background-light);
    color: var(--text-color);
    border-radius: 10px;
    outline: none;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--primary-color);
}

.background-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.background-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 10px;
    border: 2px solid var(--secondary-color);
    background: var(--background-light);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.background-btn.selected {
    border-color: var(--primary-color);
    background: rgba(233, 69, 96, 0.1);
}

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

.bg-icon {
    font-size: 2rem;
    margin-bottom: 5px;
}

.bg-name {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 3px;
}

.bg-bonus {
    font-size: 0.7rem;
    color: var(--success-color);
    text-align: center;
}

#start-game-btn {
    width: 100%;
    margin-top: 20px;
}

/* Main Game Screen */
#game-screen {
    display: none;
    flex-direction: column;
}

#game-screen.active {
    display: flex;
}

/* Stats Bar */
#stats-bar {
    display: flex;
    justify-content: space-around;
    padding: 12px 10px;
    background: var(--background-light);
    border-bottom: 1px solid var(--secondary-color);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
    font-weight: 600;
}

.stat-icon {
    font-size: 1rem;
}

#money-display {
    color: var(--money-color);
}

#health-display {
    color: var(--danger-color);
}

#energy-display {
    color: var(--warning-color);
}

.heat-stat #heat-display {
    color: var(--heat-color);
}

/* Location Bar */
#location-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: var(--secondary-color);
    font-size: 0.85rem;
}

#day-display {
    font-weight: 600;
}

#location-display {
    flex: 1;
    text-align: center;
}

.status-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.status-undocumented {
    background: var(--danger-color);
}

.status-working {
    background: var(--warning-color);
    color: #000;
}

.status-citizen {
    background: var(--success-color);
    color: #000;
}

.status-president {
    background: linear-gradient(90deg, #3b82f6, var(--primary-color));
}

/* Main Content Area */
#main-content {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#narrative-box {
    background: var(--background-light);
    padding: 15px;
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
}

#narrative-text {
    font-size: 0.95rem;
    line-height: 1.5;
}

#action-area {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Action Buttons */
.action-btn {
    display: flex;
    align-items: center;
    padding: 15px;
    background: var(--background-light);
    border: 2px solid var(--secondary-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.action-btn:active {
    transform: scale(0.98);
    border-color: var(--primary-color);
}

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

.action-icon {
    font-size: 1.8rem;
    margin-right: 12px;
}

.action-info {
    flex: 1;
}

.action-title {
    font-weight: 600;
    margin-bottom: 3px;
    color: var(--text-color);
}

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

.action-cost {
    font-size: 0.8rem;
    color: var(--warning-color);
    margin-left: 10px;
}

/* Job Cards */
.job-card {
    background: var(--background-light);
    border: 2px solid var(--secondary-color);
    border-radius: 12px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.job-card:active {
    border-color: var(--primary-color);
}

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

.job-title {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.job-pay {
    color: var(--money-color);
    font-weight: 600;
}

.job-details {
    display: flex;
    gap: 15px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.job-risk {
    color: var(--danger-color);
}

/* Quest Cards */
.quest-card {
    background: var(--background-light);
    border: 2px solid var(--secondary-color);
    border-radius: 12px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quest-card.active-quest {
    border-color: var(--primary-color);
}

.quest-card.completed {
    opacity: 0.6;
    border-color: var(--success-color);
}

.quest-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.quest-title {
    font-weight: 600;
    color: var(--primary-color);
}

.quest-type {
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 10px;
    background: var(--secondary-color);
}

.quest-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.quest-progress {
    height: 6px;
    background: var(--secondary-color);
    border-radius: 3px;
    overflow: hidden;
}

.quest-progress-fill {
    height: 100%;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

/* Location Cards */
.location-card {
    display: flex;
    align-items: center;
    background: var(--background-light);
    border: 2px solid var(--secondary-color);
    border-radius: 12px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.location-card:active {
    border-color: var(--primary-color);
}

.location-card.current {
    border-color: var(--success-color);
}

.location-icon {
    font-size: 2rem;
    margin-right: 12px;
}

.location-info {
    flex: 1;
}

.location-name {
    font-weight: 600;
    margin-bottom: 3px;
}

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

.location-danger {
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 10px;
    background: var(--danger-color);
}

/* Bottom Navigation */
#bottom-nav {
    display: flex;
    justify-content: space-around;
    padding: 8px 5px;
    padding-bottom: calc(8px + var(--safe-spacing));
    background: var(--background-light);
    border-top: 1px solid var(--secondary-color);
}

.nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 12px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s ease;
    border-radius: 8px;
}

.nav-btn:active,
.nav-btn.active {
    color: var(--primary-color);
    background: rgba(233, 69, 96, 0.1);
}

.nav-icon {
    font-size: 1.4rem;
    margin-bottom: 3px;
}

.nav-label {
    font-size: 0.7rem;
    font-weight: 600;
}

/* Modal */
#modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    padding: 20px;
}

#modal-overlay.hidden {
    display: none;
}

#modal-content {
    width: 100%;
    max-width: 400px;
    background: var(--background-light);
    border-radius: 16px;
    overflow: hidden;
    animation: modalIn 0.3s ease;
}

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

#modal-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 20px;
    background: var(--secondary-color);
}

#modal-icon {
    font-size: 1.5rem;
}

#modal-title {
    font-size: 1.1rem;
}

#modal-body {
    padding: 20px;
}

#modal-text {
    font-size: 0.95rem;
    line-height: 1.5;
}

#modal-choices {
    padding: 15px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.modal-choice {
    padding: 12px 15px;
    background: var(--background-dark);
    border: 2px solid var(--secondary-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    color: var(--text-color);
    font-size: 0.9rem;
}

.modal-choice:active {
    border-color: var(--primary-color);
    background: rgba(233, 69, 96, 0.1);
}

.modal-choice.danger {
    border-color: var(--danger-color);
}

.modal-choice.success {
    border-color: var(--success-color);
}

/* News Ticker */
#news-ticker {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--danger-color);
    display: flex;
    align-items: center;
    padding: 10px 15px;
    z-index: 90;
    animation: slideDown 0.3s ease;
}

#news-ticker.hidden {
    display: none;
}

@keyframes slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

.ticker-label {
    font-size: 0.7rem;
    font-weight: 700;
    background: #000;
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    margin-right: 10px;
    white-space: nowrap;
}

.ticker-content {
    flex: 1;
    overflow: hidden;
}

#ticker-text {
    font-size: 0.85rem;
    font-weight: 600;
    display: block;
    animation: scroll 15s linear;
}

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

#ticker-close {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
}

/* Toast Notifications */
#toast-container {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 80;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    padding: 12px 20px;
    background: var(--background-light);
    border-radius: 10px;
    font-size: 0.9rem;
    animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
    border-left: 4px solid var(--primary-color);
    pointer-events: auto;
}

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

.toast.warning {
    border-color: var(--warning-color);
}

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

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

@keyframes toastOut {
    to {
        transform: translateY(-20px);
        opacity: 0;
    }
}

/* About Screen */
#about-screen .about-text {
    background: var(--background-light);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

#about-screen ul {
    margin: 15px 0;
    padding-left: 20px;
}

#about-screen li {
    margin-bottom: 8px;
    color: var(--text-muted);
}

#about-screen .warning {
    color: var(--warning-color);
    margin: 15px 0;
}

#about-screen h2 {
    text-align: center;
    margin-bottom: 20px;
    color: var(--primary-color);
}

/* Endgame Screen */
#endgame-screen {
    text-align: center;
}

#endgame-title {
    font-size: 2rem;
    color: var(--success-color);
    margin-bottom: 20px;
}

#endgame-content {
    background: var(--background-light);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    text-align: left;
}

#endgame-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

.endgame-stat {
    background: var(--background-light);
    padding: 15px;
    border-radius: 10px;
}

.endgame-stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.endgame-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Inventory Items */
.inventory-item {
    display: flex;
    align-items: center;
    padding: 12px;
    background: var(--background-light);
    border: 2px solid var(--secondary-color);
    border-radius: 10px;
    margin-bottom: 10px;
}

.item-icon {
    font-size: 1.8rem;
    margin-right: 12px;
}

.item-info {
    flex: 1;
}

.item-name {
    font-weight: 600;
}

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

.item-use-btn {
    padding: 8px 15px;
    background: var(--primary-color);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}

/* Menu Panel */
.menu-panel {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.menu-panel button {
    width: 100%;
    text-align: left;
}

/* Character Stats Panel */
.stats-panel {
    background: var(--background-light);
    border-radius: 12px;
    padding: 15px;
}

.stats-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.stats-avatar {
    font-size: 2.5rem;
}

.stats-name {
    font-weight: 700;
    font-size: 1.2rem;
}

.stats-origin {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--secondary-color);
}

.stat-row:last-child {
    border-bottom: none;
}

.stat-name {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stat-value {
    font-weight: 600;
    color: var(--primary-color);
}

/* Election/Endgame Special */
.election-panel {
    text-align: center;
    padding: 20px;
}

.election-vs {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin: 20px 0;
}

.candidate {
    text-align: center;
}

.candidate-portrait {
    font-size: 4rem;
    margin-bottom: 10px;
}

.candidate-name {
    font-weight: 700;
}

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

.vs-text {
    font-size: 2rem;
    font-weight: 900;
    color: var(--primary-color);
}

.poll-bar {
    height: 30px;
    background: var(--secondary-color);
    border-radius: 15px;
    overflow: hidden;
    display: flex;
    margin: 20px 0;
}

.poll-you {
    background: var(--success-color);
    transition: width 0.5s ease;
}

.poll-opponent {
    background: var(--danger-color);
    transition: width 0.5s ease;
}

/* Responsive adjustments for larger phones */
@media (min-width: 400px) {
    .game-title {
        font-size: 3rem;
    }

    .statue-liberty {
        font-size: 6rem;
    }
}

/* Landscape mode adjustments */
@media (orientation: landscape) and (max-height: 500px) {
    #stats-bar {
        padding: 8px;
    }

    #location-bar {
        padding: 6px 15px;
    }

    #bottom-nav {
        padding: 5px;
    }

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

/* ===== 2D GAME ENGINE STYLES ===== */

/* Game Canvas Container */
#game-canvas-container {
    width: 100%;
    height: calc(100% - 160px); /* Leave room for virtual controls */
    display: flex;
    justify-content: center;
    align-items: center;
    background: #1a1a2e;
    position: relative;
    overflow: hidden;
}

#game-canvas {
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    border: 2px solid var(--secondary-color);
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(233, 69, 96, 0.2);
}

/* Virtual Controls (Mobile D-Pad) */
/* Hidden by default - only shown when 2D game mode is active */
.virtual-controls {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 150px;
    display: none; /* Hidden by default */
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    padding-bottom: env(safe-area-inset-bottom, 10px);
    background: linear-gradient(to top, rgba(26, 26, 46, 0.95), transparent);
    z-index: 50;
    touch-action: none;
}

/* Only show virtual controls when 2D game mode is active */
body.game-2d-active .virtual-controls {
    display: flex;
}

/* D-Pad */
.dpad {
    position: relative;
    width: 120px;
    height: 120px;
}

.dpad-up, .dpad-down, .dpad-left, .dpad-right {
    position: absolute;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    transition: background 0.1s, transform 0.1s;
}

.dpad-up {
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 8px 8px 4px 4px;
}

.dpad-down {
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 4px 4px 8px 8px;
}

.dpad-left {
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 8px 4px 4px 8px;
}

.dpad-right {
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 4px 8px 8px 4px;
}

.dpad-center {
    position: absolute;
    width: 40px;
    height: 40px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.dpad-up.active, .dpad-down.active, .dpad-left.active, .dpad-right.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateX(-50%) scale(0.95);
}

.dpad-left.active {
    transform: translateY(-50%) scale(0.95);
}

.dpad-right.active {
    transform: translateY(-50%) scale(0.95);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.action-btn-a, .action-btn-b {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-color);
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.1s;
    touch-action: none;
}

.action-btn-a {
    background: rgba(74, 222, 128, 0.3);
    border-color: rgba(74, 222, 128, 0.6);
}

.action-btn-b {
    background: rgba(233, 69, 96, 0.3);
    border-color: rgba(233, 69, 96, 0.6);
    width: 40px;
    height: 40px;
    font-size: 1rem;
}

.action-btn-a.pressed, .action-btn-b.pressed {
    transform: scale(0.9);
    background: var(--primary-color);
}

/* Menu Button */
.menu-btn-virtual {
    position: absolute;
    top: -130px;
    right: 20px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: bold;
    letter-spacing: 1px;
    cursor: pointer;
}

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

/* Dialogue Overlay */
#dialogue-overlay {
    position: fixed;
    bottom: 160px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 20px);
    max-width: 400px;
    z-index: 60;
}

#dialogue-overlay.hidden {
    display: none;
}

#dialogue-box {
    background: rgba(26, 26, 46, 0.95);
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    padding: 15px;
    animation: dialogueIn 0.2s ease;
}

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

#dialogue-speaker {
    font-weight: bold;
    color: var(--primary-color);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

#dialogue-text {
    color: var(--text-color);
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 12px;
}

#dialogue-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dialogue-option {
    padding: 10px 15px;
    background: var(--background-light);
    border: 1px solid var(--secondary-color);
    border-radius: 8px;
    color: var(--text-color);
    font-size: 0.85rem;
    cursor: pointer;
    text-align: left;
    transition: all 0.1s;
}

.dialogue-option:active {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

/* Game Menu Overlay */
#game-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 70;
}

#game-menu-overlay.hidden {
    display: none;
}

#game-menu-content {
    background: var(--background-light);
    border: 2px solid var(--secondary-color);
    border-radius: 16px;
    padding: 20px;
    width: calc(100% - 40px);
    max-width: 350px;
}

#game-menu-content h3 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 15px;
}

#game-menu-stats {
    background: var(--background-dark);
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 15px;
    font-size: 0.85rem;
}

#game-menu-stats .stat-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px solid var(--secondary-color);
}

#game-menu-stats .stat-row:last-child {
    border-bottom: none;
}

#game-menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.game-menu-btn {
    padding: 12px 15px;
    background: var(--background-dark);
    border: 2px solid var(--secondary-color);
    border-radius: 10px;
    color: var(--text-color);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.1s;
}

.game-menu-btn:active {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.game-menu-btn.danger {
    border-color: var(--danger-color);
    color: var(--danger-color);
}

.game-menu-btn.danger:active {
    background: var(--danger-color);
    color: white;
}

/* Game Screen Layout */
#game-screen {
    display: none;
    flex-direction: column;
    background: var(--background-dark);
    height: 100%;
    width: 100%;
    overflow: hidden;
    position: absolute;
    top: 0;
    left: 0;
}

#game-screen.active {
    display: flex;
}

/* Desktop adjustments - hide virtual controls */
@media (hover: hover) and (pointer: fine) {
    .virtual-controls {
        display: none;
    }

    #dialogue-overlay {
        bottom: 20px;
    }
}

/* Small screens */
@media (max-height: 600px) {
    .virtual-controls {
        height: 120px;
    }

    .dpad {
        width: 100px;
        height: 100px;
    }

    .dpad-up, .dpad-down, .dpad-left, .dpad-right {
        width: 32px;
        height: 32px;
    }

    .dpad-center {
        width: 32px;
        height: 32px;
    }

    .action-btn-a {
        width: 45px;
        height: 45px;
    }

    .action-btn-b {
        width: 35px;
        height: 35px;
    }
}
