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

body {
    font-family: var(--font-body);
    background: linear-gradient(135deg, var(--color-sky-blue) 0%, var(--color-alpaca-cream) 100%);
    color: var(--color-stone-dark);
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

#game-container {
    max-width: 1200px;
    width: 100%;
    animation: fadeIn 0.5s ease-in;
}

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

h1 {
    text-align: center;
    margin-bottom: 10px;
    color: var(--color-sunset-orange);
    font-family: var(--font-display);
    font-size: var(--font-size-h1);
    text-shadow: none;
}

h2#level-name {
    text-align: center;
    margin-bottom: 20px;
    color: var(--color-ocean-blue);
    font-family: var(--font-body);
    font-size: 20px;
    font-weight: 600;
}

/* Game Meta Bar - Top-level game information */
#game-meta-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--color-alpaca-cream);
    border: 3px solid var(--color-grass-green);
    border-radius: var(--radius-medium);
    padding: 10px 15px;
    margin-bottom: 10px;
    gap: 15px;
    box-shadow: 0 4px 0 rgba(123, 192, 67, 0.3);
    transition: all var(--transition-normal);
}

#game-stats {
    display: flex;
    gap: 30px;
    align-items: center;
    flex: 1;
    justify-content: center;
}

#turn-counter {
    color: var(--color-ocean-blue);
    font-size: 14px;
    font-weight: 600;
}

#star-counter {
    color: #D97706;
    font-weight: bold;
    font-size: 14px;
}

/* Alpaca Status Bar - Shows all 3 alpacas side-by-side */
#alpaca-status-bar {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 10px auto;
    max-width: 600px;
}

.alpaca-status-card {
    background-color: var(--color-beach-sand);
    border: 3px solid var(--color-sunset-orange);
    padding: 12px;
    border-radius: var(--radius-medium);
    box-shadow: 0 4px 0 rgba(255, 155, 84, 0.3);
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all var(--transition-fast);
    cursor: pointer;
    min-width: 120px;
}

.alpaca-status-card:hover:not(.selected) {
    transform: translateY(-1px);
    box-shadow: 0 5px 0 rgba(255, 155, 84, 0.4);
}

.alpaca-status-card.selected {
    border: 4px solid var(--color-success-green);
    background-color: var(--color-alpaca-cream);
    box-shadow: 0 0 12px rgba(82, 193, 123, 0.5);
    transform: translateY(-2px);
}

/* Header row - Name and AP side by side */
.alpaca-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.alpaca-name {
    font-size: 16px;
    font-weight: bold;
    font-family: var(--font-body);
    color: var(--color-stone-dark);
}

/* Action Points Display - LARGE and bold on right */
.alpaca-ap {
    font-size: 36px;
    font-weight: 800;
    font-family: var(--font-display);
    color: var(--color-stone-dark);
    line-height: 1;
}

/* Visual indicator when AP is low */
.alpaca-ap.ap-low {
    color: var(--color-adventure-red);
}

/* Visual indicator when AP is depleted */
.alpaca-ap.ap-depleted {
    color: var(--color-pebble-gray);
    opacity: 0.6;
}

/* Footer row - Disguise left, inventory slot right */
.alpaca-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 40px;
}

/* Disguise Display - Emoji + number on left */
.alpaca-disguise {
    font-size: 24px;
    font-weight: 800;
    font-family: var(--font-display);
    color: #D2691E;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Inventory Slot - Smaller square box on right */
.alpaca-inventory-slot {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-cloud-white);
    border-radius: var(--radius-small);
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

/* Empty state - dashed border */
.alpaca-inventory-slot.empty {
    border: 2px dashed var(--color-pebble-gray);
}

/* Filled state - solid border with orange accent */
.alpaca-inventory-slot.has-item {
    border: 2px solid var(--color-sunset-orange);
    box-shadow: 0 0 6px rgba(255, 155, 84, 0.3);
}

.inventory-icon {
    font-size: 24px;
    line-height: 1;
}

#game-canvas {
    display: block;
    margin: 0 auto 10px;
    background-color: transparent;
    border: 5px solid var(--color-forest-green);
    border-radius: var(--radius-medium);
    box-shadow: 0 6px 0 rgba(45, 95, 63, 0.4);
}

