/* EXIT Game Style - Dark Escape Room Aesthetic */

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

body {
    font-family: 'Courier New', monospace;
    background: linear-gradient(135deg, #1a1a2e 0%, #0f0f1e 100%);
    color: #e0e0e0;
    min-height: 100vh;
    padding: 10px;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Screen Management */
.screen {
    display: none;
}

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

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

/* EXIT Box Styling */
.exit-box {
    background: #16213e;
    border: 3px solid #e94560;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 0 30px rgba(233, 69, 96, 0.3);
    margin: 10px auto;
    max-width: 800px;
}

.exit-header {
    text-align: center;
    margin-bottom: 15px;
}

.exit-header h1 {
    font-size: 2.5em;
    color: #e94560;
    letter-spacing: 12px;
    text-shadow: 0 0 20px rgba(233, 69, 96, 0.5);
    font-weight: bold;
    margin: 0;
}

.subtitle {
    font-size: 1.2em;
    color: #f39c12;
    letter-spacing: 6px;
    margin-top: 5px;
}

.bible-verse {
    text-align: center;
    margin: 15px 0;
    padding: 12px;
    background: rgba(233, 69, 96, 0.1);
    border-left: 4px solid #e94560;
}

.bible-verse p {
    font-size: 1em;
    font-style: italic;
    color: #f39c12;
    margin-bottom: 5px;
}

.bible-verse span {
    color: #888;
    font-size: 0.85em;
}

/* Game Description */
.game-description {
    text-align: center;
    margin: 15px 0;
}

.game-description h2 {
    color: #f39c12;
    margin-bottom: 10px;
    font-size: 1.3em;
}

.game-description p {
    color: #ccc;
    line-height: 1.4;
    margin: 5px 0;
    font-size: 0.95em;
}

/* Options */
.options {
    margin: 15px 0;
}

.option-group {
    margin: 8px 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.95em;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
    transition: all 0.3s;
}

.checkbox-label:hover {
    background: rgba(233, 69, 96, 0.1);
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 15px;
    cursor: pointer;
}

/* Buttons */
.btn-start, .btn-submit, .btn-hint, .btn-next {
    width: 100%;
    padding: 12px 25px;
    font-size: 1em;
    font-weight: bold;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
    margin-top: 15px;
}

.btn-start {
    background: #e94560;
    color: white;
}

.btn-start:hover {
    background: #d63447;
    box-shadow: 0 0 20px rgba(233, 69, 96, 0.5);
}

.btn-submit {
    background: #27ae60;
    color: white;
}

.btn-submit:hover {
    background: #229954;
}

.btn-hint {
    background: #f39c12;
    color: white;
}

.btn-hint:hover {
    background: #e67e22;
}

.btn-next {
    background: #3498db;
    color: white;
}

.btn-next:hover {
    background: #2980b9;
}

/* Game Header */
.game-header {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    background: #16213e;
    border: 2px solid #e94560;
    border-radius: 5px;
    margin-bottom: 8px;
}

.game-header > div {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.game-header .label {
    font-size: 0.75em;
    color: #888;
    margin-bottom: 2px;
}

.game-header .value {
    font-size: 1em;
    color: #f39c12;
    font-weight: bold;
}

/* Chamber Container */
.chamber-container {
    background: #16213e;
    border: 2px solid #e94560;
    border-radius: 5px;
    padding: 10px;
    margin-bottom: 8px;
}

.chamber-header {
    text-align: center;
    margin-bottom: 8px;
}

.chamber-header h2 {
    color: #e94560;
    font-size: 1.2em;
    margin-bottom: 3px;
}

.scripture {
    color: #f39c12;
    font-style: italic;
    font-size: 0.85em;
}

/* Chamber Image - LARGE AND CENTERED */
.chamber-image-container {
    text-align: center;
    margin: 10px auto;
}

.chamber-image-container img {
    max-width: 100%;
    width: 500px;
    height: auto;
    border: 3px solid #e94560;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(233, 69, 96, 0.5);
    display: block;
    margin: 0 auto;
}

/* AI Story */
.ai-story {
    background: rgba(243, 156, 18, 0.1);
    border-left: 3px solid #f39c12;
    padding: 8px;
    margin: 8px 0;
    border-radius: 5px;
    max-height: 100px;
    overflow-y: auto;
}

.ai-story h3 {
    color: #f39c12;
    margin-bottom: 5px;
    font-size: 0.95em;
}

.ai-story p {
    line-height: 1.2;
    color: #ccc;
    font-size: 0.8em;
}

/* Story Box */
.puzzle-box {
    background: rgba(15, 15, 30, 0.8);
    border: 2px solid #f39c12;
    border-radius: 8px;
    padding: 15px;
    margin: 10px 0;
    max-height: 200px;
    overflow-y: auto;
}

.puzzle-box pre {
    color: #e0e0e0;
    font-family: Arial, sans-serif;
    line-height: 1.5;
    overflow-x: auto;
    font-size: 0.9em;
    white-space: pre-wrap;
}

/* Answer Section */
.answer-section {
    margin: 8px 0;
}

.code-input-container {
    display: flex;
    gap: 10px;
}

#answer-input {
    flex: 1;
    padding: 8px;
    font-size: 1.1em;
    font-family: 'Courier New', monospace;
    background: #0f0f1e;
    border: 2px solid #555;
    border-radius: 5px;
    color: #f39c12;
    text-align: center;
    letter-spacing: 8px;
}

#answer-input:focus {
    outline: none;
    border-color: #e94560;
}

.btn-continue {
    background: #27ae60;
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
    width: 100%;
    margin: 10px 0;
}

.btn-continue:hover {
    background: #229954;
    transform: scale(1.02);
}

.feedback {
    margin-top: 8px;
    padding: 8px;
    border-radius: 5px;
    text-align: center;
    font-weight: bold;
    font-size: 0.9em;
}

.feedback.success {
    background: rgba(39, 174, 96, 0.2);
    border: 2px solid #27ae60;
    color: #27ae60;
}

.feedback.error {
    background: rgba(231, 76, 60, 0.2);
    border: 2px solid #e74c3c;
    color: #e74c3c;
}

/* Hint Section */
.hint-section {
    margin: 8px 0;
}

.btn-hint {
    padding: 8px 20px;
    font-size: 0.85em;
    margin-top: 8px;
}

.hint-display {
    margin-top: 8px;
    padding: 8px;
    background: rgba(52, 152, 219, 0.1);
    border-left: 3px solid #3498db;
    border-radius: 5px;
    color: #3498db;
    font-size: 0.85em;
}

/* Spiritual Companion */
.spiritual-companion {
    background: rgba(52, 152, 219, 0.1);
    border: 2px solid #3498db;
    border-radius: 8px;
    padding: 12px;
    margin: 10px 0;
}

.spiritual-companion h3 {
    color: #3498db;
    margin-bottom: 10px;
    font-size: 1em;
}

.spiritual-tools {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.btn-spiritual {
    background: #3498db;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.8em;
    transition: background 0.3s;
}

.btn-spiritual:hover {
    background: #2980b9;
}

.spiritual-response {
    background: rgba(255, 255, 255, 0.05);
    padding: 10px;
    border-radius: 5px;
    margin: 10px 0;
    min-height: 40px;
    font-size: 0.85em;
    line-height: 1.4;
}

.chat-container {
    margin-top: 10px;
}

.chat-messages {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 5px;
    padding: 8px;
    max-height: 150px;
    overflow-y: auto;
    margin-bottom: 8px;
}

.chat-message {
    margin: 6px 0;
    padding: 6px;
    border-radius: 5px;
    font-size: 0.8em;
}

.chat-message.user {
    background: rgba(243, 156, 18, 0.2);
    text-align: right;
}

.chat-message.ai {
    background: rgba(52, 152, 219, 0.2);
}

.chat-input-container {
    display: flex;
    gap: 8px;
}

#chat-input {
    flex: 1;
    padding: 8px;
    background: #0f0f1e;
    border: 2px solid #555;
    border-radius: 5px;
    color: white;
    font-size: 0.85em;
}

.btn-chat {
    background: #3498db;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.85em;
}

.btn-chat:hover {
    background: #2980b9;
}

/* Lesson Container */
.lesson-container {
    background: #16213e;
    border: 2px solid #27ae60;
    border-radius: 10px;
    padding: 15px;
    margin-top: 15px;
}

.lesson-box h3 {
    color: #27ae60;
    margin-bottom: 12px;
    text-align: center;
    font-size: 1.3em;
}

#lesson-text {
    line-height: 1.5;
    color: #ccc;
    margin-bottom: 15px;
    font-size: 0.95em;
}

