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

:root {
    --bg-dark: #1a1a2e;
    --bg-card: #16213e;
    --accent-pink: #e94560;
    --accent-purple: #7b2cbf;
    --accent-blue: #0f3460;
    --text-light: #eee;
    --text-muted: #888;
    --gold: #ffd700;
    --green: #4ade80;
    --red: #ef4444;
}

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

#game-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.screen {
    display: none !important;
}

.screen.active {
    display: flex !important;
    flex-direction: column;
}

#dating-style-screen.active,
#character-screen.active,
#goal-screen.active,
#game-screen.active,
#ending-screen.active {
    display: block !important;
}

/* Title Screen */
#title-screen {
    text-align: center;
    padding: 60px 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#title-screen h1 {
    font-size: clamp(1.8rem, 11vw, 5rem);
    letter-spacing: 0;
    background: linear-gradient(135deg, var(--accent-pink), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
    text-shadow: 0 0 40px rgba(233, 69, 96, 0.3);
    width: 100%;
    text-align: center;
    box-sizing: border-box;
}

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

.tagline {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    line-height: 1.6;
}

.title-art {
    font-size: 5rem;
    margin-bottom: 10px;
    animation: float 3s ease-in-out infinite;
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--accent-pink), var(--accent-purple));
    border: none;
    color: white;
    padding: 15px 40px;
    font-size: 1.2rem;
    border-radius: 30px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(233, 69, 96, 0.5);
}

/* Dating Style Selection */
#dating-style-screen {
    padding: 40px 20px;
    text-align: center;
}

#dating-style-screen h2 {
    font-size: 1.8rem;
    margin-bottom: 40px;
    color: var(--accent-pink);
}

.dating-style-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.dating-style-card {
    background: var(--bg-card);
    border: 2px solid var(--accent-purple);
    border-radius: 15px;
    padding: 30px 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.dating-style-card:hover {
    border-color: var(--accent-pink);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(233, 69, 96, 0.2);
}

.dating-style-card .emoji {
    font-size: 3rem;
    display: block;
    margin-bottom: 15px;
}

.dating-style-card h3 {
    margin-bottom: 10px;
    color: var(--accent-pink);
}

.dating-style-card .flavor {
    color: var(--text-muted);
    font-style: italic;
    font-size: 0.9rem;
}

/* Character Selection */
#character-screen {
    padding: 40px 20px;
    text-align: center;
}

#character-screen h2 {
    font-size: 2rem;
    margin-bottom: 40px;
}

.stats-legend {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding: 10px 15px;
    background: var(--bg-card);
    border-radius: 8px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.stats-legend span {
    font-size: 0.85rem;
    color: var(--text-muted);
    cursor: help;
}

.character-options {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
    justify-content: center;
}

.character-options .character-card {
    flex: 1 1 200px;
    max-width: 280px;
}

.character-options .character-card.locked {
    order: 99;
}

.character-card {
    background: var(--bg-card);
    border: 2px solid var(--accent-blue);
    border-radius: 15px;
    padding: 30px 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.character-card:hover {
    border-color: var(--accent-pink);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(233, 69, 96, 0.2);
}

.character-card .emoji {
    font-size: 3rem;
    display: block;
    margin-bottom: 15px;
}

.character-card h3 {
    margin-bottom: 10px;
    color: var(--accent-pink);
}

.character-card .flavor {
    color: var(--text-muted);
    font-style: italic;
    font-size: 0.9rem;
    margin-top: 10px;
}

/* Locked character cards */
.character-card.locked {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: var(--text-muted);
    position: relative;
}

.character-card.locked:hover {
    transform: none;
    border-color: var(--text-muted);
    box-shadow: none;
}

.character-card.locked .emoji {
    filter: grayscale(100%);
}

.unlock-hint {
    font-size: 0.75rem;
    color: var(--gold);
    margin-top: 8px;
    font-weight: bold;
}

.special-rule {
    font-size: 0.7rem;
    color: var(--accent-pink);
    margin-top: 6px;
    font-style: italic;
}

/* Goal Selection Screen */
#goal-screen {
    text-align: center;
    padding: 40px 20px;
}

#goal-screen h2 {
    font-size: 2rem;
    margin-bottom: 10px;
    color: var(--accent-pink);
}

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

.goal-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
}

.goal-card {
    background: var(--bg-card);
    border: 2px solid var(--accent-blue);
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.goal-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-pink);
    box-shadow: 0 10px 30px rgba(233, 69, 96, 0.2);
}

.goal-card .emoji {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 10px;
}

.goal-card h3 {
    margin-bottom: 8px;
    color: var(--text-light);
}