#message-console {
    background-color: var(--color-cloud-white);
    border: 3px dashed var(--color-river-blue);
    border-radius: var(--radius-medium);
    padding: 15px;
    margin: 0 auto 20px;
    max-width: 500px;
    font-size: var(--font-size-small);
    line-height: 1.5;
    box-shadow: var(--shadow-soft);
    transition: all var(--transition-normal);
}

.console-line {
    height: 1.5em;
    color: var(--color-stone-dark);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.console-line:empty::before {
    content: "\00a0";
}

#objectives-panel {
    background-color: var(--color-alpaca-cream);
    border: 4px solid var(--color-stone-dark);
    border-radius: var(--radius-medium);
    box-shadow: var(--shadow-card);
    padding: 15px;
    margin: 0 auto 20px;
    max-width: 500px;
    transition: all var(--transition-normal);
}

#objectives-list {
    font-size: var(--font-size-small);
}

.objective-item {
    margin: 8px 0;
    padding: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--color-stone-dark);
}

.objective-item.completed {
    color: var(--color-success-green);
    text-decoration: line-through;
}

.objective-stars {
    color: var(--color-star-yellow);
    font-weight: bold;
    margin-left: 10px;
}

#reference-container {
    display: flex;
    flex-direction: row;
    gap: 15px;
    justify-content: space-between;
    align-items: flex-start;
}

#legend, #controls {
    background-color: var(--color-alpaca-cream);
    border: 4px solid var(--color-stone-dark);
    border-radius: var(--radius-medium);
    box-shadow: var(--shadow-card);
    padding: 15px;
    flex: 1;
}

h3 {
    color: var(--color-sunset-orange);
    font-family: var(--font-display);
    margin-bottom: 12px;
    font-size: var(--font-size-h3);
}

h4 {
    color: var(--color-river-blue);
    font-family: var(--font-body);
    font-weight: 700;
    margin-top: 12px;
    margin-bottom: 8px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.legend-item {
    margin: 6px 0;
    font-size: var(--font-size-small);
    color: var(--color-stone-dark);
}

.symbol {
    display: inline-block;
    width: 50px;
    color: var(--color-stone-dark);
    font-weight: bold;
}

#controls p {
    margin: 6px 0;
    font-size: var(--font-size-small);
    color: var(--color-stone-dark);
}

/* Level Selection Overlay */
#level-select-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--color-sky-blue) 0%, var(--color-alpaca-cream) 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

#level-select-content {
    text-align: center;
    max-width: 800px;
    padding: 40px;
}

#level-select-content h1 {
    font-size: 48px;
    margin-bottom: 10px;
}

.subtitle {
    color: var(--color-ocean-blue);
    font-size: 18px;
    margin-bottom: 40px;
}

.subtitle-small {
    font-size: 14px;
    margin-top: -30px;
}

#level-cards {
    display: flex;
    gap: 30px;
    justify-content: center;
    margin-bottom: 30px;
}

.level-card {
    background-color: var(--color-cloud-white);
    border: 4px solid var(--color-grass-green);
    border-radius: var(--radius-large);
    padding: 30px;
    width: 300px;
    transition: all var(--transition-normal);
    box-shadow: 0 8px 0 rgba(123, 192, 67, 0.4);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    min-height: 320px;
}

.level-card:hover {
    border-color: var(--color-sky-blue);
    box-shadow: 0 12px 0 rgba(135, 206, 235, 0.5);
    transform: translateY(-4px) rotate(-1deg);
}

.level-card h2 {
    color: var(--color-sunset-orange);
    font-family: var(--font-display);
    font-size: var(--font-size-h2);
    margin-bottom: 15px;
}

.level-description {
    color: var(--color-stone-dark);
    font-size: var(--font-size-body);
    margin-bottom: 20px;
    line-height: 1.5;
    flex-grow: 1;
}

.level-stars {
    color: var(--color-star-yellow);
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 10px;
}

.level-turns {
    color: var(--color-river-blue);
    font-size: 14px;
    margin-bottom: 20px;
}

/* Button System - Visual Hierarchy */
.btn-primary {
    background: var(--gradient-primary);
    color: var(--color-stone-dark);
    border: 3px solid #D47835;
    border-radius: var(--radius-small);
    padding: 10px 20px;
    font-family: var(--font-body);
    font-size: var(--font-size-button);
    font-weight: bold;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-transform: none;
    white-space: nowrap;
    box-shadow: var(--shadow-button-primary);
}

.btn-primary:hover {
    background: var(--gradient-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #C56B28;
}

.btn-primary:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #C56B28;
}

