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

@font-face {
    font-family: 'Terminal';
    src: local('Courier New'), local('Consolas'), local('monospace');
}

body {
    background-color: #0a0a0a;
    background-image: url('hero-bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Courier New', Consolas, monospace;
    padding: 20px;
}

.game-container {
    width: 100%;
    max-width: 700px;
}

.terminal {
    background: rgba(13, 17, 23, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 24px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(0, 255, 136, 0.1),
        inset 0 0 60px rgba(0, 0, 0, 0.2);
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.terminal:hover {
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(0, 255, 136, 0.15),
        inset 0 0 60px rgba(0, 0, 0, 0.2);
}

.terminal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.1),
        rgba(0, 0, 0, 0.1) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    border-radius: 5px;
}

.terminal-header {
    text-align: center;
    padding-bottom: 15px;
    border-bottom: 1px dashed #30363d;
    margin-bottom: 20px;
}

.terminal-title {
    color: #00ff88;
    font-size: 18px;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
    letter-spacing: 2px;
}

.npc-area {
    text-align: center;
    margin-bottom: 20px;
}

.npc-ascii {
    color: #58a6ff;
    font-size: 14px;
    line-height: 1.2;
    text-shadow: 0 0 5px rgba(88, 166, 255, 0.3);
    margin-bottom: 10px;
}

.npc-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px solid #58a6ff;
    box-shadow:
        0 0 20px rgba(88, 166, 255, 0.4),
        0 8px 25px rgba(0, 0, 0, 0.3);
    margin-bottom: 10px;
    transition: all 0.3s ease;
    object-fit: cover;
    cursor: pointer;
    animation: owlFloat 4s ease-in-out infinite;
}

.npc-image:hover {
    transform: scale(1.08);
    box-shadow:
        0 0 30px rgba(88, 166, 255, 0.6),
        0 12px 30px rgba(0, 0, 0, 0.4);
}

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

.npc-image.thinking {
    border-color: #f0883e;
    box-shadow: 0 0 20px rgba(240, 136, 62, 0.4);
}

.npc-image.excited {
    border-color: #00ff88;
    box-shadow: 0 0 25px rgba(0, 255, 136, 0.5);
    transform: scale(1.05);
}

.npc-image.judging {
    border-color: #8b949e;
    box-shadow: 0 0 15px rgba(139, 148, 158, 0.4);
}

.npc-image.smug {
    border-color: #a371f7;
    box-shadow: 0 0 20px rgba(163, 113, 247, 0.4);
}

.npc-name {
    color: #f0883e;
    font-size: 16px;
    font-weight: bold;
    letter-spacing: 3px;
}

.npc-title {
    color: #8b949e;
    font-size: 12px;
    font-style: italic;
}

/* Progress indicator */
.progress-area {
    text-align: center;
    margin-bottom: 15px;
}

.progress-dots {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 8px;
}

.progress-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.progress-dot.active {
    background: #00ff88;
    border-color: #00ff88;
    box-shadow: 0 0 12px rgba(0, 255, 136, 0.6);
    transform: scale(1.2);
}

.progress-dot.completed {
    background: #58a6ff;
    border-color: #58a6ff;
    box-shadow: 0 0 8px rgba(88, 166, 255, 0.4);
}

.progress-label {
    color: #8b949e;
    font-size: 11px;
}

/* Dialogue area */
.dialogue-area {
    margin-bottom: 20px;
}

.dialogue-box {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 3px solid #00ff88;
    border-radius: 8px;
    padding: 15px;
    min-height: 80px;
    position: relative;
    cursor: pointer;
    transition: background 0.3s ease, border-color 0.3s ease, transform 0.2s ease;
}

.dialogue-box:hover {
    background: rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.15);
}

.dialogue-box:hover .skip-hint {
    opacity: 1;
}

.dialogue-text {
    color: #e6edf3;
    font-size: 14px;
    line-height: 1.6;
    white-space: pre-wrap;
}

.cursor {
    color: #00ff88;
    animation: blink 1s infinite;
}