/* Completion Screen */
.completion {
    text-align: center;
}

.completion h1 {
    color: #27ae60;
    margin-bottom: 10px;
}

.completion h2 {
    color: #f39c12;
    margin-bottom: 30px;
}

.completion-stats {
    margin: 30px 0;
}

.stat {
    display: flex;
    justify-content: space-between;
    padding: 15px;
    margin: 10px 0;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
}

.stat-label {
    color: #888;
}

.stat-value {
    color: #f39c12;
    font-weight: bold;
    font-size: 1.2em;
}

.final-verse {
    margin: 30px 0;
    padding: 20px;
    background: rgba(39, 174, 96, 0.1);
    border-left: 4px solid #27ae60;
}

.final-verse p {
    color: #27ae60;
    font-style: italic;
    margin-bottom: 10px;
}

.final-verse span {
    color: #888;
    font-size: 0.9em;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    animation: fadeIn 0.3s;
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: #16213e;
    border: 3px solid #e94560;
    border-radius: 10px;
    padding: 40px;
    max-width: 600px;
    box-shadow: 0 0 30px rgba(233, 69, 96, 0.5);
}

.modal-content h2 {
    color: #e94560;
    text-align: center;
    margin-bottom: 20px;
}

.temptation-text {
    text-align: center;
    color: #f39c12;
    margin: 20px 0;
    line-height: 1.8;
}