.btn-primary:disabled {
    background-color: var(--color-pebble-gray);
    border-color: var(--color-pebble-gray);
    color: var(--color-pebble-gray);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.btn-secondary {
    background-color: var(--color-cloud-white);
    color: var(--color-river-blue);
    border: 3px solid var(--color-river-blue);
    border-radius: var(--radius-small);
    padding: 8px 16px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-transform: none;
    white-space: nowrap;
    box-shadow: var(--shadow-button-secondary);
}

.btn-secondary:hover {
    background-color: rgba(93, 173, 226, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 5px 0 #4A9AC9;
}

.btn-secondary:active {
    transform: translateY(2px);
    box-shadow: 0 1px 0 #4A9AC9;
}

/* Overlay Buttons (different style from gameplay buttons) */
.play-btn, #instructions-btn, #close-instructions-btn {
    background-color: var(--color-sunset-orange);
    color: #1a1a1a;
    border: none;
    padding: 12px 30px;
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.level-card .play-btn {
    width: 100%;
}

.play-btn:hover, #instructions-btn:hover, #close-instructions-btn:hover {
    background-color: var(--color-star-yellow);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
    transform: scale(1.05);
}

.play-btn:active, #instructions-btn:active, #close-instructions-btn:active {
    transform: scale(0.95);
}

#instructions-btn {
    margin-top: 20px;
    padding: 15px 40px;
    font-size: 18px;
}

/* Audio Controls */
#audio-controls {
    margin-top: 30px;
    padding: 20px;
    background-color: var(--color-alpaca-cream);
    border: 3px solid var(--color-stone-dark);
    border-radius: 8px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

#audio-controls h3 {
    text-align: center;
    color: var(--color-sunset-orange);
    margin-bottom: 15px;
    font-size: 16px;
}

.volume-control {
    margin-bottom: 15px;
}

.volume-control label {
    display: block;
    color: var(--color-river-blue);
    margin-bottom: 5px;
    font-size: 14px;
}

.volume-control input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #333;
    outline: none;
    -webkit-appearance: none;
}

.volume-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #d4a574;
    cursor: pointer;
}

.volume-control input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #d4a574;
    cursor: pointer;
    border: none;
}

.audio-btn {
    width: 100%;
    padding: 10px;
    background-color: var(--color-beach-sand);
    color: var(--color-sunset-orange);
    border: 3px solid var(--color-stone-dark);
    border-radius: 5px;
    font-family: var(--font-body);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 10px;
}

.audio-btn:hover {
    background-color: #3a3a3a;
    transform: translateY(-2px);
}

.audio-btn:active {
    transform: scale(0.95);
}

/* Instructions Overlay */
#instructions-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--color-sky-blue) 0%, var(--color-alpaca-cream) 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1001;
    overflow-y: auto;
}

#instructions-content {
    background-color: var(--color-cloud-white);
    border: 4px solid var(--color-grass-green);
    border-radius: var(--radius-large);
    padding: 40px;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    margin: 20px;
    box-shadow: 0 8px 0 rgba(123, 192, 67, 0.4);
}

#instructions-content h1 {
    font-size: 36px;
    margin-bottom: 30px;
}

.instructions-section {
    margin-bottom: 30px;
    text-align: left;
}

.instructions-section h2 {
    color: var(--color-star-yellow);
    font-size: 20px;
    margin-bottom: 10px;
}

.instructions-section p {
    color: var(--color-river-blue);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 8px;
}

.instructions-section strong {
    color: var(--color-sunset-orange);
}

#close-instructions-btn {
    margin-top: 20px;
    width: 100%;
    padding: 15px;
}

/* Hidden class */
.hidden {
    display: none !important;
}

/* ============================================
   RESPONSIVE DESIGN - Mobile Adjustments
   ============================================ */

@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    h1 {
        font-size: 36px;
    }

    #alpaca-status-bar {
        flex-direction: column;
        gap: 8px;
    }

    .alpaca-status-card {
        width: 100%;
        max-width: 400px;
    }

    #level-cards {
        flex-direction: column;
        align-items: center;
    }

    .level-card {
        width: 100%;
        max-width: 350px;
    }

    #game-canvas {
        max-width: 100%;
        height: auto;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 28px;
    }

    #game-meta-bar {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    #game-stats {
        flex-direction: column;
        gap: 8px;
    }
}