.goal-card .goal-req {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.goal-card .goal-bonus {
    font-size: 0.85rem;
    color: var(--green);
    margin-bottom: 8px;
    font-weight: bold;
}

.goal-card .flavor {
    font-style: italic;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Committed Goal Display */
.committed-goal-display {
    margin: 10px 0;
}

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

.current-goal-req {
    text-align: center;
    margin-top: 5px;
}

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

.goal-badge {
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
}

.switch-goal-btn {
    background: transparent;
    border: 1px solid var(--text-muted);
    color: var(--text-muted);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.switch-goal-btn:hover {
    border-color: var(--accent-pink);
    color: var(--accent-pink);
}

/* Goal Switch Dialog */
.goal-switch-dialog {
    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;
}

.goal-switch-content {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 15px;
    max-width: 400px;
    text-align: center;
    border: 2px solid var(--accent-purple);
}

.goal-switch-content h3 {
    margin-bottom: 15px;
    color: var(--accent-pink);
}

.goal-switch-content p {
    margin-bottom: 10px;
    color: var(--text-muted);
}

.goal-switch-content .current-energy {
    color: var(--gold);
    margin-bottom: 20px;
}

.goal-switch-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.goal-switch-option {
    background: var(--bg-dark);
    border: 2px solid var(--accent-blue);
    color: var(--text-light);
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.goal-switch-option:hover:not(.disabled) {
    border-color: var(--accent-pink);
    background: var(--accent-blue);
}

.goal-switch-option.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.goal-switch-cancel {
    background: transparent;
    border: 1px solid var(--text-muted);
    color: var(--text-muted);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.goal-switch-cancel:hover {
    border-color: var(--text-light);
    color: var(--text-light);
}

/* Goal Explanation Dialog */
.goal-explanation-dialog {
    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;
}

.goal-explanation-content {
    background: var(--bg-card);
    padding: 25px;
    border-radius: 15px;
    max-width: 350px;
    text-align: left;
    border: 2px solid var(--gold);
}

.goal-explanation-content h3 {
    margin-bottom: 15px;
    color: var(--gold);
    text-align: center;
    font-size: 1.3rem;
}

.goal-explanation-content p {
    margin-bottom: 12px;
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.4;
}

.goal-explanation-content .goal-desc {
    color: var(--text-muted);
    font-style: italic;
}

.goal-explanation-content .goal-progress-detail {
    color: var(--accent-pink);
    background: var(--bg-dark);
    padding: 10px;
    border-radius: 8px;
}

.goal-explanation-close {
    display: block;
    width: 100%;
    background: var(--gold);
    color: var(--bg-dark);
    border: none;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    margin-top: 15px;
    transition: all 0.2s;
}

.goal-explanation-close:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* Game Screen */
#game-screen {
    padding: 20px 0;
}

#game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background: var(--bg-card);
    border-radius: 10px;
    margin-bottom: 20px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.character-info {
    font-size: 0.9rem;
    color: var(--accent-pink);
    font-weight: 600;
}

.turn-counter, .season-indicator {
    font-size: 1.1rem;
}

.season-indicator span {
    color: var(--gold);
    display: inline-block;
    transition: all 0.5s ease;
}

.season-indicator span.season-change {
    animation: seasonTransition 0.8s ease-out;
}

@keyframes seasonTransition {
    0% {
        opacity: 0;
        transform: translateY(-10px) scale(0.8);
    }
    50% {
        transform: translateY(2px) scale(1.1);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Season-specific colors */
.season-indicator.spring span { color: #90EE90; }
.season-indicator.summer span { color: #FFD700; }
.season-indicator.autumn span { color: #FF8C00; }
.season-indicator.winter span { color: #87CEEB; }

.season-effect {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: block;
    margin-top: 2px;
    animation: fadeIn 0.5s ease-out;
}

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

/* Resources Bar */
#resources-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    padding: 20px;
    background: var(--bg-card);
    border-radius: 10px;
    margin-bottom: 20px;
    position: sticky;
    top: 60px;
    z-index: 99;
}

.resource {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 100px;
}

.resource-icon {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.resource-name {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.resource-bar-container {
    width: 80px;
    height: 8px;
    background: var(--bg-dark);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 5px;
}

.resource-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-pink), var(--accent-purple));
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 3px;
}

.resource-bar.pulse-up {
    animation: pulseUp 0.5s ease-out;
}

.resource-bar.pulse-down {
    animation: pulseDown 0.5s ease-out;
}

@keyframes pulseUp {
    0% { filter: brightness(1); }
    50% { filter: brightness(1.8); box-shadow: 0 0 10px var(--green); }
    100% { filter: brightness(1); }
}

@keyframes pulseDown {
    0% { filter: brightness(1); }
    50% { filter: brightness(0.5); box-shadow: 0 0 10px var(--red); }
    100% { filter: brightness(1); }
}

.resource-value {
    font-weight: bold;
}

.resource-value.changed-up {
    animation: valuePopUp 0.4s ease-out;
    color: var(--green);
}

.resource-value.changed-down {
    animation: valuePopDown 0.4s ease-out;
    color: var(--red);
}

@keyframes valuePopUp {
    0% { transform: scale(1); }
    50% { transform: scale(1.4); }
    100% { transform: scale(1); }
}

@keyframes valuePopDown {
    0% { transform: scale(1); }
    50% { transform: scale(0.8); }
    100% { transform: scale(1); }
}

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

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

@keyframes confettiFall {
    0% {
        transform: translateY(-100%) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Compass Toggle Button */
.compass-toggle-btn {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--accent-blue);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 100;
    transition: transform 0.2s, background 0.2s;
}

.compass-toggle-btn:hover {
    transform: scale(1.1);
    background: var(--accent-blue);
}

/* Destiny Compass Popup */
#destiny-compass {
    position: fixed;
    bottom: 140px;
    right: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    background: var(--bg-card);
    border-radius: 10px;
    border: 1px solid var(--accent-blue);
    z-index: 99;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

#destiny-compass.hidden {
    display: none;
}

.compass-container {
    width: 180px;
    height: 180px;
}

.compass-svg {
    width: 100%;
    height: 100%;
}

.compass-label {
    font-size: 10px;
    fill: var(--text-muted);
    font-family: inherit;
}

#destiny-polygon {
    transition: all 0.5s ease;
}

#destiny-dot {
    transition: all 0.5s ease;
}

.compass-hint {
    margin-top: 10px;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-style: italic;
    text-align: center;
}

.dating-style-display {
    text-align: center;
    margin: 8px 0;
}

.dating-style-badge {
    display: inline-block;
    padding: 4px 12px;
    background: linear-gradient(135deg, var(--accent-pink), var(--accent-purple));
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
}

.section-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    margin: 10px 0 5px 0;
    text-align: center;
}

.win-conditions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 15px;
    margin-top: 5px;
    padding-top: 8px;
    border-top: 1px solid var(--accent-blue);
}

.win-condition {
    font-size: 0.75rem;
    color: var(--green);
}

.win-condition.lose {
    color: var(--red);
}

/* Main Area */
#main-area {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    #game-container {
        padding: 10px;
    }

    /* Title Screen Mobile */
    #title-screen {
        padding: 40px 15px;
    }

    .subtitle {
        font-size: 0.85rem;
    }

    .tagline {
        font-size: 0.9rem;
        margin-bottom: 30px;
    }

    .title-art {
        font-size: 3.5rem;
        margin-bottom: 5px;
    }

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

    /* Dating Style Selection Mobile */
    #dating-style-screen {
        padding: 15px 10px;
        min-height: auto;
    }

    #dating-style-screen h2 {
        font-size: 1.2rem;
        margin-bottom: 15px;
        margin-top: 0;
    }

    .dating-style-options {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .dating-style-card {
        padding: 12px 8px;
        border-radius: 10px;
    }

    .dating-style-card .emoji {
        font-size: 1.8rem;
        margin-bottom: 6px;
    }

    .dating-style-card h3 {
        font-size: 0.8rem;
        margin-bottom: 4px;
    }

    .dating-style-card .flavor {
        font-size: 0.65rem;
        line-height: 1.2;
    }

    /* Goal Selection Mobile */
    #goal-screen {
        padding: 15px 10px;
        min-height: auto;
    }

    #goal-screen h2 {
        font-size: 1.2rem;
        margin-bottom: 8px;
        margin-top: 0;
    }

    .goal-intro {
        font-size: 0.75rem;
        margin-bottom: 12px;
    }

    .goal-options {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .goal-card {
        padding: 10px 8px;
        border-radius: 10px;
    }

    .goal-card .emoji {
        font-size: 1.6rem;
        margin-bottom: 4px;
    }

    .goal-card h3 {
        font-size: 0.75rem;
        margin-bottom: 4px;
    }

    .goal-card .goal-req {
        font-size: 0.55rem;
        margin-bottom: 3px;
        line-height: 1.2;
    }

    .goal-card .goal-bonus {
        font-size: 0.6rem;
        margin-bottom: 4px;
    }

    .goal-card .flavor {
        font-size: 0.55rem;
        line-height: 1.2;
    }

    /* Character Selection Mobile */
    #character-screen {
        padding: 20px 10px;
        min-height: auto;
    }

    #character-screen h2 {
        font-size: 1.5rem;
        margin-bottom: 15px;
        margin-top: 0;
    }

    .character-options {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .character-card {
        padding: 15px 10px;
        text-align: center;
    }

    .character-card .emoji {
        font-size: 2rem;
        margin-bottom: 8px;
    }

    .character-card h3 {
        font-size: 0.9rem;
        margin-bottom: 8px;
        white-space: nowrap;
    }

    .character-card p {
        font-size: 0.65rem;
        margin-bottom: 4px;
        line-height: 1.3;
    }

    .character-card .flavor {
        font-size: 0.6rem;
        margin-top: 6px;
        display: none; /* Hide flavor text on mobile to save space */
    }

    .unlock-hint {
        font-size: 0.6rem;
    }

    /* Game Header Mobile - Sticky Compact */
    #game-header {
        position: sticky;
        top: 0;
        z-index: 100;
        background: var(--bg-dark);
        padding: 6px 10px;
        margin: -5px -5px 0 -5px;
        border-bottom: 1px solid var(--accent-blue);
        flex-wrap: wrap;
        gap: 8px;
        justify-content: center;
    }

    .character-info {
        font-size: 0.65rem;
    }

    .turn-counter, .season-indicator {
        font-size: 0.75rem;
    }

    /* Resources Bar Mobile - Compact */
    #resources-bar {
        position: sticky;
        top: 32px;
        z-index: 99;
        background: var(--bg-dark);
        margin: 0 -5px 5px -5px;
        padding: 5px 8px;
        border-bottom: 1px solid var(--accent-blue);
        gap: 4px;
    }

    .resource {
        min-width: 50px;
    }

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

    .resource-name {
        font-size: 0.5rem;
    }

    .resource-bar-container {
        width: 40px;
        height: 4px;
    }

    .resource-value {
        font-size: 0.7rem;
    }

    /* Destiny Compass Mobile - Hide radar, show goals */
    #game-screen {
        display: flex;
        flex-direction: column;
        padding: 5px !important;
    }

    .compass-toggle-btn {
        bottom: 70px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    #destiny-compass {
        bottom: 120px;
        right: 10px;
        padding: 10px;
    }

    .compass-container {
        width: 150px;
        height: 150px;
    }

    .win-conditions {
        display: flex !important;
        flex-wrap: wrap;
        gap: 2px 6px;
        padding: 4px 6px;
        background: var(--bg-card);
        border-radius: 6px;
        margin: 0;
    }

    .win-condition {
        font-size: 0.5rem;
    }

    /* Committed goal display */
    .committed-goal-display {
        margin: 3px 0;
    }

    .goal-badge {
        font-size: 0.7rem !important;
        padding: 2px 8px !important;
    }

    .dating-style-display {
        display: none; /* Hide on mobile to save space */
    }

    /* Main Area Mobile */
    #main-area {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    /* Game Card Mobile - Ultra Compact */
    .game-card {
        width: 100% !important;
        max-width: 100% !important;
        min-height: auto !important;
        padding: 6px 10px !important;
        margin: 0 0 5px 0 !important;
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        gap: 4px !important;
        border-radius: 6px !important;
    }

    .card-type {
        font-size: 0.45rem !important;
        width: 100% !important;
        margin-bottom: 0 !important;
        order: 1 !important;
    }

    .card-art {
        font-size: 1.4rem !important;
        margin: 0 !important;
        order: 2 !important;
        flex-shrink: 0 !important;
    }

    .card-title {
        font-size: 0.8rem !important;
        margin-bottom: 0 !important;
        order: 3 !important;
        flex: 1 !important;
    }

    .card-description {
        font-size: 0.65rem !important;
        line-height: 1.2 !important;
        width: 100% !important;
        order: 4 !important;
        margin: 2px 0 !important;
    }

    .card-effects {
        font-size: 0.55rem !important;
        width: 100% !important;
        order: 5 !important;
    }

    /* Choices Area Mobile - Compact */
    #choices-area {
        gap: 4px !important;
    }

    .choice-btn {
        padding: 6px 10px !important;
    }

    .choice-btn h4 {
        font-size: 0.7rem !important;
        margin-bottom: 1px !important;
    }

    .choice-btn p {
        font-size: 0.55rem !important;
        margin-bottom: 2px !important;
        line-height: 1.2 !important;
    }

    .choice-effects {
        font-size: 0.55rem !important;
    }

    /* Breakdown overlay - more transparent on mobile */
    .breakdown-overlay {
        background: rgba(26, 26, 46, 0.6);
    }

    .breakdown-content {
        padding: 15px;
        background: rgba(26, 26, 46, 0.85);
    }

    .breakdown-content p {
        font-size: 1rem;
        margin-bottom: 8px;
    }

    .breakdown-subtext {
        font-size: 0.8rem !important;
        margin-bottom: 12px !important;
    }

    .breakdown-btn {
        min-width: 150px;
        padding: 10px 15px !important;
    }

    .breakdown-btn h4 {
        font-size: 0.8rem !important;
    }

    .breakdown-btn p {
        font-size: 0.65rem !important;
    }

    /* Bottom Panel - Housing, Connections, Log */
    #housing-area,
    #connections-area,
    #status-log {
        position: fixed;
        bottom: calc(38px + env(safe-area-inset-bottom, 0)); /* Above tabs */
        left: 0;
        right: 0;
        z-index: 105;
        background: var(--bg-card);
        border-top: 1px solid var(--accent-blue);
        border-bottom: none;
        margin: 0;
        padding: 6px 12px;
        max-height: 35vh;
        overflow-y: auto;
        display: none; /* Hidden by default */
    }

    /* HOME TAB */
    #housing-area.show {
        display: block;
    }

    #housing-area h3 {
        display: none;
    }

    /* PEOPLE TAB */
    #connections-area.show {
        display: block;
    }

    #connections-area h3 {
        display: none;
    }

    /* Status Log Mobile - Compact */
    #status-log {
        padding: 8px 15px;
    }

    #status-log.show {
        display: block;
    }

    #status-log .section-label {
        display: none; /* Hide label on mobile */
    }

    #log-entries {
        font-size: 0.7rem;
        max-height: 60px;
        overflow-y: auto;
    }

    .log-entry {
        padding: 2px 0;
    }

    /* Only show first 2 entries (newest, since they're inserted at top) */
    .log-entry:not(:nth-child(-n+2)) {
        display: none;
    }

    /* Mobile bottom tabs for switching panels */
    .mobile-bottom-tabs {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        display: flex !important;
        background: var(--bg-dark) !important;
        border-top: 2px solid var(--accent-pink) !important;
        z-index: 9999 !important;
        margin: 0 !important;
        padding: 0 !important;
        padding-bottom: env(safe-area-inset-bottom, 0) !important;
    }

    .mobile-bottom-tabs button {
        flex: 1;
        padding: 8px 5px;
        background: transparent;
        border: none;
        color: var(--text-muted);
        font-size: 0.7rem;
        cursor: pointer;
    }

    .mobile-bottom-tabs button.active {
        color: var(--accent-pink);
        background: var(--bg-card);
    }

    /* Adjust body padding for bottom tabs */
    #game-screen {
        padding-bottom: calc(55px + env(safe-area-inset-bottom, 0)) !important;
    }

    /* Ending Screen Mobile - Clean layout */
    #ending-screen {
        padding: 15px 15px;
        padding-bottom: calc(20px + env(safe-area-inset-bottom, 0));
        align-items: center;
        overflow-y: auto;
        min-height: auto;
    }

    #ending-content {
        max-width: 100%;
        padding-top: 0;
        text-align: center;
    }

    #ending-title {
        font-size: 1.4rem;
        margin-bottom: 3px;
    }

    #ending-art {
        font-size: 2.5rem;
        margin: 8px 0;
    }

    #ending-description {
        display: none; /* Hide on mobile - poem tells the story */
    }

    #ending-stats {
        padding: 0;
        margin-bottom: 10px;
        background: transparent;
        border: none;
    }

    #ending-stats h4 {
        display: none; /* Hide "Your Berlin Story" header */
    }

    .win-reason {
        display: block !important;
        font-size: 0.85rem;
        padding: 10px 14px;
        margin-bottom: 12px;
        background: var(--bg-card);
        border-radius: 8px;
        border-left: 3px solid var(--gold);
    }

    .stats-summary {
        display: block !important;
    }

    .near-miss, .retry-tip {
        display: block !important;
        font-size: 0.7rem;
        color: var(--text-muted);
        margin: 4px 0;
    }

    /* AI Story Mobile - Prominent */
    #ai-story-container {
        margin-top: 0;
        padding-top: 0;
        border-top: none;
    }

    #ai-story-container h4 {
        display: none;
    }

    .ai-story {
        font-size: 0.9rem;
        line-height: 1.6;
        text-align: center;
        padding: 12px 5px;
        font-style: italic;
        color: var(--text-light);
    }

    .ai-story p {
        margin-bottom: 8px;
    }

    /* Stats toggle for mobile */
    .stats-summary {
        font-size: 0.75rem;
        color: var(--text-muted);
        margin-top: 8px;
    }

    /* Ending Buttons Mobile */
    .ending-buttons {
        flex-direction: row;
        gap: 10px;
        margin-top: 15px;
    }

    .ending-buttons button {
        padding: 12px 20px;
        font-size: 0.9rem;
    }

    .ending-buttons button {
        flex: 1;
        padding: 10px 12px;
        font-size: 0.75rem;
    }

    /* Left/Failed Ending Mobile - More compact */
    .ending-left .win-reason {
        background: rgba(239, 68, 68, 0.15);
        border-left-color: var(--red);
    }

    /* Modal Mobile */
    .modal-content {
        padding: 20px;
        width: 95%;
    }

    .modal-content h2 {
        font-size: 1.3rem;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 10px;
        font-size: 0.95rem;
    }

    /* Interaction notification Mobile */
    .interaction-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .subtitle {
        font-size: 0.75rem;
    }

    .tagline {
        font-size: 0.8rem;
    }

    .character-options {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .character-card {
        display: grid;
        grid-template-columns: auto 1fr;
        align-items: center;
        text-align: left;
        padding: 12px 15px;
        gap: 0 15px;
    }

    .character-card .emoji {
        font-size: 2.5rem;
        margin-bottom: 0;
        margin-right: 0;
        grid-row: span 4;
    }

    .character-card h3 {
        margin-bottom: 5px;
    }

    .resource {
        min-width: 50px;
    }

    .resource-name {
        display: block;
        font-size: 0.55rem;
    }

    .resource-bar-container {
        width: 40px;
    }

    /* Keep flat card on extra small screens */
    .game-card {
        min-height: auto;
    }

    .card-art {
        font-size: 1.3rem;
        margin: 0;
    }

    #connections-list {
        flex-direction: column;
    }

    .connection-card {
        width: 100%;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .connection-card .emoji {
        margin: 0;
    }
}

