/* Video Game Interface Styles */

.game-container {
    width: 100vw;
    height: 100vh;
    position: relative;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    overflow: hidden;
    font-family: 'Arial', sans-serif;
}

.ui-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 100;
    display: flex;
    flex-direction: column;
}



.ui-side {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 300px;
    background: rgba(0, 0, 0, 0.9);
    padding: 20px;
    pointer-events: auto;
    border-left: 2px solid #3498db;
    overflow-y: auto;
}

.game-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #3498db;
}

.game-header h1 {
    margin: 0 0 8px 0;
    font-size: 1.6em;
    color: #3498db;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.game-header .puzzle-name {
    margin: 0;
    font-size: 1.1em;
    color: #ecf0f1;
    font-weight: normal;
}

.instructions {
    background: rgba(52, 152, 219, 0.1);
    border: 1px solid #3498db;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    color: white;
}

.instructions h3 {
    margin: 0 0 10px 0;
    font-size: 1.1em;
    color: #3498db;
}

.instructions p {
    margin: 0;
    font-size: 0.9em;
    line-height: 1.4;
    color: #ecf0f1;
}

.npc-list {
    margin-bottom: 20px;
}

.npc-item {
    background: rgba(52, 152, 219, 0.1);
    border: 1px solid #3498db;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
    color: white;
    font-size: 0.9em;
}

.npc-item.unknown {
    border-color: #95a5a6;
    background: rgba(149, 165, 166, 0.1);
}

.npc-item.truth-teller {
    border-color: #0066cc;
    background: rgba(0, 102, 204, 0.2);
}

.npc-item.mimic {
    border-color: #e74c3c;
    background: rgba(231, 76, 60, 0.2);
}

.npc-item .npc-name {
    font-weight: bold;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.npc-item .npc-status {
    font-size: 0.8em;
    opacity: 0.8;
}

.game-world {
    position: absolute;
    top: 0;
    left: 0;
    right: 300px;
    bottom: 0;
    z-index: 1;
}

#game-canvas {
    display: block;
    width: 100%;
    height: 100%;
    background: #2ecc71;
    background-image: 
        radial-gradient(circle at 20% 20%, #27ae60 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, #27ae60 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, #229954 0%, transparent 50%);
}

.dialog-box {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.95);
    border: 3px solid #3498db;
    border-radius: 15px;
    padding: 20px;
    max-width: 600px;
    width: 90%;
    color: white;
    z-index: 200;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.dialog-content {
    text-align: center;
}

.dialog-character {
    font-size: 3em;
    margin-bottom: 10px;
}

.dialog-text {
    font-size: 1.1em;
    line-height: 1.4;
    margin-bottom: 20px;
    color: #ecf0f1;
}

.dialog-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.controls {
    margin-bottom: 20px;
}

.controls .btn {
    width: 100%;
    margin-bottom: 8px;
    padding: 12px;
    font-size: 0.9em;
}

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

.btn:hover {
    background: #2980b9;
    transform: translateY(-1px);
}

.btn-primary {
    background: #e74c3c;
}

.btn-primary:hover {
    background: #c0392b;
}

.btn-secondary {
    background: #95a5a6;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-small {
    padding: 8px 12px;
    font-size: 0.8em;
}

.feedback {
    background: rgba(52, 152, 219, 0.2);
    border: 1px solid #3498db;
    border-radius: 8px;
    padding: 15px;
    color: white;
    font-weight: 600;
    text-align: center;
}

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

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

.feedback.hidden {
    display: none;
}

/* Animation for player and NPCs */
.sprite {
    transition: all 0.1s ease;
}

/* Success Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: linear-gradient(145deg, #2c3e50 0%, #34495e 100%);
    border: 3px solid #3498db;
    border-radius: 20px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideIn 0.4s ease;
}

.modal-header h2 {
    color: #3498db;
    font-size: 2.2em;
    margin: 0 0 20px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.modal-body p {
    color: #ecf0f1;
    font-size: 1.1em;
    line-height: 1.5;
    margin-bottom: 20px;
}

.quest-progress {
    background: rgba(52, 152, 219, 0.2);
    border: 1px solid #3498db;
    border-radius: 10px;
    padding: 15px;
    margin: 20px 0;
    color: #3498db;
    font-weight: bold;
    font-size: 1.1em;
}

.modal-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 25px;
}

.modal-actions .btn {
    padding: 12px 25px;
    font-size: 1em;
    min-width: 120px;
}

/* Error Modal Styling */
.error-modal {
    border-color: #e74c3c;
}

.error-modal .modal-header h2 {
    color: #e74c3c;
}

.error-modal .quest-progress {
    background: rgba(231, 76, 60, 0.2);
    border-color: #e74c3c;
    color: #e74c3c;
}

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

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

/* Responsive adjustments */
@media (max-width: 1024px) {
    .ui-side {
        width: 280px;
    }
    
    .game-world {
        right: 280px;
    }
}

@media (max-width: 768px) {
    .ui-side {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: auto;
        height: 250px;
        border-left: none;
        border-top: 2px solid #3498db;
        padding: 15px;
    }
    
    .game-header h1 {
        font-size: 1.4em;
    }
    
    .dialog-box {
        bottom: 270px;
    }
    
    .game-world {
        right: 0;
        bottom: 250px;
    }
}