/* ============================================
   ACCESSIBILITY - Focus States & Keyboard Nav
   ============================================ */

/* Enhanced focus visibility for keyboard navigation */
button:focus,
.level-card:focus,
.alpaca-status-card:focus,
.play-btn:focus,
#instructions-btn:focus {
    outline: 3px solid var(--color-river-blue);
    outline-offset: 2px;
}

/* Focus state for interactive elements */
*:focus-visible {
    outline: 3px solid var(--color-river-blue);
    outline-offset: 2px;
}

/* Ensure links have proper focus */
a:focus {
    outline: 3px solid var(--color-river-blue);
    outline-offset: 2px;
}

/* Smooth scrolling for better UX */
html {
    scroll-behavior: smooth;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Mini-game Overlay */
#minigame-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--color-sky-blue) 0%, var(--color-alpaca-cream) 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

#minigame-content {
    background-color: var(--color-cloud-white);
    border: 4px solid var(--color-river-blue);
    border-radius: var(--radius-large);
    padding: 20px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    font-family: var(--font-body);
    box-shadow: 0 6px 0 rgba(93, 173, 226, 0.4);
}

#minigame-header h2 {
    color: var(--color-star-yellow);
    margin: 0 0 15px 0;
    font-size: 24px;
    text-shadow: 2px 2px 0px #8B4513;
    letter-spacing: 2px;
}

#minigame-instructions {
    color: var(--color-sunset-orange);
    font-size: 14px;
    margin-bottom: 20px;
    font-weight: bold;
}

#minigame-canvas-wrapper {
    border: 3px solid var(--color-stone-dark);
    display: inline-block;
    padding: 10px;
    background-color: var(--color-canvas-bg);
    margin-bottom: 15px;
}

#minigame-canvas {
    display: block;
    image-rendering: pixelated;  /* Crisp pixels */
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

#minigame-message {
    height: 30px;
    font-size: 18px;
    font-weight: bold;
    margin: 10px 0;
}

#minigame-controls {
    margin-top: 15px;
}

#minigame-close-btn {
    background-color: var(--color-pebble-gray);
    color: var(--color-cloud-white);
    border: 2px solid var(--color-pebble-gray);
    padding: 8px 20px;
    font-size: 14px;
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: bold;
    transition: all 0.2s;
}

#minigame-close-btn:hover {
    background-color: var(--color-pebble-gray);
    border-color: #bbb;
    transform: scale(1.05);
}

/* Charm Tutorial Overlay */
#charm-tutorial-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--color-sky-blue) 0%, var(--color-alpaca-cream) 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;  /* Very high z-index to ensure it's on top */
}

#charm-tutorial-content {
    background-color: var(--color-cloud-white);
    border: 4px solid var(--color-mountain-purple);
    border-radius: var(--radius-large);
    padding: 20px;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 6px 0 rgba(155, 126, 189, 0.4);
    animation: popup-appear 0.3s ease-out;
}

@keyframes popup-appear {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

#charm-tutorial-content img {
    border-radius: 8px;
    margin-bottom: 15px;
    max-width: 100%;
    height: auto;
    border: 3px solid var(--color-stone-dark);
}

#charm-tutorial-close-btn {
    background-color: var(--color-sunset-orange);  /* Softer tan/amber */
    color: #0a0a0a;
    border: none;
    padding: 10px 25px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 5px;
    font-family: var(--font-body);
    font-weight: bold;
    transition: all 0.2s;
}

#charm-tutorial-close-btn:hover {
    background-color: #e6b885;  /* Slightly lighter on hover */
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(212, 165, 116, 0.6);
}

/* Win/Lose Modal Overlays */
#win-modal-overlay,
#lose-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--color-sky-blue) 0%, var(--color-alpaca-cream) 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

#win-modal-content,
#lose-modal-content {
    background-color: var(--color-cloud-white);
    border-radius: var(--radius-large);
    padding: 30px;
    max-width: 450px;
    text-align: center;
    animation: modalFadeIn 0.3s ease-out;
}

#win-modal-content {
    border: 5px solid var(--color-success-green);
    box-shadow: 0 8px 0 rgba(82, 193, 123, 0.4);
}

#lose-modal-content {
    border: 5px solid var(--color-adventure-red);
    box-shadow: 0 8px 0 rgba(231, 76, 60, 0.4);
}