#event-area {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Game Card */
.game-card {
    width: 280px;
    min-height: 380px;
    background: var(--bg-card);
    border: 3px solid var(--accent-blue);
    border-radius: 15px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    transition: all 0.3s;
    animation: cardEntrance 0.4s ease-out;
}

@keyframes cardEntrance {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.game-card.event { border-color: var(--accent-pink); }
.game-card.person { border-color: var(--accent-purple); }
.game-card.crisis { border-color: var(--red); }
.game-card.opportunity { border-color: var(--green); }

/* Rare card styling */
.game-card.rare {
    border-color: var(--gold) !important;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.4), inset 0 0 20px rgba(255, 215, 0, 0.1);
    animation: cardEntrance 0.4s ease-out, rareGlow 2s ease-in-out infinite;
}

@keyframes rareGlow {
    0%, 100% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.4), inset 0 0 20px rgba(255, 215, 0, 0.1); }
    50% { box-shadow: 0 0 35px rgba(255, 215, 0, 0.6), inset 0 0 30px rgba(255, 215, 0, 0.15); }
}

.game-card.rare .card-type::before {
    content: '✨ ';
}

.game-card.rare .card-type::after {
    content: ' ✨';
}

/* AI-generated card styling */
.game-card.ai-generated {
    border-color: #00d9ff !important;
    box-shadow: 0 0 15px rgba(0, 217, 255, 0.3);
}