.modal-buttons {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.btn-temptation {
    flex: 1;
    padding: 15px;
    font-size: 1.1em;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    transition: all 0.3s;
}

.btn-temptation.resist {
    background: #27ae60;
    color: white;
}

.btn-temptation.resist:hover {
    background: #229954;
}

.btn-temptation.shortcut {
    background: #e74c3c;
    color: white;
}

.btn-temptation.shortcut:hover {
    background: #c0392b;
}

/* Responsive Design */

/* Tablets and smaller desktops */
@media (max-width: 1024px) {
    .container {
        padding: 10px;
    }
    
    .exit-box {
        padding: 30px 20px;
    }
}

/* Mobile devices */
@media (max-width: 768px) {
    body {
        padding: 5px;
    }
    
    .exit-header h1 {
        font-size: 2em;
        letter-spacing: 6px;
    }
    
    .subtitle {
        font-size: 1em;
        letter-spacing: 4px;
    }
    
    .bible-verse p {
        font-size: 0.9em;
    }
    
    .exit-box {
        padding: 15px 12px;
        margin: 5px auto;
    }
    
    .game-header {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 10px;
        padding: 15px;
    }
    
    .game-header > div {
        flex: 1 1 30%;
        min-width: 100px;
    }
    
    .game-header .value {
        font-size: 1.2em;
    }
    
    .chamber-container {
        padding: 12px 10px;
    }
    
    .chamber-header h2 {
        font-size: 1.3em;
    }
    
    .chamber-image-container img {
        max-height: 200px;
    }
    
    .code-input-container {
        flex-direction: column;
    }
    
    .btn-submit {
        width: 100%;
    }
    
    #answer-input {
        font-size: 1.3em;
        padding: 12px;
    }
    
    .modal-content {
        padding: 25px 15px;
        margin: 20px;
    }
    
    .modal-buttons {
        flex-direction: column;
    }
    
    .chamber-image-container img {
        max-width: 100%;
        height: auto;
    }
    
    .puzzle-box {
        padding: 15px;
        overflow-x: auto;
    }
    
    .puzzle-box pre {
        font-size: 0.85em;
        white-space: pre-wrap;
        word-wrap: break-word;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    body {
        padding: 3px;
    }
    
    .exit-header h1 {
        font-size: 1.8em;
        letter-spacing: 4px;
    }
    
    .subtitle {
        font-size: 0.9em;
        letter-spacing: 2px;
    }
    
    .bible-verse {
        padding: 10px;
        margin: 10px 0;
    }
    
    .bible-verse p {
        font-size: 0.85em;
    }
    
    .game-description h2 {
        font-size: 1.1em;
    }
    
    .game-description p {
        font-size: 0.85em;
        line-height: 1.3;
    }
    
    .exit-box {
        padding: 12px 8px;
        margin: 3px auto;
    }
    
    .game-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .game-header > div {
        width: 100%;
    }
    
    .chamber-header h2 {
        font-size: 1.2em;
    }
    
    .scripture {
        font-size: 0.85em;
    }
    
    .btn-start, .btn-submit, .btn-hint, .btn-next {
        font-size: 0.95em;
        padding: 10px 15px;
        margin-top: 10px;
    }
    
    #answer-input {
        font-size: 1.1em;
        letter-spacing: 6px;
        padding: 10px;
    }
    
    .chamber-image-container img {
        max-height: 150px;
    }
    
    .chamber-container {
        padding: 10px 8px;
    }
    
    .ai-story {
        padding: 15px;
    }
    
    .ai-story h3 {
        font-size: 1.1em;
    }
    
    .ai-story p {
        font-size: 0.9em;
    }
    
    .puzzle-box {
        padding: 8px;
        margin: 8px 0;
    }
    
    .puzzle-box pre {
        font-size: 0.7em;
        line-height: 1.2;
    }
    
    .hint-display {
        font-size: 0.85em;
        padding: 10px;
    }
    
    .ai-story {
        padding: 10px;
        margin: 10px 0;
    }
    
    .ai-story h3 {
        font-size: 1em;
    }
    
    .ai-story p {
        font-size: 0.85em;
    }
    
    .lesson-box h3 {
        font-size: 1.2em;
    }
    
    #lesson-text {
        font-size: 0.9em;
    }
    
    .completion h1 {
        font-size: 1.8em;
    }
    
    .completion h2 {
        font-size: 1.2em;
    }
    
    .stat {
        flex-direction: column;
        text-align: center;
        gap: 5px;
    }
    
    .modal-content h2 {
        font-size: 1.3em;
    }
    
    .temptation-text {
        font-size: 0.9em;
    }
}

