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

body {
    font-family: 'IBM Plex Mono', monospace;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    color: #e0e0e0;
    min-height: 100vh;
    overflow-x: hidden;
}

#game-container {
    max-width: 1200px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

#game-header {
    background: linear-gradient(90deg, #2c1810 0%, #4a2c1a 50%, #2c1810 100%);
    border-bottom: 3px solid #8b4513;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

#game-title {
    font-family: 'Courier Prime', monospace;
    font-size: 2.5rem;
    font-weight: 700;
    color: #ff6b6b;
    text-shadow: 0 0 10px rgba(255, 107, 107, 0.3);
    margin-bottom: 10px;
    letter-spacing: 3px;
}

#case-title {
    background: #8b0000;
    color: white;
    padding: 8px 20px;
    display: inline-block;
    transform: rotate(-2deg);
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
    font-weight: 500;
    letter-spacing: 1px;
}

/* Header Controls Container */
#header-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
    margin-top: 15px;
    flex-wrap: wrap;
}

/* Main Menu Button */
#main-menu-btn {
    background: linear-gradient(135deg, #4a3a2a 0%, #3a2a1a 100%);
    border: 2px solid #8b4513;
    color: #e0e0e0;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 13px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

#main-menu-btn:hover {
    background: linear-gradient(135deg, #5a4a3a 0%, #4a3a2a 100%);
    border-color: #a05a23;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 69, 19, 0.4);
}

#main-menu-btn .btn-icon {
    font-size: 16px;
}

#main-menu-btn.hidden {
    display: none;
}

/* Confirmation Modal */
.confirmation-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.confirmation-modal.hidden {
    display: none;
}

.confirmation-modal .modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
}

.confirmation-modal .modal-content {
    position: relative;
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    border: 3px solid #8b4513;
    border-radius: 12px;
    padding: 30px 40px;
    max-width: 450px;
    width: 90%;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.confirmation-modal h3 {
    color: #ff6b6b;
    font-family: 'Courier Prime', monospace;
    font-size: 1.5rem;
    margin-bottom: 15px;
    text-shadow: 0 0 10px rgba(255, 107, 107, 0.3);
}

.confirmation-modal p {
    color: #ccc;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 25px;
}

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

.modal-btn {
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 140px;
}

.modal-btn.confirm-btn {
    background: linear-gradient(135deg, #8b0000 0%, #5a0000 100%);
    border: 2px solid #ff6b6b;
    color: #fff;
}

.modal-btn.confirm-btn:hover {
    background: linear-gradient(135deg, #a00000 0%, #700000 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(139, 0, 0, 0.5);
}

.modal-btn.cancel-btn {
    background: linear-gradient(135deg, #2d4a2d 0%, #1e3a1e 100%);
    border: 2px solid #4a6741;
    color: #e0e0e0;
}

.modal-btn.cancel-btn:hover {
    background: linear-gradient(135deg, #3d5a3d 0%, #2e4a2e 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(46, 74, 46, 0.5);
}

@media (max-width: 480px) {
    .modal-buttons {
        flex-direction: column;
    }

    .modal-btn {
        width: 100%;
    }

    #header-controls {
        flex-direction: column;
        gap: 8px;
    }
}

#game-main {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
    padding: 20px;
    min-height: 500px;
}

#document-viewer {
    background: #1e1e1e;
    border: 2px solid #444;
    border-radius: 8px;
    padding: 20px;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

#document-image {
    width: 100%;
    height: 400px;
    background: #2a2a2a;
    border: 1px dashed #666;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-style: italic;
    background-size: cover;
    background-position: center;
    border-radius: 4px;
}

#document-image::before {
    content: "";
    font-size: 14px;
    opacity: 0.6;
}

#narrative-section {
    background: #1a1a1a;
    border: 2px solid #333;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

#story-text {
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 30px;
    color: #e0e0e0;
    text-align: justify;
    min-height: 200px;
}

.story-paragraph {
    margin-bottom: 20px;
    opacity: 0;
    animation: fadeInText 2s ease-in forwards;
}

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

/* Click to skip typing indicator */
#story-text.typing {
    cursor: pointer;
    position: relative;
}