.game-card.ai-generated .card-type::after {
    content: ' 🤖';
}

/* Loading state */
.game-card.loading {
    border-color: #00d9ff;
    animation: cardEntrance 0.4s ease-out, loadingPulse 1.5s ease-in-out infinite;
}

@keyframes loadingPulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--bg-dark);
    border-top-color: #00d9ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 30px auto;
}

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

.card-type {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.card-title {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 15px;
    color: var(--accent-pink);
}

.card-art {
    font-size: 4rem;
    text-align: center;
    margin: 20px 0;
}

.card-description {
    flex: 1;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-light);
    margin-bottom: 15px;
}

.card-effects {
    font-size: 0.85rem;
    color: var(--text-muted);
    padding-top: 10px;
    border-top: 1px solid var(--accent-blue);
}

/* Choices Area */
#choices-area {
    display: flex;
    flex-direction: column;
    gap: 15px;
    justify-content: center;
}

.choice-btn {
    background: var(--bg-card);
    border: 2px solid var(--accent-blue);
    color: var(--text-light);
    padding: 20px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: left;
    animation: choiceSlideIn 0.4s ease-out backwards;
    transform-origin: center;
}

.choice-btn:nth-child(1) { animation-delay: 0.1s; }
.choice-btn:nth-child(2) { animation-delay: 0.2s; }
.choice-btn:nth-child(3) { animation-delay: 0.3s; }

