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

body {
    font-family: 'Press Start 2P', monospace;
    background: linear-gradient(45deg, #6A1B9A, #8E24AA);
    min-height: 100vh;
    color: #2D1B69;
    image-rendering: pixelated;
    overflow-x: hidden;
}

.game-container {
    max-width: 1400px;
    margin: 0 auto;
    min-height: 100vh;
    background: linear-gradient(180deg, #F3E5F5 0%, #E1BEE7 100%);
    box-shadow: 0 0 50px rgba(106, 27, 154, 0.3);
}

.game-header {
    background: linear-gradient(90deg, #6A1B9A, #8E24AA);
    color: #F3E5F5;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 8px rgba(45, 27, 105, 0.3);
    border-bottom: 4px solid #4A148C;
    position: relative;
}

.game-header::before {
    content: '🚗💨🚗💨🚗💨🚗💨🚗💨';
    position: absolute;
    bottom: -15px;
    left: 0;
    right: 0;
    font-size: 12px;
    animation: drive 10s linear infinite;
    opacity: 0.6;
}

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

.title {
    font-size: 16px;
    text-shadow: 2px 2px 0px #4A148C;
    letter-spacing: 2px;
}

.meters {
    display: flex;
    gap: 30px;
    align-items: center;
}

.meter {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 10px;
}

.meter label {
    margin: 0;
}

.meter-frustration {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.frustration-labels {
    display: flex;
    justify-content: space-between;
    font-size: 7px;
}

.frustration-label {
    white-space: nowrap;
}

.frustration-bar {
    width: 150px;
    height: 12px;
    background: #2D1B69;
    border: 2px solid #F3E5F5;
    position: relative;
    border-radius: 2px;
}

.frustration-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #FFC107, #FF5722);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 1px;
}

.screen {
    display: none;
    min-height: calc(100vh - 80px);
    padding: 20px;
}

.screen.active {
    display: block;
    animation: fadeIn 0.5s ease-in-out;
}

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

.front-page-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

.logo {
    margin-bottom: 40px;
}

.logo h1 {
    font-size: 28px;
    color: #6A1B9A;
    text-shadow: 3px 3px 0px #4A148C;
    margin-bottom: 10px;
    letter-spacing: 3px;
}

.logo .subtitle {
    font-size: 12px;
    color: #8E24AA;
    margin-bottom: 20px;
}

.game-description {
    background: #F3E5F5;
    border: 4px solid #6A1B9A;
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: 6px 6px 0px #4A148C;
}

.game-description p {
    font-size: 10px;
    line-height: 1.8;
    margin-bottom: 15px;
    color: #2D1B69;
}

.features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.feature {
    font-size: 9px;
    color: #6A1B9A;
    text-align: center;
    padding: 10px;
    background: #E1BEE7;
    border: 2px solid #6A1B9A;
}

.main-button {
    font-size: 14px !important;
    padding: 20px 40px !important;
    position: relative;
    overflow: hidden;
}

.button-car {
    display: inline-block;
    margin-right: 10px;
    animation: wiggle 1s ease-in-out infinite;
}

@keyframes wiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-3deg); }
    75% { transform: rotate(3deg); }
}

.card {
    background: #F3E5F5;
    border: 6px solid #2D1B69;
    border-radius: 0;
    padding: 30px;
    max-width: 1100px;
    margin: 0 auto;
    box-shadow: 8px 8px 0px #4A148C;
    position: relative;
}

.card::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: #6A1B9A;
    z-index: -1;
    border-radius: 0;
}

h2 {
    text-align: center;
    font-size: 18px;
    margin-bottom: 10px;
    color: #6A1B9A;
    text-shadow: 1px 1px 0px #4A148C;
}

h3 {
    font-size: 10px;
    color: #6A1B9A;
    margin-bottom: 15px;
}

h4 {
    font-size: 9px;
    color: #6A1B9A;
    margin: 20px 0 10px 0;
}

.subtitle {
    text-align: center;
    font-size: 8px;
    color: #8E24AA;
    margin-bottom: 30px;
}

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

label {
    display: block;
    margin-bottom: 8px;
    font-size: 10px;
    color: #2D1B69;
}