/* Extra small devices */
@media (max-width: 360px) {
    body {
        padding: 2px;
    }
    
    .exit-header h1 {
        font-size: 1.5em;
        letter-spacing: 2px;
    }
    
    .subtitle {
        font-size: 0.8em;
    }
    
    .exit-box {
        padding: 10px 6px;
    }
    
    .puzzle-box pre {
        font-size: 0.65em;
    }
    
    .chamber-image-container img {
        max-height: 120px;
    }
}

/* Game Mechanics Styling */
.trivia-section, .choice-section {
    background: rgba(52, 152, 219, 0.1);
    border: 2px solid #3498db;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
}

.trivia-section h3, .choice-section h3 {
    color: #3498db;
    margin-bottom: 10px;
}

.trivia-question {
    font-size: 1em;
    color: #f39c12;
    margin: 10px 0;
    font-weight: bold;
}

.trivia-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 10px 0;
}

.btn-trivia {
    background: #16213e;
    border: 2px solid #3498db;
    color: white;
    padding: 12px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: left;
}

.btn-trivia:hover {
    background: #3498db;
    transform: translateX(5px);
}

.btn-trivia.correct {
    background: #27ae60;
    border-color: #27ae60;
}

.btn-trivia.incorrect {
    background: #e74c3c;
    border-color: #e74c3c;
}