@keyframes choiceSlideIn {
    0% {
        opacity: 0;
        transform: translateX(-20px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Only apply hover effects on devices with mouse/trackpad */
@media (hover: hover) and (pointer: fine) {
    .choice-btn:hover {
        border-color: var(--accent-pink);
        background: rgba(233, 69, 96, 0.15);
        transform: translateX(8px);
        box-shadow: 0 4px 15px rgba(233, 69, 96, 0.2);
    }
}

.choice-btn:active {
    transform: scale(0.98);
    transition: all 0.1s;
}

.choice-btn h4 {
    margin-bottom: 8px;
    color: var(--accent-pink);
}

.choice-btn p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.choice-effects {
    margin-top: 10px;
    font-size: 0.85rem;
}

.effect-positive { color: var(--green); }
.effect-negative { color: var(--red); }

.connection-chance {
    color: var(--accent-pink);
    margin-left: 8px;
    font-weight: bold;
}

/* Disabled choices */
.choice-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: var(--text-muted);
}

.choice-btn.disabled:hover {
    transform: none;
    border-color: var(--text-muted);
}

.cant-afford {
    margin-top: 8px;
    color: var(--red);
    font-size: 0.8rem;
    font-weight: bold;
}

.connection-chance {
    margin-top: 6px;
    color: #ff69b4;
    font-size: 0.8rem;
    opacity: 0.9;
}

/* Critical choice warnings */
.critical-win {
    margin-top: 8px;
    color: var(--green);
    font-size: 0.8rem;
    font-weight: bold;
    animation: pulse 1.5s infinite;
}

.critical-lose {
    margin-top: 4px;
    color: var(--red);
    font-size: 0.8rem;
    font-weight: bold;
}

.critical-win-choice {
    border-color: var(--green) !important;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.3);
}

/* critical-lose-choice removed - using warning text only */

/* Breakdown state - overlay */
.grayed-out {
    opacity: 0.3;
    filter: grayscale(70%);
    pointer-events: none;
}

.breakdown-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 26, 46, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 10px;
    pointer-events: auto;
}