input[type="text"] {
    width: 100%;
    padding: 10px;
    font-family: 'Press Start 2P', monospace;
    font-size: 10px;
    background: #F9F9F9;
    border: 3px solid #2D1B69;
    border-radius: 0;
    color: #2D1B69;
}

input[type="text"]:focus {
    outline: none;
    background: #FFF;
    box-shadow: inset 0 0 10px rgba(106, 27, 154, 0.3);
}

.radio-group-horizontal {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
}

input[type="radio"] {
    transform: scale(1.3);
    accent-color: #6A1B9A;
    cursor: pointer;
}

.radio-option label {
    font-size: 9px;
    cursor: pointer;
    margin: 0;
}

.character-preview {
    background: #E1BEE7;
    border: 3px solid #2D1B69;
    padding: 20px;
    text-align: center;
    margin: 20px 0;
}

.pixel-character {
    font-size: 48px;
    margin-bottom: 10px;
}

.character-info {
    font-size: 8px;
}

#preview-name {
    color: #6A1B9A;
    margin-bottom: 5px;
    font-weight: bold;
}

.city-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.city-card {
    background: #E1BEE7;
    border: 4px solid #2D1B69;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.city-card:hover {
    background: #E8C5EA;
    transform: translateY(-2px);
}

.city-card.selected {
    background: #6A1B9A;
    color: #F3E5F5;
    box-shadow: 0 0 20px rgba(106, 27, 154, 0.5);
}

.city-image {
    font-size: 32px;
    margin-bottom: 10px;
}

.city-card h3 {
    font-size: 12px;
    margin-bottom: 15px;
    color: inherit;
    text-shadow: none;
}

.city-description {
    font-size: 7px;
    line-height: 1.6;
    color: inherit;
}

.selected-city-info {
    text-align: center;
    background: #E1BEE7;
    border: 3px solid #6A1B9A;
    padding: 20px;
    margin-top: 20px;
}

.selected-city-info h3 {
    text-align: center;
    margin-bottom: 15px;
}