.choice-scenario {
    font-size: 0.95em;
    color: #e0e0e0;
    margin: 10px 0;
    line-height: 1.5;
}

.choice-buttons {
    display: flex;
    gap: 10px;
    margin: 15px 0;
}

.btn-choice {
    flex: 1;
    background: #f39c12;
    color: white;
    border: none;
    padding: 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s;
}

.btn-choice:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(243, 156, 18, 0.4);
}

.choice-outcome {
    background: rgba(255, 255, 255, 0.05);
    padding: 10px;
    border-radius: 5px;
    margin: 10px 0;
    font-size: 0.9em;
    line-height: 1.4;
}

.achievements-panel {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: 3px solid #f39c12;
    border-radius: 10px;
    padding: 15px;
    margin: 15px 0;
    text-align: center;
    animation: slideInUp 0.5s ease;
}

.achievements-panel h4 {
    color: #f39c12;
    margin-bottom: 10px;
}

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

.achievement-icon {
    font-size: 2.5em;
}

.achievement-text {
    text-align: left;
}

.achievement-title {
    font-size: 1.2em;
    font-weight: bold;
    color: white;
}

.achievement-desc {
    font-size: 0.9em;
    color: #e0e0e0;
}

.score-display {
    display: flex;
    flex-direction: column;
    align-items: center;
}

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

/* Riddle Input Styling */
.riddle-text {
    font-size: 1.1em;
    color: #f39c12;
    line-height: 1.6;
    padding: 10px;
    text-align: center;
    font-style: italic;
}

.riddle-input {
    width: 100%;
    padding: 15px;
    font-size: 1.1em;
    background: #16213e;
    border: 2px solid #3498db;
    border-radius: 8px;
    color: white;
    margin: 10px 0;
    box-sizing: border-box;
}

.riddle-input:focus {
    outline: none;
    border-color: #f39c12;
    box-shadow: 0 0 10px rgba(243, 156, 18, 0.3);
}

.btn-submit {
    width: 100%;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 8px;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: bold;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(52, 152, 219, 0.4);
}

.hint-section {
    margin: 15px 0;
    text-align: center;
}

.btn-hint {
    background: #9b59b6;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-hint:hover {
    background: #8e44ad;
    transform: scale(1.05);
}

.hint-display {
    background: rgba(155, 89, 182, 0.2);
    border: 2px solid #9b59b6;
    border-radius: 8px;
    padding: 10px;
    margin-top: 10px;
    color: #e0e0e0;
    display: none;
}

.hint-display.show {
    display: block;
    animation: fadeIn 0.5s;
}

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

/* Spiritual Companion Chat Styling */
.chat-message {
    padding: 10px;
    margin: 8px 0;
    border-radius: 8px;
    line-height: 1.5;
}

.user-message {
    background: rgba(52, 152, 219, 0.2);
    border-left: 3px solid #3498db;
}

.ai-message {
    background: rgba(46, 204, 113, 0.2);
    border-left: 3px solid #2ecc71;
}

.loading-message {
    background: rgba(155, 89, 182, 0.2);
    border-left: 3px solid #9b59b6;
    font-style: italic;
    animation: pulse 1.5s infinite;
}

.error-message {
    background: rgba(231, 76, 60, 0.2);
    border-left: 3px solid #e74c3c;
}

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

.spiritual-response {
    background: rgba(52, 152, 219, 0.1);
    border: 2px solid #3498db;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    min-height: 100px;
}

.spiritual-response h4 {
    color: #3498db;
    margin-bottom: 10px;
}

.spiritual-response p {
    color: #e0e0e0;
    line-height: 1.6;
}

.btn-spiritual {
    background: #3498db;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    margin: 5px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9em;
}

.btn-spiritual:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

.spiritual-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}