.breakdown-content {
    text-align: center;
    padding: 30px;
    background: rgba(26, 26, 46, 0.9);
    border-radius: 15px;
    border: 2px solid var(--red);
    box-shadow: 0 0 30px rgba(255, 107, 107, 0.3);
}

.breakdown-content p {
    color: var(--red);
    font-size: 1.3rem;
    margin-bottom: 15px;
    font-weight: 600;
    text-shadow: 0 0 10px rgba(255, 107, 107, 0.5);
}

.breakdown-subtext {
    color: var(--text-muted) !important;
    font-size: 0.95rem !important;
    font-weight: 400 !important;
    font-style: italic;
    margin-bottom: 20px !important;
}

.breakdown-btn {
    border-color: var(--red) !important;
    background: rgba(255, 107, 107, 0.15);
    min-width: 200px;
}

.breakdown-btn:hover {
    background: rgba(255, 107, 107, 0.3);
    transform: scale(1.02);
}

/* Housing Area - Desktop only */
@media (min-width: 769px) {
    #housing-area {
        background: var(--bg-card);
        border-radius: 10px;
        padding: 20px;
        margin-bottom: 20px;
        position: relative;
    }

    #housing-area h3 {
        margin-bottom: 15px;
        color: var(--accent-blue);
    }

    #housing-display {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 15px;
    }

    .housing-current {
        display: flex;
        align-items: center;
        gap: 10px;
        background: var(--bg-dark);
        padding: 10px 15px;
        border-radius: 8px;
        border: 2px solid var(--accent-blue);
    }

    .housing-emoji {
        font-size: 1.5rem;
    }

    .housing-name {
        font-weight: 600;
        color: var(--text-light);
    }
}