.selected-city-info p {
    font-size: 9px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.button {
    background: linear-gradient(45deg, #6A1B9A, #8E24AA);
    color: #F3E5F5;
    border: 4px solid #2D1B69;
    padding: 15px 25px;
    font-family: 'Press Start 2P', monospace;
    font-size: 10px;
    cursor: pointer;
    display: block;
    margin: 20px auto;
    text-transform: uppercase;
    box-shadow: 4px 4px 0px #4A148C;
    transition: all 0.1s ease;
    position: relative;
}

.button:hover {
    background: linear-gradient(45deg, #8E24AA, #6A1B9A);
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px #4A148C;
}

.button:active {
    transform: translate(4px, 4px);
    box-shadow: 0px 0px 0px #4A148C;
}

.game-content-full {
    display: flex;
    justify-content: center;
    min-height: calc(100vh - 120px);
}

.story-panel-full {
    background: #F3E5F5;
    border: 4px solid #2D1B69;
    padding: 30px;
    max-width: 1300px;
    width: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 8px 8px 0px #4A148C;
}

.year-display {
    text-align: center;
    margin-bottom: 20px;
}

.year {
    background: #6A1B9A;
    color: #F3E5F5;
    padding: 10px 20px;
    font-size: 14px;
    border: 3px solid #2D1B69;
    display: inline-block;
    text-shadow: 1px 1px 0px #4A148C;
    margin-bottom: 5px;
}

.generation {
    font-size: 8px;
    color: #8E24AA;
}

.narrative-text {
    background: #E1BEE7;
    border: 3px solid #2D1B69;
    padding: 20px;
    margin-bottom: 20px;
    font-size: 9px;
    line-height: 1.8;
    border-radius: 2px;
}

.narrative-copy {
    margin-bottom: 15px;
}

.narrative-image {
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: contain;
    object-position: center;
    margin-top: 15px;
    border: 2px solid #2D1B69;
    display: block;
    background: #F3E5F5;
}

.fact-box-inline {
    background: #FFE082;
    border: 3px solid #F57C00;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 2px;
}

.fact-title {
    font-size: 8px;
    color: #E65100;
    margin-bottom: 8px;
    font-weight: bold;
    text-align: center;
}

#fact-content {
    font-size: 7px;
    line-height: 1.6;
    color: #2D1B69;
    margin-bottom: 8px;
}

.fact-link {
    font-size: 6px;
    color: #6A1B9A;
    text-decoration: none;
    display: inline-block;
}

.fact-link:hover {
    text-decoration: underline;
}

/* CLEARER CHOICE SECTION */
.choices-section {
    margin-top: auto;
    padding-top: 20px;
}

.choices-header {
    text-align: center;
    font-size: 10px;
    color: #6A1B9A;
    margin-bottom: 15px;
    padding: 10px;
    background: linear-gradient(90deg, transparent, #D4A5D7, transparent);
    border-top: 2px solid #6A1B9A;
    border-bottom: 2px solid #6A1B9A;
    text-shadow: 1px 1px 0px #4A148C;
}

.choices {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.choice-button {
    background: linear-gradient(135deg, #E1BEE7, #D4A5D7);
    border: 4px solid #2D1B69;
    padding: 18px;
    font-family: 'Press Start 2P', monospace;
    font-size: 8px;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
    color: #2D1B69;
    border-radius: 0;
    line-height: 1.6;
    box-shadow: 6px 6px 0px rgba(45, 27, 105, 0.6);
    position: relative;
}

.choice-button::before {
    content: '→';
    position: absolute;
    left: -15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: #6A1B9A;
    opacity: 0;
    transition: all 0.2s ease;
}

.choice-button:hover {
    background: linear-gradient(135deg, #D4A5D7, #C48ECE);
    transform: translateX(5px);
    box-shadow: 10px 10px 0px rgba(45, 27, 105, 0.8);
}

.choice-button:hover::before {
    opacity: 1;
    left: 8px;
}

.choice-button.forced-choice {
    background: linear-gradient(135deg, #FFCCBC, #FFAB91);
    border-color: #D84315;
    border-width: 5px;
    box-shadow: 8px 8px 0px rgba(216, 67, 21, 0.6);
}

.choice-button.forced-choice:hover {
    background: linear-gradient(135deg, #FFAB91, #FF8A65);
    box-shadow: 12px 12px 0px rgba(216, 67, 21, 0.8);
}

.result-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(45, 27, 105, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.result-box {
    background: #F3E5F5;
    border: 6px solid #2D1B69;
    padding: 30px;
    max-width: 800px;
    width: 100%;
    box-shadow: 8px 8px 0px #4A148C;
    max-height: 90vh;
    overflow-y: auto;
}

.result-title {
    font-size: 12px;
    color: #6A1B9A;
    margin-bottom: 20px;
    text-align: center;
    text-shadow: 1px 1px 0px #4A148C;
}

.result-text {
    font-size: 9px;
    line-height: 1.8;
    margin-bottom: 20px;
    color: #2D1B69;
}

.money-change {
    background: #E1BEE7;
    border: 3px solid #6A1B9A;
    padding: 15px;
    margin: 20px 0;
    text-align: center;
}

.money-animation {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
    animation: moneyPulse 0.5s ease-in-out;
}

@keyframes moneyPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.money-spent {
    color: #FF5722;
}

.money-gained {
    color: #4CAF50;
}

.stat-summary {
    background: #E1BEE7;
    border: 2px solid #6A1B9A;
    padding: 15px;
    margin-top: 15px;
    font-size: 8px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.resource-section {
    background: #E1BEE7;
    border: 3px solid #6A1B9A;
    padding: 25px;
    margin: 20px 0;
    font-size: 8px;
    line-height: 1.8;
}

.resource-section p {
    margin-bottom: 15px;
    font-size: 9px;
}

.resource-link {
    display: block;
    font-size: 8px;
    color: #6A1B9A;
    text-decoration: none;
    margin-bottom: 10px;
    padding: 8px 0;
    transition: all 0.2s ease;
}

.resource-link:hover {
    text-decoration: underline;
    transform: translateX(5px);
}

@media (max-width: 768px) {
    .game-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .title {
        font-size: 12px;
    }

    .meters {
        justify-content: center;
        flex-wrap: wrap;
        gap: 15px;
    }

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

    .city-options {
        grid-template-columns: 1fr;
    }

    .card {
        margin: 10px;
        padding: 20px;
    }

    .logo h1 {
        font-size: 20px;
    }

    .radio-group-horizontal {
        flex-direction: column;
        gap: 10px;
    }

    .story-panel-full {
        padding: 20px;
    }
}