@keyframes modalFadeIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-button {
    background-color: var(--color-sunset-orange);
    color: #0a0a0a;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 5px;
    font-family: var(--font-body);
    font-weight: bold;
    transition: all 0.2s;
    margin: 5px;
}

.modal-button:hover {
    background-color: #e6b885;
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(212, 165, 116, 0.6);
}

.modal-button.secondary {
    background-color: var(--color-pebble-gray);
    color: var(--color-cloud-white);
}

.modal-button.secondary:hover {
    background-color: var(--color-pebble-gray);
    box-shadow: 0 0 10px rgba(136, 136, 136, 0.6);
}

.modal-button-group {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

#win-modal-stats {
    background-color: rgba(212, 165, 116, 0.1);
    border-radius: 8px;
    padding: 10px;
    margin: 15px 0;
}

/* Story Intro Overlay */
#story-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--color-sky-blue) 0%, var(--color-alpaca-cream) 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1002;
}

#story-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 90vw;
    max-height: 90vh;
    gap: 20px;
    position: relative;
}

.story-mute-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(42, 42, 42, 0.8);
    color: var(--color-sunset-orange);
    border: 3px solid var(--color-stone-dark);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.story-mute-btn:hover {
    background-color: rgba(58, 58, 58, 0.9);
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(212, 165, 116, 0.5);
}

.story-mute-btn:active {
    transform: scale(0.95);
}

#story-image {
    max-width: 100%;
    max-height: 70vh;
    border: 3px solid var(--color-stone-dark);
    box-shadow: 0 0 30px rgba(212, 165, 116, 0.5);
    object-fit: contain;
}

#story-controls {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-top: 10px;
}

.story-nav-btn {
    background-color: var(--color-sunset-orange);
    color: #1a1a1a;
    border: none;
    padding: 12px 30px;
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.story-nav-btn:hover {
    background-color: var(--color-star-yellow);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
    transform: scale(1.05);
}

.story-nav-btn:active {
    transform: scale(0.95);
}

.story-nav-btn:disabled {
    background-color: var(--color-pebble-gray);
    color: var(--color-pebble-gray);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

#story-progress {
    color: var(--color-sunset-orange);
    font-size: 18px;
    font-weight: bold;
    min-width: 80px;
    text-align: center;
}

#story-skip-btn {
    background-color: transparent;
    color: var(--color-river-blue);
    border: 2px solid var(--color-river-blue);
    padding: 10px 25px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

#story-skip-btn:hover {
    background-color: var(--color-river-blue);
    color: #1a1a1a;
    box-shadow: 0 0 15px rgba(138, 180, 248, 0.6);
    transform: scale(1.05);
}

#story-skip-btn:active {
    transform: scale(0.95);
}

/* Target Selection Popup */
#target-selection-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    background: linear-gradient(135deg, var(--color-sky-blue) 0%, var(--color-alpaca-cream) 100%);
    border: 4px solid var(--color-sunset-orange);
    border-radius: var(--radius-large);
    padding: 0;
    min-width: 320px;
    box-shadow: var(--shadow-modal);
}

#target-selection-content {
    background-color: var(--color-cloud-white);
    border-radius: calc(var(--radius-large) - 4px);
    padding: 20px;
    margin: 4px;
}

#target-selection-content h3 {
    color: var(--color-stone-dark);
    font-family: var(--font-display);
    text-align: center;
    margin-bottom: 15px;
    font-size: 20px;
}

#target-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 0;
}

.target-option {
    background-color: #E8E5DD;
    border: 3px solid #B0ACA0;
    border-radius: var(--radius-medium);
    padding: 12px 15px;
    cursor: pointer;
    transition: all var(--transition-fast);
    color: var(--color-pebble-gray);
    font-family: var(--font-body);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 2px 0 rgba(107, 114, 128, 0.2);
    opacity: 0.7;
}

.target-option:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 3px 0 rgba(107, 114, 128, 0.3);
}

.target-option.selected {
    background-color: var(--color-cloud-white);
    border: 4px solid var(--color-success-green);
    color: var(--color-stone-dark);
    box-shadow: 0 0 12px rgba(82, 193, 123, 0.5);
    transform: translateY(-1px);
    opacity: 1;
}

.target-icon {
    font-size: 18px;
    min-width: 30px;
    text-align: center;
}

.target-label {
    flex: 1;
}

.target-hint {
    text-align: center;
    font-size: 12px;
    color: var(--color-river-blue);
    font-style: italic;
}