.housing-upgrade-btn {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    border: none;
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.housing-upgrade-btn:hover:not(.disabled) {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(123, 44, 191, 0.4);
}

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

.housing-max {
    color: var(--gold);
    font-style: italic;
}

@media (min-width: 769px) {
    #connections-area {
        background: var(--bg-card);
        border-radius: 10px;
        padding: 20px;
        margin-bottom: 20px;
        position: relative;
    }

    #connections-area h3 {
        margin-bottom: 15px;
        color: var(--accent-purple);
    }
}

.info-icon {
    cursor: pointer;
    font-size: 0.9rem;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.info-icon:hover {
    opacity: 1;
}

.mobile-info-icon {
    display: none;
}

@media (max-width: 768px) {
    .mobile-info-icon {
        display: inline-block;
        position: absolute;
        top: 10px;
        right: 10px;
        font-size: 1.2rem;
        z-index: 110;
    }

    #housing-info-popup,
    #connections-info-popup {
        position: fixed;
        bottom: auto;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        right: auto;
        max-width: 280px;
        z-index: 200;
    }
}

.info-popup {
    position: absolute;
    bottom: 100%;
    right: 15px;
    margin-bottom: 8px;
    background: var(--bg-dark);
    border: 1px solid var(--accent-purple);
    border-radius: 8px;
    padding: 12px 15px;
    font-size: 0.8rem;
    z-index: 50;
    max-width: 220px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.info-popup p {
    margin: 4px 0;
    color: var(--text-muted);
}

.info-popup p strong {
    color: var(--text-light);
}

.info-popup.hidden {
    display: none;
}

#connections-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.connection-card {
    background: var(--bg-dark);
    border: 2px solid var(--accent-purple);
    border-radius: 10px;
    padding: 15px;
    min-width: 150px;
    text-align: center;
}

.connection-card .emoji {
    font-size: 2rem;
}

.connection-card .name {
    font-weight: bold;
    margin: 5px 0;
}

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

.connection-card .hearts {
    color: var(--accent-pink);
    margin-top: 5px;
}

.burn-bridge-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: transparent;
    border: none;
    font-size: 0.9rem;
    cursor: pointer;
    opacity: 0.3;
    transition: opacity 0.2s, transform 0.2s;
    padding: 2px 5px;
}

.burn-bridge-btn:hover {
    opacity: 1;
    transform: scale(1.2);
}

.connection-card {
    position: relative;
}

/* Burn Bridge Dialog */
.burn-bridge-dialog {
    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;
    animation: fadeIn 0.2s ease-out;
}

.burn-dialog-content {
    background: var(--bg-card);
    border: 2px solid var(--accent-pink);
    border-radius: 15px;
    padding: 25px;
    max-width: 400px;
    text-align: center;
}

.burn-dialog-content h3 {
    margin-bottom: 10px;
    color: var(--accent-pink);
}

.burn-dialog-content p {
    color: var(--text-muted);
    margin-bottom: 20px;
}

.burn-choices {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 15px;
}

.burn-choice {
    background: var(--bg-dark);
    border: 1px solid var(--accent-blue);
    border-radius: 10px;
    padding: 15px 10px;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
}

.burn-choice:hover {
    border-color: var(--accent-pink);
    background: rgba(233, 69, 96, 0.1);
    transform: scale(1.02);
}

.burn-choice small {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.burn-cancel {
    background: transparent;
    border: 1px solid var(--text-muted);
    color: var(--text-muted);
    padding: 8px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
}

.burn-cancel:hover {
    border-color: var(--text-light);
    color: var(--text-light);
}

/* Status Log */
#status-log {
    background: var(--bg-card);
    border-radius: 10px;
    padding: 15px;
    max-height: 250px;
    overflow-y: auto;
}

#log-entries {
    font-size: 0.9rem;
}

.log-entry {
    padding: 5px 0;
    border-bottom: 1px solid var(--accent-blue);
    color: var(--text-muted);
}

.log-entry:last-child {
    border-bottom: none;
}