#story-text.typing::after {
    content: "🖱️ CLICK HERE or press SPACEBAR to skip typing...";
    position: absolute;
    top: -30px;
    right: 0;
    font-size: 13px;
    color: #ffeb3b;
    opacity: 0.9;
    pointer-events: none;
    animation: fadeInOut 1.5s ease-in-out infinite;
    background: rgba(255, 193, 7, 0.2);
    border: 1px solid #ffeb3b;
    padding: 6px 12px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(255, 235, 59, 0.3);
    z-index: 1000;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
}

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

/* Choice Prompt */
.choice-prompt {
    color: #34d399;
    font-size: 1.1em;
    font-weight: 600;
    text-align: center;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(52, 211, 153, 0.1);
    border: 1px solid rgba(52, 211, 153, 0.2);
    border-radius: 8px;
    animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% { 
        box-shadow: 0 0 10px rgba(52, 211, 153, 0.3);
    }
    50% { 
        box-shadow: 0 0 20px rgba(52, 211, 153, 0.5);
    }
}

.choice-button {
    background: linear-gradient(135deg, #2d4a2d 0%, #1e3a1e 100%);
    border: 2px solid #4a6741;
    color: #e0e0e0;
    padding: 15px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 14px;
    transition: all 0.3s ease;
    text-align: left;
    position: relative;
    overflow: hidden;
}

.choice-button::before {
    content: "▶ ";
    color: #4a6741;
    margin-right: 10px;
}

.choice-button:hover {
    background: linear-gradient(135deg, #3d5a3d 0%, #2e4a2e 100%);
    border-color: #5a7751;
    transform: translateX(5px);
    box-shadow: -3px 3px 10px rgba(0, 0, 0, 0.3);
}

.choice-button:hover::before {
    color: #5a7751;
}

/* Main Menu Button (Campaign End) */
.main-menu-button {
    background: linear-gradient(135deg, #667eea, #764ba2);
    font-size: 1.2rem;
    padding: 15px 40px;
    margin-top: 20px;
    border: 2px solid #fff;
    animation: pulseGlow 2s ease-in-out infinite;
}

.main-menu-button:hover {
    background: linear-gradient(135deg, #764ba2, #667eea);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.5);
}

@keyframes pulseGlow {
    0% { box-shadow: 0 0 20px rgba(102, 126, 234, 0.5); }
    50% { box-shadow: 0 0 40px rgba(118, 75, 162, 0.8); }
    100% { box-shadow: 0 0 20px rgba(102, 126, 234, 0.5); }
}

#status-bar {
    background: #0f0f0f;
    border-top: 2px solid #333;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

#investigation-progress {
    display: flex;
    align-items: center;
    gap: 10px;
}

.progress-bar {
    width: 200px;
    height: 8px;
    background: #333;
    border-radius: 4px;
    overflow: hidden;
}

#progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff6b6b, #4ecdc4);
    width: 0%;
    transition: width 1s ease;
}

#evidence-count {
    color: #4ecdc4;
    font-weight: 500;
}

#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-content {
    text-align: center;
    color: #ff6b6b;
}

.classified-stamp {
    font-size: 4rem;
    font-weight: 700;
    color: #8b0000;
    transform: rotate(-15deg);
    margin-bottom: 20px;
    text-shadow: 0 0 20px rgba(139, 0, 0, 0.5);
    font-family: 'Courier Prime', monospace;
}

.loading-text {
    font-size: 1.5rem;
    margin-bottom: 20px;
    font-family: 'IBM Plex Mono', monospace;
}

.loading-dots span {
    font-size: 2rem;
    animation: loadingDots 1.5s infinite;
    margin: 0 5px;
}

.loading-dots span:nth-child(2) {
    animation-delay: 0.3s;
}

.loading-dots span:nth-child(3) {
    animation-delay: 0.6s;
}

@keyframes loadingDots {
    0%, 20% { opacity: 0; }
    50% { opacity: 1; }
    100% { opacity: 0; }
}

.hidden {
    display: none !important;
}