.skip-hint {
    position: absolute;
    bottom: 5px;
    right: 10px;
    color: #8b949e;
    font-size: 10px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.skip-hint.hidden {
    display: none;
}

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

/* Navigation area */
.nav-area {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    gap: 10px;
}

.back-btn, .surprise-btn {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #8b949e;
    padding: 10px 18px;
    font-family: 'Courier New', Consolas, monospace;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.back-btn:hover {
    background: rgba(88, 166, 255, 0.1);
    border-color: rgba(88, 166, 255, 0.4);
    color: #58a6ff;
    box-shadow: 0 4px 15px rgba(88, 166, 255, 0.15);
}

.back-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.surprise-btn {
    border-color: rgba(240, 136, 62, 0.4);
    color: #f0883e;
}

.surprise-btn:hover {
    background: rgba(240, 136, 62, 0.15);
    box-shadow: 0 4px 20px rgba(240, 136, 62, 0.25);
    transform: scale(1.02);
}

/* Choices area */
.choices-area {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.choice-btn {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #e6edf3;
    padding: 14px 20px;
    font-family: 'Courier New', Consolas, monospace;
    font-size: 14px;
    cursor: pointer;
    text-align: left;
    transition: all 0.25s ease;
    position: relative;
}

.choice-btn::before {
    content: '>';
    color: #00ff88;
    margin-right: 10px;
    opacity: 0;
    transition: all 0.25s ease;
    transform: translateX(-5px);
}

.choice-btn:hover {
    background: rgba(0, 255, 136, 0.12);
    border-color: rgba(0, 255, 136, 0.4);
    transform: translateX(8px);
    box-shadow: 0 4px 20px rgba(0, 255, 136, 0.15);
}

.choice-btn:hover::before {
    opacity: 1;
    transform: translateX(0);
}

.choice-btn:active {
    transform: translateX(8px) scale(0.98);
    background: rgba(0, 255, 136, 0.2);
}

/* Trip results */
.trip-result {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
}

.trip-header {
    color: #00ff88;
    font-size: 16px;
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px dashed #30363d;
}

/* Destination cards */
.destinations-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.destination-card {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.destination-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.destination-card.top-pick {
    border-color: #00ff88;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.25);
}

.destination-card.top-pick .card-badge {
    display: block;
}

.card-badge {
    display: none;
    background: #00ff88;
    color: #0a0a0a;
    padding: 6px 14px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.card-photo-wrapper {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: #1a1a2e;
}

.card-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.destination-card:hover .card-photo {
    transform: scale(1.05);
}

.card-body {
    padding: 16px;
}

.card-destination-name {
    color: #f0883e;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 2px;
}

.card-continent {
    color: #6e7681;
    font-size: 11px;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-tagline {
    color: #c9d1d9;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 12px;
}

.card-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.card-tag {
    background: rgba(88, 166, 255, 0.15);
    color: #58a6ff;
    padding: 3px 10px;
    font-size: 11px;
    border-radius: 20px;
    border: 1px solid rgba(88, 166, 255, 0.2);
}

.card-season {
    color: #8b949e;
    font-size: 12px;
    margin-bottom: 4px;
}

.card-budget {
    color: #00ff88;
    font-size: 13px;
    font-weight: bold;
    margin-bottom: 12px;
}

.plan-trip-btn {
    display: inline-block;
    background: linear-gradient(135deg, #f0883e, #e06520);
    color: #fff;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-family: 'Courier New', Consolas, monospace;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.2s ease;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.plan-trip-btn:hover {
    background: linear-gradient(135deg, #e06520, #c85010);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(240, 136, 62, 0.4);
}

/* Action buttons */
.result-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.share-btn, .restart-btn {
    flex: 1;
    background: transparent;
    border: 1px solid #30363d;
    color: #8b949e;
    padding: 12px 20px;
    font-family: 'Courier New', Consolas, monospace;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.share-btn {
    border-color: #a371f7;
    color: #a371f7;
}

.share-btn:hover {
    background: rgba(163, 113, 247, 0.1);
}

.restart-btn {
    border-color: #00ff88;
    color: #00ff88;
}

.restart-btn:hover {
    background: rgba(0, 255, 136, 0.1);
}

/* Share toast */
.share-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #00ff88;
    color: #0a0a0a;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

.share-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* NPC expression changes */
.npc-ascii.thinking {
    color: #f0883e;
}

.npc-ascii.excited {
    color: #00ff88;
}

.npc-ascii.judging {
    color: #f85149;
}

/* Typing effect */
.typing .cursor {
    display: inline;
}

.not-typing .cursor {
    display: none;
}

/* Mobile adjustments */
@media (max-width: 600px) {
    body {
        padding: 10px;
        align-items: flex-start;
        padding-top: 20px;
    }

    .game-container {
        width: 100%;
        max-width: 100%;
    }

    .terminal {
        padding: 16px;
        border-radius: 12px;
        margin: 0;
    }

    .terminal-header {
        padding-bottom: 12px;
        margin-bottom: 16px;
    }

    .terminal-title {
        font-size: 12px;
        letter-spacing: 1px;
    }

    /* NPC area mobile */
    .npc-area {
        margin-bottom: 16px;
    }

    .npc-image {
        width: 90px;
        height: 90px;
    }

    .npc-image:hover {
        transform: scale(1.05);
    }

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

    .npc-name {
        font-size: 14px;
        letter-spacing: 2px;
    }

    .npc-title {
        font-size: 11px;
    }

    /* Progress area mobile */
    .progress-area {
        margin-bottom: 12px;
    }

    .progress-dots {
        gap: 10px;
    }

    .progress-dot {
        width: 10px;
        height: 10px;
    }

    .progress-label {
        font-size: 10px;
    }

    /* Dialogue mobile */
    .dialogue-area {
        margin-bottom: 16px;
    }

    .dialogue-box {
        padding: 14px;
        min-height: 70px;
        border-radius: 8px;
    }

    .dialogue-text {
        font-size: 14px;
        line-height: 1.5;
    }

    .skip-hint {
        font-size: 9px;
        bottom: 4px;
        right: 8px;
    }

    /* Navigation mobile */
    .nav-area {
        flex-direction: row;
        gap: 8px;
        margin-bottom: 12px;
    }

    .back-btn, .surprise-btn {
        flex: 1;
        padding: 12px 14px;
        font-size: 11px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Choices mobile - larger touch targets */
    .choices-area {
        gap: 8px;
    }

    .choice-btn {
        padding: 16px 18px;
        font-size: 14px;
        min-height: 52px;
        border-radius: 10px;
        line-height: 1.4;
    }

    .choice-btn:hover,
    .choice-btn:active {
        transform: translateX(4px);
    }

    /* Trip results mobile */
    .trip-result {
        padding: 16px;
        margin-top: 16px;
        border-radius: 10px;
    }

    .trip-header {
        font-size: 13px;
        margin-bottom: 16px;
        padding-bottom: 10px;
    }

    /* Destination cards mobile */
    .destinations-grid {
        gap: 14px;
    }

    .destination-card {
        border-radius: 10px;
    }

    .card-badge {
        font-size: 9px;
        padding: 3px 10px;
    }

    .card-destination-name {
        font-size: 15px;
        margin-bottom: 2px;
    }

    .card-tagline {
        font-size: 11px;
        margin-bottom: 6px;
    }

    .card-tags {
        gap: 4px;
    }

    .card-tag {
        font-size: 9px;
        padding: 2px 6px;
    }

    .card-photo-wrapper {
        height: 150px;
    }

    .card-body {
        padding: 12px;
    }

    .card-destination-name {
        font-size: 16px;
    }

    .card-tagline {
        font-size: 12px;
    }

    /* Action buttons mobile */
    .result-actions {
        flex-direction: column;
        gap: 8px;
        margin-top: 16px;
    }

    .share-btn, .restart-btn {
        padding: 14px 20px;
        font-size: 13px;
        min-height: 48px;
        border-radius: 8px;
    }

    /* Toast mobile */
    .share-toast {
        bottom: 15px;
        padding: 10px 20px;
        font-size: 13px;
        border-radius: 6px;
    }
}

/* Extra small screens */
@media (max-width: 360px) {
    body {
        padding: 8px;
    }

    .terminal {
        padding: 12px;
    }

    .terminal-title {
        font-size: 10px;
    }

    .npc-image {
        width: 75px;
        height: 75px;
    }

    .dialogue-text {
        font-size: 13px;
    }

    .choice-btn {
        padding: 14px 14px;
        font-size: 13px;
    }

    .card-destination-name {
        font-size: 14px;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .choice-btn:hover {
        transform: none;
        background: rgba(255, 255, 255, 0.05);
        border-color: rgba(255, 255, 255, 0.1);
    }

    .choice-btn:active {
        transform: scale(0.98);
        background: rgba(0, 255, 136, 0.15);
        border-color: rgba(0, 255, 136, 0.4);
    }

    .destination-card:hover {
        transform: none;
    }

    .destination-card:active {
        transform: scale(0.99);
    }

    .npc-image {
        animation: none;
    }

    .npc-image:hover {
        transform: none;
    }
}