.log-entry.positive { color: var(--green); }
.log-entry.negative { color: var(--red); }
.log-entry.special { color: var(--gold); }

/* Mobile bottom tabs - hidden on desktop */
.mobile-bottom-tabs {
    display: none;
}

/* Ending Screen */
#ending-screen {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 40px 20px;
}

#ending-content {
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
}

#ending-title {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

#ending-art {
    font-size: 6rem;
    margin: 30px 0;
}

#ending-description {
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 30px;
    color: var(--text-muted);
}

#ending-stats {
    background: var(--bg-card);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    text-align: center;
}

.win-reason {
    background: var(--bg-dark);
    padding: 10px 15px;
    border-radius: 8px;
    border-left: 3px solid var(--gold);
    margin-bottom: 15px;
    font-weight: bold;
    color: var(--gold);
}

.near-miss {
    color: var(--accent-pink);
    font-size: 0.9rem;
    margin: 8px 0;
}

.retry-tip {
    color: var(--text-muted);
    font-style: italic;
    font-size: 0.85rem;
    margin-top: 10px;
}

#ai-story-container {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--accent-blue);
}

#generate-story-btn {
    background: var(--accent-purple);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
}

#generate-story-btn:hover:not(:disabled) {
    background: var(--accent-pink);
    transform: translateY(-2px);
}

#generate-story-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.ai-story {
    margin-top: 15px;
    font-style: italic;
    line-height: 1.8;
    color: var(--text-light);
}

.ai-story p {
    margin-bottom: 15px;
}

.ai-story .loading {
    color: var(--gold);
    animation: pulse 1.5s infinite;
}

.ai-story .error {
    color: var(--text-muted);
}

.ending-settler #ending-title { color: var(--green); }
.ending-legend #ending-title { color: var(--gold); }
.ending-lover #ending-title { color: var(--accent-pink); }
.ending-left #ending-title { color: var(--red); }
.ending-timeout #ending-title { color: var(--accent-purple); }

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

#share-story-btn,
#share-instagram-btn {
    background: var(--bg-card);
    border: 2px solid var(--accent-blue);
    color: var(--text-light);
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

#share-story-btn:hover,
#share-instagram-btn:hover {
    border-color: var(--gold);
    background: var(--bg-dark);
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-purple);
}

/* Animations */
@keyframes cardEntry {
    from {
        opacity: 0;
        transform: translateY(30px) rotateX(10deg);
    }
    to {
        opacity: 1;
        transform: translateY(0) rotateX(0);
    }
}

.game-card {
    animation: cardEntry 0.5s ease-out;
}

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

/* Floating resource numbers */
.floating-number {
    position: fixed;
    font-size: 1.2rem;
    font-weight: bold;
    pointer-events: none;
    z-index: 9999;
    animation: floatUp 1s ease-out forwards;
    text-shadow: 0 0 5px rgba(0,0,0,0.5);
    transform: translateX(-50%);
}

.floating-number.positive {
    color: var(--green);
}

.floating-number.negative {
    color: var(--red);
}

@keyframes floatUp {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(-30px);
    }
}

.resource-bar.low {
    animation: pulse 1s infinite;
    background: var(--red);
}

/* Homesickness bar */
.homesick-resource .resource-bar-container {
    background: rgba(100, 100, 100, 0.3);
}

.homesick-bar {
    background: linear-gradient(90deg, #f59e0b, #ef4444);
    transition: width 0.5s ease;
}

.homesick-resource.warning .resource-icon {
    animation: pulse 1s infinite;
}

.homesick-resource.critical .homesick-bar {
    background: var(--red);
    animation: pulse 0.5s infinite;
}

/* Interaction notification */
.interaction-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--bg-card);
    border: 2px solid var(--gold);
    border-radius: 10px;
    padding: 15px 20px;
    max-width: 300px;
    animation: slideIn 0.3s ease-out;
    z-index: 100;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.interaction-notification .title {
    font-weight: bold;
    color: var(--gold);
    margin-bottom: 5px;
}

.interaction-notification .message {
    font-size: 0.9rem;
    color: var(--text-light);
}

.notification-close {
    position: absolute;
    top: 5px;
    right: 8px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.notification-close:hover {
    color: var(--text-light);
}

/* Feedback Link */
.feedback-link {
    display: inline-block;
    margin-top: 30px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.feedback-link:hover {
    color: var(--accent-pink);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    border: 2px solid var(--accent-purple);
    border-radius: 15px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-content h2 {
    color: var(--accent-pink);
    margin-bottom: 10px;
}

.modal-content > p {
    color: var(--text-muted);
    margin-bottom: 20px;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--accent-pink);
}

/* Form Styles */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: var(--text-light);
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    background: var(--bg-dark);
    border: 2px solid var(--accent-blue);
    border-radius: 8px;
    color: var(--text-light);
    font-size: 1rem;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-pink);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group select {
    cursor: pointer;
}

#feedback-form .btn-primary {
    width: 100%;
    margin-top: 10px;
}

#feedback-success {
    text-align: center;
    padding: 20px;
}

#feedback-success p {
    color: var(--green);
    font-size: 1.1rem;
}