.typewriter {
    overflow: hidden;
    border-right: 2px solid #e0e0e0;
    white-space: nowrap;
    animation: typing 3s steps(40, end), blinkCursor 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blinkCursor {
    from, to { border-color: transparent; }
    50% { border-color: #e0e0e0; }
}

@keyframes documentFlash {
    0% { 
        box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
        transform: scale(1);
    }
    50% { 
        box-shadow: inset 0 0 40px rgba(255, 107, 107, 0.3), 0 0 20px rgba(255, 107, 107, 0.2);
        transform: scale(1.02);
    }
    100% { 
        box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
        transform: scale(1);
    }
}

@keyframes pulseGlow {
    0% { 
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 4px 30px rgba(255, 107, 107, 0.4);
        transform: scale(1.01);
    }
    100% { 
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
        transform: scale(1);
    }
}

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

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

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

.suspense-mode {
    animation: pulseGlow 3s ease-in-out infinite;
}

.document-flash {
    animation: documentFlash 0.5s ease-in-out;
}

.slide-in-left {
    animation: slideInLeft 0.8s ease-out;
}

.slide-in-right {
    animation: slideInRight 0.8s ease-out;
}

.flicker-text {
    animation: flickerText 2s ease-in-out infinite;
}

/* AI Image System Styles */
.scene-image-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.image-placeholder {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #2a2a2a;
    border-radius: 4px;
    position: relative;
}

.image-loading {
    text-align: center;
    color: #4ecdc4;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #333;
    border-top: 3px solid #4ecdc4;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.image-prompt {
    font-size: 12px;
    color: #888;
    font-style: italic;
    margin-top: 10px;
    max-width: 300px;
}

.generated-image {
    text-align: center;
    padding: 20px;
    color: #e0e0e0;
}

.prompt-used {
    font-size: 11px;
    color: #888;
    margin: 10px 0;
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
}

.image-note {
    background: #1a1a1a;
    padding: 10px;
    border-radius: 4px;
    margin-top: 15px;
    border-left: 3px solid #4ecdc4;
}

.image-caption {
    background: #333;
    padding: 8px 12px;
    font-size: 12px;
    color: #ccc;
    border-radius: 0 0 4px 4px;
    text-transform: capitalize;
}

.scene-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.scene-image:hover {
    transform: scale(1.02);
}

.image-error {
    text-align: center;
    padding: 20px;
    color: #ff6b6b;
}

.image-error .prompt-used {
    color: #888;
    font-size: 11px;
    margin: 10px 0;
}

.image-error .image-note {
    background: #2d1a1a;
    border-left-color: #ff6b6b;
}

.no-image {
    color: #666;
    font-style: italic;
    text-align: center;
}

/* Educational Features */
.sources-section {
    background: #1e3a1e;
    border: 1px solid #4a6741;
    border-radius: 6px;
    padding: 15px;
    margin-top: 20px;
    margin-bottom: 15px;
}

.sources-section h4 {
    color: #4ecdc4;
    margin-bottom: 10px;
    font-size: 14px;
}

.sources-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sources-section li {
    background: #2d4a2d;
    padding: 8px 12px;
    margin: 5px 0;
    border-radius: 4px;
    font-size: 13px;
    border-left: 3px solid #4ecdc4;
}

.educational-note {
    background: #2d2d4a;
    border: 1px solid #4741a6;
    border-radius: 6px;
    padding: 15px;
    margin-top: 15px;
    margin-bottom: 20px;
}

.note-header {
    color: #9f94ff;
    font-weight: bold;
    margin-bottom: 8px;
    font-size: 14px;
}

.educational-note p {
    color: #e0e0e0;
    font-size: 13px;
    line-height: 1.6;
    margin: 0;
}

/* Factual Content Indicators */
.choice-button.factual {
    border-left: 4px solid #4ecdc4;
    background: linear-gradient(135deg, #2d4a4a 0%, #1e3a3a 100%);
}

.choice-button.factual::before {
    content: "✓ ";
    color: #4ecdc4;
}

/* Visited choices */
.choice-button.visited {
    opacity: 0.6;
    background: linear-gradient(135deg, #1a2a1a 0%, #151f15 100%);
    border-color: #3a4731;
}

.choice-button.visited::after {
    content: " (visited)";
    font-size: 0.85em;
    color: #888;
    font-style: italic;
}

.choice-button.factual:hover {
    background: linear-gradient(135deg, #3d5a5a 0%, #2e4a4a 100%);
    border-left-color: #5fd4d4;
}

/* Quiz System Styles */
.quiz-feedback {
    background: #2d2d4a;
    border-radius: 6px;
    padding: 12px 15px;
    margin: 15px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: feedbackSlide 0.5s ease-out;
}

.quiz-feedback.correct {
    background: #1e4a1e;
    border-left: 4px solid #4ecdc4;
}

.quiz-feedback.partial {
    background: #4a3d1e;
    border-left: 4px solid #ffa500;
}

.quiz-feedback.incorrect {
    background: #4a1e1e;
    border-left: 4px solid #ff6b6b;
}

.feedback-icon {
    font-size: 18px;
    min-width: 20px;
}

.feedback-message {
    color: #e0e0e0;
    font-size: 14px;
}

@keyframes feedbackSlide {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Knowledge and Badge Display */
.knowledge-display {
    color: #9f94ff;
    font-weight: 500;
    font-size: 14px;
}

.badge-display {
    display: flex;
    gap: 5px;
    align-items: center;
}

.badge {
    font-size: 16px;
    padding: 2px;
    cursor: help;
    transition: transform 0.2s ease;
}

.badge:hover {
    transform: scale(1.2);
}

/* Badge Notification */
.badge-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #2d4a2d 0%, #1e3a1e 100%);
    border: 2px solid #4ecdc4;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    z-index: 1001;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
    max-width: 300px;
}

.badge-earned {
    display: flex;
    align-items: center;
    gap: 12px;
}

.badge-icon {
    font-size: 24px;
}

.badge-name {
    color: #4ecdc4;
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 4px;
}

.badge-desc {
    color: #e0e0e0;
    font-size: 12px;
    line-height: 1.4;
}

/* Quiz Mode Styling */
.choice-button[data-quiz="true"] {
    border-left: 4px solid #9f94ff;
    background: linear-gradient(135deg, #2d2d4a 0%, #1e1e3a 100%);
}

.choice-button[data-quiz="true"]::before {
    content: "? ";
    color: #9f94ff;
}

.choice-button[data-quiz="true"]:hover {
    background: linear-gradient(135deg, #3d3d5a 0%, #2e2e4a 100%);
    border-left-color: #bfb4ff;
}

/* Case Selection Styles */
.case-selection {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    border: 2px solid #444;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.case-selection h2 {
    font-family: 'Courier Prime', monospace;
    font-weight: 700;
    text-shadow: 0 0 15px rgba(255, 107, 107, 0.4);
    letter-spacing: 2px;
}

.case-selection p {
    font-size: 15px;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

.case-selection-button {
    background: linear-gradient(135deg, #8b0000 0%, #4a0000 100%);
    border: 3px solid #ff6b6b;
    color: #ffffff;
    padding: 20px 30px;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 1px;
    width: 100%;
    max-width: 500px;
    margin: 0 auto 15px;
    display: block;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(139, 0, 0, 0.4);
}

.case-selection-button:hover {
    background: linear-gradient(135deg, #a00000 0%, #600000 100%);
    border-color: #ff8080;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 0, 0, 0.6);
}

.case-selection-button::before {
    content: "";
    margin-right: 0;
}

/* Sealed Case Styles */
.case-selection-button.sealed {
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    border: 3px solid #666;
    color: #ccc;
    cursor: not-allowed;
    position: relative;
    overflow: visible;
}

.case-selection-button.sealed:hover {
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    border-color: #666;
    transform: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.case-selection-button.sealed::after {
    content: "🔒 SEALED";
    position: absolute;
    top: -10px;
    right: 20px;
    transform: rotate(12deg);
    background: #8b0000;
    color: #fff;
    padding: 4px 12px;
    border: 2px solid #ff6b6b;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(139, 0, 0, 0.6);
    z-index: 10;
}

.case-selection-button.sealed .case-title {
    opacity: 0.9;
    color: #e0e0e0;
}

.case-selection-button.sealed .release-date {
    position: absolute;
    bottom: 10px;
    right: 15px;
    font-size: 12px;
    color: #ff6b6b;
    font-style: italic;
    opacity: 0.8;
}

/* Open Case Enhanced Styling */
.case-selection-button.open {
    position: relative;
}

.case-selection-button.open::after {
    content: "✅ CLEARED FOR INVESTIGATION";
    position: absolute;
    top: 10px;
    right: 15px;
    background: #0d4f0d;
    color: #4ecdc4;
    padding: 4px 8px;
    border: 1px solid #4ecdc4;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
    opacity: 0.9;
}

.case-selection-button.open:hover::after {
    background: #0f5f0f;
    color: #5fd4d4;
    border-color: #5fd4d4;
}

/* Sealed Case Message Styles */
.sealed-case-message {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    border: 3px solid #8b0000;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 8px 30px rgba(139, 0, 0, 0.4);
    position: relative;
}

.sealed-case-message .classified-stamp {
    font-size: 3rem;
    font-weight: 700;
    color: #8b0000;
    transform: rotate(-15deg);
    margin-bottom: 20px;
    text-shadow: 0 0 20px rgba(139, 0, 0, 0.5);
    font-family: 'Courier Prime', monospace;
}

.sealed-case-info {
    background: #2a2a2a;
    border: 2px solid #666;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    text-align: left;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.sealed-case-info p {
    margin: 8px 0;
    color: #e0e0e0;
    font-size: 14px;
}

.sealed-case-info strong {
    color: #ff6b6b;
    display: inline-block;
    width: 140px;
}

.security-message {
    background: #4a1e1e;
    border: 2px solid #ff6b6b;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.security-message p {
    color: #e0e0e0;
    font-size: 14px;
    line-height: 1.6;
    margin: 10px 0;
}

/* Ad Container Styles */
.ad-container {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    border: 2px solid #444;
    border-radius: 8px;
    padding: 20px;
    margin: 30px auto;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    position: relative;
}

.ad-label {
    position: absolute;
    top: -10px;
    left: 20px;
    background: #2a2a2a;
    padding: 2px 10px;
    font-size: 10px;
    color: #666;
    letter-spacing: 1px;
    border: 1px solid #444;
    border-radius: 3px;
}

.ethical-ad {
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Specific ad placement styles */
.sealed-case-ad {
    margin-top: 40px;
    border-color: #8b0000;
}

.sealed-case-ad .ad-label {
    background: #4a1e1e;
    border-color: #8b0000;
    color: #ff6b6b;
}

.completion-ad {
    margin: 30px auto 20px;
    border-color: #4ecdc4;
}

.completion-ad .ad-label {
    background: #1e3a3a;
    border-color: #4ecdc4;
    color: #4ecdc4;
}

/* EthicalAds specific overrides */
.ea-content {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.ea-content a {
    color: #4ecdc4 !important;
}

.ea-callout {
    color: #666 !important;
    font-size: 11px !important;
}

/* Enhanced Status Bar */
#status-bar {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 20px;
    align-items: center;
}

@media (max-width: 768px) {
    #status-bar {
        grid-template-columns: 1fr;
        gap: 10px;
        text-align: center;
    }
    
    .badge-notification {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

.evidence-found {
    color: #4ecdc4;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(78, 205, 196, 0.3);
}

@media (max-width: 768px) {
    #game-main {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 15px;
    }
    
    #game-title {
        font-size: 2rem;
    }
    
    #narrative-section {
        padding: 20px;
    }
    
    .choice-button {
        padding: 12px 15px;
        font-size: 13px;
    }
}

/* ===============================
   MINI-GAME STYLES
   =============================== */

.mini-game-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.mini-game-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mini-game-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}

.mini-game-container {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    border: 3px solid #8b4513;
    border-radius: 12px;
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.8);
    position: relative;
    font-family: 'IBM Plex Mono', monospace;
}

.mini-game-header {
    background: linear-gradient(90deg, #2c1810 0%, #4a2c1a 50%, #2c1810 100%);
    border-bottom: 2px solid #8b4513;
    padding: 20px;
    text-align: center;
    position: relative;
}

.mini-game-title {
    font-family: 'Courier Prime', monospace;
    font-size: 1.8rem;
    font-weight: 700;
    color: #ff6b6b;
    text-shadow: 0 0 10px rgba(255, 107, 107, 0.3);
    margin-bottom: 5px;
    letter-spacing: 2px;
}

.mini-game-subtitle {
    color: #ccc;
    font-size: 0.9rem;
    font-style: italic;
    opacity: 0.8;
}

.mini-game-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: #8b0000;
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mini-game-close:hover {
    background: #a00000;
    transform: scale(1.1);
}

.document-reconstruction-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    padding: 30px;
    min-height: 400px;
}

.fragments-container h3,
.reconstruction-area h3 {
    color: #ff6b6b;
    font-family: 'Courier Prime', monospace;
    margin-bottom: 15px;
    text-align: center;
    font-size: 1.1rem;
    text-shadow: 0 0 5px rgba(255, 107, 107, 0.2);
}

.fragments-area {
    background: #0f0f0f;
    border: 2px dashed #444;
    border-radius: 8px;
    min-height: 300px;
    padding: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-content: flex-start;
}

.document-template {
    background: #1e1e1e;
    border: 2px solid #8b4513;
    border-radius: 8px;
    min-height: 300px;
    padding: 15px;
    position: relative;
}

.document-template::before {
    content: "CLASSIFIED DOCUMENT";
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: #8b0000;
    color: white;
    padding: 5px 15px;
    font-size: 0.8rem;
    border-radius: 4px;
    letter-spacing: 1px;
}

.document-fragment {
    background: linear-gradient(135deg, #2a2a2a 0%, #3a3a3a 100%);
    border: 1px solid #555;
    border-radius: 6px;
    padding: 8px 12px;
    margin: 2px;
    cursor: grab;
    transition: all 0.2s ease;
    min-width: 80px;
    text-align: center;
    font-size: 0.85rem;
    color: #e0e0e0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    user-select: none;
}

.document-fragment:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    border-color: #ff6b6b;
}

.document-fragment.dragging {
    cursor: grabbing;
    opacity: 0.7;
    transform: rotate(5deg);
    z-index: 1000;
}

.document-fragment.placed-correctly {
    background: linear-gradient(135deg, #1a4a1a 0%, #2a5a2a 100%);
    border-color: #4a8a4a;
    cursor: default;
    box-shadow: 0 0 10px rgba(74, 138, 74, 0.3);
}

.document-fragment.shake {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.drop-zone {
    background: #1a1a1a;
    border: 2px dashed #444;
    border-radius: 6px;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    position: relative;
}

.drop-zone.drag-over {
    border-color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
    box-shadow: inset 0 0 10px rgba(255, 107, 107, 0.2);
}

.drop-zone:empty::before {
    content: "";
    color: #666;
    font-size: 0.8rem;
    font-style: italic;
}

.mini-game-progress {
    background: #0f0f0f;
    border-top: 2px solid #333;
    padding: 15px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.progress-text {
    color: #ccc;
    font-size: 0.9rem;
}

.progress-bar-mini {
    flex: 1;
    background: #333;
    height: 10px;
    border-radius: 5px;
    margin-left: 20px;
    overflow: hidden;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.3);
}

.progress-fill-mini {
    height: 100%;
    background: linear-gradient(90deg, #ff6b6b 0%, #ff8e8e 100%);
    width: 0%;
    transition: width 0.5s ease;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(255, 107, 107, 0.3);
}

.mini-game-hint {
    background: rgba(255, 107, 107, 0.1);
    border-top: 1px solid rgba(255, 107, 107, 0.3);
    padding: 15px 30px;
    text-align: center;
}

.mini-game-hint p {
    color: #ccc;
    font-size: 0.85rem;
    margin: 0;
}

.feedback-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 15px 25px;
    border-radius: 8px;
    font-weight: 500;
    z-index: 1001;
    animation: fadeInOut 2s ease-in-out;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
}

.feedback-message.success {
    background: linear-gradient(135deg, #1a4a1a, #2a5a2a);
    border: 2px solid #4a8a4a;
    color: #8fff8f;
}

.feedback-message.error {
    background: linear-gradient(135deg, #4a1a1a, #5a2a2a);
    border: 2px solid #8a4a4a;
    color: #ff8f8f;
}

.feedback-message.info {
    background: linear-gradient(135deg, #1a1a4a, #2a2a5a);
    border: 2px solid #4a4a8a;
    color: #8f8fff;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0; transform: translate(-50%, -60%); }
    20%, 80% { opacity: 1; transform: translate(-50%, -50%); }
}

.completion-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1002;
    animation: completionFadeIn 0.5s ease-out;
}

.completion-content {
    background: linear-gradient(135deg, #2a2a2a 0%, #3a3a3a 100%);
    border: 3px solid #8b4513;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    max-width: 500px;
}

.completion-content h2 {
    color: #ff6b6b;
    font-family: 'Courier Prime', monospace;
    margin-bottom: 20px;
    font-size: 1.5rem;
    text-shadow: 0 0 10px rgba(255, 107, 107, 0.3);
}

.completion-content p {
    color: #ccc;
    margin-bottom: 25px;
    line-height: 1.5;
}

.rewards {
    margin: 25px 0;
}

.reward-item {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 10px 0;
    padding: 10px;
    background: rgba(255, 107, 107, 0.1);
    border-radius: 6px;
    border: 1px solid rgba(255, 107, 107, 0.3);
}

.reward-icon {
    font-size: 1.2rem;
    margin-right: 10px;
}

.reward-text {
    color: #e0e0e0;
    font-weight: 500;
}

.continue-btn {
    background: linear-gradient(135deg, #8b4513 0%, #a0522d 100%);
    border: 2px solid #8b4513;
    color: white;
    padding: 12px 25px;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.continue-btn:hover {
    background: linear-gradient(135deg, #a0522d 0%, #8b4513 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

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

.ghost-fragment {
    position: fixed;
    pointer-events: none;
    opacity: 0.5;
    z-index: 10001;
    transform: rotate(5deg);
}

/* ================================
   CIPHER DECODER MINI-GAME
   ================================ */

.cipher-container {
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cipher-message-box {
    background: linear-gradient(135deg, #1a1a1a, #252525);
    border: 2px solid #444;
    border-radius: 8px;
    padding: 25px;
    min-height: 150px;
}

.cipher-words {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    align-items: flex-start;
}

.cipher-word {
    display: flex;
    gap: 4px;
}

.cipher-line-break {
    width: 100%;
    height: 10px;
}

.cipher-letter-pair {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 6px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 32px;
    background: rgba(255, 255, 255, 0.03);
}

.cipher-letter-pair:hover {
    background: rgba(139, 69, 19, 0.3);
}

.cipher-letter-pair.selected {
    background: rgba(139, 69, 19, 0.5);
    border: 2px solid #8b4513;
    box-shadow: 0 0 10px rgba(139, 69, 19, 0.5);
}

.cipher-letter-pair.correct .cipher-decoded {
    color: #4ade80;
    text-shadow: 0 0 5px rgba(74, 222, 128, 0.5);
}

.cipher-letter-pair.punctuation {
    cursor: default;
    background: transparent;
}

.cipher-letter-pair.punctuation:hover {
    background: transparent;
}

.cipher-encrypted {
    font-family: 'Courier Prime', monospace;
    font-size: 1.4rem;
    font-weight: bold;
    color: #ff6b6b;
    text-shadow: 0 0 5px rgba(255, 107, 107, 0.3);
}

.cipher-arrow {
    color: #666;
    font-size: 0.8rem;
    line-height: 1;
}

.cipher-decoded {
    font-family: 'Courier Prime', monospace;
    font-size: 1.4rem;
    font-weight: bold;
    color: #666;
    min-height: 1.4rem;
}

.cipher-decoded.filled {
    color: #e0e0e0;
}

.cipher-char {
    font-family: 'Courier Prime', monospace;
    font-size: 1.4rem;
    color: #888;
    padding: 8px 2px;
}

.cipher-input-section {
    background: rgba(139, 69, 19, 0.1);
    border: 1px solid rgba(139, 69, 19, 0.3);
    border-radius: 8px;
    padding: 15px 20px;
    text-align: center;
}

.selected-letter-display {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 1.1rem;
    color: #ccc;
}

.input-encrypted {
    color: #ff6b6b;
    font-weight: bold;
    font-size: 1.3rem;
}

.input-arrow {
    color: #666;
}

.input-decoded {
    color: #4ade80;
    font-weight: bold;
    font-size: 1.3rem;
}

.input-hint {
    color: #888;
    font-size: 0.85rem;
}

.cipher-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.cipher-hint-btn,
.cipher-clear-btn {
    background: linear-gradient(135deg, #2a2a3a 0%, #3a3a4a 100%);
    border: 2px solid #4a4a5a;
    color: #ccc;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.cipher-hint-btn:hover,
.cipher-clear-btn:hover {
    background: linear-gradient(135deg, #3a3a4a 0%, #4a4a5a 100%);
    border-color: #5a5a6a;
}

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

/* Decoded message in completion screen */
.decoded-message-box {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(139, 69, 19, 0.5);
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.decoded-label {
    color: #888;
    font-size: 0.85rem;
    margin-bottom: 10px !important;
}

.decoded-text {
    color: #4ade80;
    font-family: 'Courier Prime', monospace;
    font-size: 1.2rem;
    font-weight: bold;
    line-height: 1.6;
}

.reward-item.bonus {
    background: rgba(74, 222, 128, 0.1);
    border-color: rgba(74, 222, 128, 0.3);
}

.reward-item.bonus .reward-text {
    color: #4ade80;
}

/* ================================
   EVIDENCE CONNECTION MINI-GAME
   ================================ */

.evidence-board-container {
    padding: 20px 30px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.evidence-board {
    position: relative;
    width: 100%;
    max-width: 700px;
    height: 400px;
    background: linear-gradient(135deg, #1a1a1a, #252525);
    border: 2px solid #444;
    border-radius: 8px;
    overflow: hidden;
}

.connection-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.connection-line {
    stroke-width: 3;
    stroke-linecap: round;
    transition: all 0.3s ease;
}

.connection-line.correct {
    stroke: #4ade80;
    filter: drop-shadow(0 0 4px rgba(74, 222, 128, 0.5));
}

.connection-line.wrong {
    stroke: #ff6b6b;
    filter: drop-shadow(0 0 4px rgba(255, 107, 107, 0.5));
    animation: wrongConnection 0.5s ease;
}

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

.evidence-items {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.evidence-item {
    position: absolute;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #2a2a3a, #3a3a4a);
    border: 2px solid #555;
    border-radius: 8px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    min-width: 100px;
    z-index: 2;
}

.evidence-item:hover {
    border-color: #8b4513;
    transform: translate(-50%, -50%) scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.evidence-item.selected {
    border-color: #ff6b6b;
    background: linear-gradient(135deg, #3a2a2a, #4a3a3a);
    box-shadow: 0 0 15px rgba(255, 107, 107, 0.4);
    transform: translate(-50%, -50%) scale(1.1);
}

.evidence-item.connected {
    border-color: #4ade80;
    box-shadow: 0 0 10px rgba(74, 222, 128, 0.3);
}

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

.evidence-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    color: #ccc;
    white-space: nowrap;
}

.evidence-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    padding: 15px;
}

.evidence-hint-btn,
.evidence-clear-btn {
    background: linear-gradient(135deg, #2a2a3a 0%, #3a3a4a 100%);
    border: 2px solid #4a4a5a;
    color: #ccc;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.evidence-hint-btn:hover,
.evidence-clear-btn:hover {
    background: linear-gradient(135deg, #3a3a4a 0%, #4a4a5a 100%);
    border-color: #5a5a6a;
}

/* Mini-game responsive design */
@media (max-width: 768px) {
    .mini-game-container {
        width: 95%;
        max-height: 95vh;
    }
    
    .document-reconstruction-container {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
    }
    
    .mini-game-title {
        font-size: 1.4rem;
    }
    
    .completion-content {
        padding: 25px;
        margin: 20px;
    }
}