/* نظام التصميم النوار (Film Noir) للعبة المحقق ماهر */

:root {
    --bg-dark: #121214;
    --bg-desk: #2b1f17; /* لون بني خشبي دافئ للمكتب */
    --bg-paper: #f6eedb; /* لون ورق معتق بيج/سيبيا */
    --paper-border: #dfd4b7;
    --accent-gold: #d4a359; /* لون نحاسي/ذهبي كلاسيكي */
    --accent-red: #c93b3b; /* لون أحمر للإثارة والتناقض والاعتراض */
    --accent-blue: #3d7cb9;
    --text-light: #ececf1;
    --text-dark: #2c251e;
    --text-muted: #8e8e9f;
    --glass-bg: rgba(22, 22, 26, 0.85);
    --glass-border: rgba(212, 163, 89, 0.15);
    --shadow-heavy: 0 15px 35px rgba(0, 0, 0, 0.7);
    --shadow-paper: 0 8px 20px rgba(44, 37, 30, 0.15);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-light);
    overflow: hidden;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    user-select: none;
}

/* حاوية اللعبة الرئيسية ذات الأبعاد المحددة للتجاوب */
#game-container {
    width: 100%;
    height: 100vh;
    max-width: 1280px;
    max-height: 800px;
    position: relative;
    background-color: #19191d;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    box-shadow: var(--shadow-heavy);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* شريط المعلومات العلوي */
#game-header {
    height: 60px;
    background: linear-gradient(180deg, #1d1d22 0%, #151518 100%);
    border-bottom: 2px solid var(--accent-gold);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    z-index: 100;
}

.logo-text {
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--accent-gold);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 1px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-left .label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

#reputation-value {
    font-weight: 700;
    color: var(--accent-gold);
    min-width: 30px;
}

.reputation-bar {
    width: 100px;
    height: 6px;
    background-color: #2c2c35;
    border-radius: 3px;
    overflow: hidden;
}

#reputation-fill {
    height: 100%;
    background-color: var(--accent-gold);
    transition: width 0.5s ease-out;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

#game-day {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-light);
    background-color: #25252b;
    padding: 4px 12px;
    border-radius: 15px;
    border: 1px solid var(--glass-border);
}

#mute-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    border-radius: 50%;
    transition: var(--transition-smooth);
}

#mute-btn:hover {
    color: var(--accent-gold);
    background-color: rgba(255, 255, 255, 0.05);
}

#mute-btn svg {
    fill: currentColor;
}

.hidden {
    display: none !important;
}

/* شريط التوجيه التعليمي للمبتدئين */
.tutorial-banner {
    background: linear-gradient(90deg, #d4a359 0%, #b8860b 100%);
    color: #121214;
    padding: 10px 20px;
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    z-index: 150;
    border-bottom: 2px solid #fff;
    animation: tutorialGlow 2s infinite alternate;
}

.tutorial-icon {
    font-size: 1.2rem;
}

@keyframes tutorialGlow {
    0% { background: linear-gradient(90deg, #d4a359 0%, #b8860b 100%); }
    100% { background: linear-gradient(90deg, #e4b46c 0%, #d4a359 100%); }
}

/* الشاشات الرئيسية وإدارتها */
.screen {
    position: absolute;
    top: 60px;
    bottom: 0;
    left: 0;
    right: 0;
    opacity: 0;
    pointer-events: none;
    transform: scale(0.98);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
    display: none;
    overflow: hidden;
}

.screen.active {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
    display: block;
}

/* 1. تصميم شاشة مكتب المحقق */
#screen-desk {
    background: linear-gradient(135deg, #1b130d 0%, #150f0a 100%);
}

.desk-surface {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(180deg, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,0.7) 100%),
        radial-gradient(circle at 75% 20%, rgba(212, 163, 89, 0.15) 0%, transparent 50%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cpath d='M0 0h80v80H0z' fill='%2523261a12'/%3E%3Cpath d='M0 10h80M0 20h80M0 30h80M0 40h80M0 50h80M0 60h80M0 70h80' stroke='%25231e140e' stroke-width='2' opacity='0.3'/%3E%3C/svg%3E");
    background-size: auto, auto, 240px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* المصباح المكتبي والوهج */
.desk-lamp {
    position: absolute;
    top: 0;
    right: 15%;
    width: 120px;
    height: 160px;
    background: radial-gradient(circle at 50% 100%, #ffe9b3 0%, transparent 60%);
    opacity: 0.8;
    pointer-events: none;
    z-index: 10;
}

.lamp-glow {
    position: absolute;
    top: 0;
    right: 5%;
    width: 350px;
    height: 450px;
    background: radial-gradient(circle at 60% 10%, rgba(255, 230, 160, 0.18) 0%, transparent 70%);
    pointer-events: none;
    z-index: 9;
}

/* فنجان القهوة الساخن */
.coffee-cup-container {
    position: absolute;
    bottom: 12%;
    left: 12%;
    cursor: pointer;
    z-index: 15;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: var(--transition-smooth);
}

.coffee-cup-container:hover {
    transform: scale(1.05);
}

.coffee-cup-container:hover .coffee-hint {
    opacity: 1;
}

.coffee-cup {
    width: 70px;
    height: 50px;
    background-color: #dfd8cf;
    border-radius: 0 0 30px 30px;
    position: relative;
    border: 3px solid #bdafa0;
    box-shadow: 0 10px 20px rgba(0,0,0,0.5), inset 0 -5px 10px rgba(0,0,0,0.1);
}

.cup-handle {
    width: 25px;
    height: 30px;
    border: 3px solid #bdafa0;
    border-left: none;
    border-radius: 0 15px 15px 0;
    position: absolute;
    right: -25px;
    top: 8px;
}

.cup-liquid {
    position: absolute;
    top: 3px;
    left: 4px;
    right: 4px;
    height: 10px;
    background-color: #3b2314;
    border-radius: 50%;
    border: 1px solid #231208;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.6);
}

.coffee-steam {
    display: flex;
    gap: 8px;
    margin-bottom: 5px;
}

.coffee-steam span {
    display: block;
    width: 3px;
    height: 18px;
    background-color: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    animation: steam 2.5s infinite;
}

.coffee-steam span:nth-child(1) { animation-delay: 0.2s; }
.coffee-steam span:nth-child(2) { animation-delay: 0.8s; }
.coffee-steam span:nth-child(3) { animation-delay: 0.5s; }

@keyframes steam {
    0% {
        transform: translateY(5px) scaleX(1);
        opacity: 0;
    }
    30% {
        opacity: 0.5;
    }
    50% {
        transform: translateY(-8px) scaleX(1.5) skewX(5deg);
        opacity: 0.3;
    }
    100% {
        transform: translateY(-20px) scaleX(2) skewX(-10deg);
        opacity: 0;
    }
}

.coffee-hint {
    position: absolute;
    bottom: -30px;
    font-size: 0.8rem;
    color: var(--accent-gold);
    opacity: 0;
    transition: var(--transition-smooth);
    background-color: rgba(0,0,0,0.8);
    padding: 2px 8px;
    border-radius: 4px;
    white-space: nowrap;
    pointer-events: none;
    border: 1px solid var(--accent-gold);
}

/* لوحة أرفف القضايا الجانبية */
.desk-case-board {
    position: absolute;
    right: 30px;
    top: 40px;
    width: 260px;
    background: linear-gradient(135deg, #2a1f18 0%, #1c1410 100%);
    border: 2px solid #5a4b37;
    border-radius: 8px;
    padding: 14px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.7), inset 0 0 20px rgba(0,0,0,0.5);
    z-index: 25;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.board-header {
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #5a4b37;
    padding-bottom: 6px;
}

.board-pin {
    font-size: 1.2rem;
}

.board-title {
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--accent-gold);
}

.board-hint {
    font-size: 0.72rem;
    color: #a09075;
    margin-bottom: 2px;
}

.board-cases-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 380px;
    overflow-y: auto;
}

/* كارت القضية القابل للسحب والرمي */
.board-case-card {
    background-color: #2b231b;
    border: 1px solid #4a3b2c;
    border-radius: 6px;
    padding: 10px 12px;
    cursor: grab;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
    user-select: none;
}

.board-case-card:active {
    cursor: grabbing;
}

.board-case-card:hover {
    border-color: var(--accent-gold);
    background-color: #382c21;
    transform: translateX(-4px);
}

.board-case-card.active-case {
    border-color: var(--accent-gold);
    box-shadow: 0 0 10px rgba(212, 163, 89, 0.3);
    background-color: rgba(212, 163, 89, 0.12);
}

.board-case-card .card-badge {
    font-size: 0.7rem;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 3px;
    align-self: flex-start;
    color: white;
}

.card-badge.tutorial { background-color: #278540; }
.card-badge.normal { background-color: #d4a359; color: #111; }
.card-badge.hard { background-color: #c93b3b; }

.board-case-card .card-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-light);
}

.board-case-card .card-action-hint {
    font-size: 0.7rem;
    color: #a09075;
}

/* تأثير الـ Drop Zone عند حوم القضية فوق المكتب */
.case-file-closed.drag-over {
    border-color: var(--accent-gold) !important;
    box-shadow: 0 0 35px rgba(212, 163, 89, 0.9), 0 0 60px rgba(212, 163, 89, 0.5) !important;
    transform: rotate(0deg) scale(1.08) !important;
}

.drop-hover-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(212, 163, 89, 0.92);
    color: #121214;
    border-radius: 4px 16px 16px 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: bold;
    font-size: 1.1rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease-in-out;
    z-index: 30;
}

.case-file-closed.drag-over .drop-hover-overlay {
    opacity: 1;
}

.drop-icon {
    font-size: 2.5rem;
    animation: bounce 0.6s infinite alternate;
}

@keyframes bounce {
    from { transform: translateY(0); }
    to { transform: translateY(-8px); }
}

/* ملف القضية المغلق */
.case-file-closed {
    width: 260px;
    height: 340px;
    background-color: #af926f;
    border-radius: 4px 16px 16px 4px;
    position: relative;
    cursor: pointer;
    box-shadow: 5px 15px 35px rgba(0,0,0,0.7), -2px 0 5px rgba(0,0,0,0.2);
    border: 1px solid #8f7451;
    transform: rotate(-8deg) translateY(-20px);
    transition: var(--transition-smooth);
    z-index: 12;
}

.case-file-closed::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: rgba(0,0,0,0.15);
}

.case-file-closed:hover {
    transform: rotate(-3deg) translateY(-30px) scale(1.03);
    box-shadow: 8px 25px 45px rgba(0,0,0,0.8);
}

.folder-cover {
    height: 100%;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.folder-seal {
    align-self: flex-start;
    background-color: var(--accent-red);
    color: white;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 6px 14px;
    transform: rotate(-15deg);
    border-radius: 3px;
    border: 2px dashed rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.folder-label {
    background-color: #eae1cd;
    border: 1px solid #cbbb98;
    padding: 15px;
    border-radius: 4px;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.folder-label .label-title {
    font-size: 0.75rem;
    color: #6c5a45;
    text-transform: uppercase;
    font-weight: bold;
}

.folder-label .label-name {
    font-family: 'Courier Prime', 'Cairo', monospace;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-dark);
}

.desk-note {
    position: absolute;
    bottom: 10%;
    right: 8%;
    background-color: #faf5e6;
    border: 1px solid #d2c19e;
    color: var(--text-dark);
    padding: 18px;
    width: 250px;
    transform: rotate(4deg);
    box-shadow: 5px 8px 20px rgba(0,0,0,0.4);
    font-family: 'Courier Prime', 'Cairo', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
}

.desk-note p {
    margin-bottom: 8px;
}

.desk-note p:last-child {
    margin-bottom: 0;
}

/* 2. تصميم شاشة مستعرض أوراق القضية */
.reader-layout {
    display: flex;
    height: 100%;
    background-color: #17171a;
}

.documents-tabs {
    width: 280px;
    background-color: #1f1f25;
    border-left: 1px solid #2d2d35;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.documents-tabs h3 {
    font-size: 1.1rem;
    color: var(--accent-gold);
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 10px;
}

#tabs-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
}

.doc-tab {
    background-color: #292930;
    border: 1px solid #3c3c46;
    padding: 12px 16px;
    border-radius: 6px;
    text-align: right;
    color: var(--text-muted);
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 10px;
}

.doc-tab svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    fill: currentColor;
}

.doc-tab:hover {
    color: var(--text-light);
    border-color: var(--accent-gold);
    background-color: #2e2e37;
}

.doc-tab.active {
    color: var(--text-dark);
    background-color: var(--accent-gold);
    border-color: var(--accent-gold);
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(212, 163, 89, 0.25);
}

.document-content-area {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    background: 
        radial-gradient(circle at 50% 50%, rgba(20, 20, 20, 0.8) 0%, rgba(10, 10, 10, 0.95) 100%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cpath d='M0 0h100v100H0z' fill='%25230c0c0e'/%3E%3C/svg%3E");
}

.paper-document {
    width: 100%;
    max-width: 600px;
    background-color: var(--bg-paper);
    color: var(--text-dark);
    padding: 40px;
    border-radius: 2px;
    box-shadow: var(--shadow-paper), 0 1px 2px rgba(0,0,0,0.1);
    border: 1px solid var(--paper-border);
    position: relative;
    line-height: 1.7;
    font-size: 1rem;
    min-height: 600px;
    transform: rotate(0.5deg);
}

.paper-document::before {
    content: '';
    position: absolute;
    top: 0; right: 0;
    border-width: 0 24px 24px 0;
    border-style: solid;
    border-color: #121214 #121214 #ded2b2 #ded2b2;
    display: block;
    width: 0;
}

.paper-document h2 {
    font-family: 'Courier Prime', 'Cairo', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 25px;
    border-bottom: 2px solid #5a4b37;
    padding-bottom: 10px;
    color: #433727;
}

.paper-document p {
    margin-bottom: 18px;
}

.document-meta-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 25px;
    font-family: 'Courier Prime', 'Cairo', monospace;
    font-size: 0.95rem;
}

.document-meta-table td {
    padding: 6px 12px;
    border: 1px solid #d2c5a2;
}

.document-meta-table td.label-cell {
    font-weight: bold;
    background-color: #eae1c7;
    width: 30%;
}

.clue-image-container {
    width: 100%;
    margin: 22px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: zoom-in;
    overflow: hidden;
    position: relative;
    border-radius: 6px;
    background-color: transparent;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.25);
}

.clue-image-container img, .clue-image-container svg {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 6px;
    transition: var(--transition-smooth);
}

.clue-image-container:hover img, .clue-image-container:hover svg {
    transform: scale(1.015);
}

.zoom-hint-badge {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background-color: rgba(0,0,0,0.7);
    color: white;
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 4px;
    pointer-events: none;
    direction: ltr;
}

.action-btn {
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition-smooth);
    width: 100%;
}

.primary-btn {
    background-color: var(--accent-gold);
    color: var(--bg-dark);
}

.primary-btn:hover {
    background-color: #e4b46c;
    box-shadow: 0 4px 15px rgba(212, 163, 89, 0.4);
}

.secondary-btn {
    background-color: #292930;
    color: var(--text-light);
    border: 1px solid #3c3c46;
}

.secondary-btn:hover {
    background-color: #383842;
    border-color: var(--accent-gold);
}

.danger-btn {
    background-color: var(--accent-red);
    color: white;
}

.danger-btn:hover {
    background-color: #e24b4b;
    box-shadow: 0 4px 15px rgba(201, 59, 59, 0.4);
}

.large-btn {
    padding: 16px 28px;
    font-size: 1.1rem;
}

/* 3. تصميم شاشة الاستجواب */
.interrogation-layout {
    display: flex;
    height: 100%;
}

.suspects-list-area {
    width: 280px;
    background-color: #1f1f25;
    border-left: 1px solid #2d2d35;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.suspects-list-area h3 {
    font-size: 1.1rem;
    color: var(--accent-gold);
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 10px;
}

#suspects-thumbnails {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
}

.suspect-thumb {
    background-color: #292930;
    border: 1px solid #3c3c46;
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: var(--transition-smooth);
}

.suspect-thumb:hover {
    border-color: var(--accent-gold);
    background-color: #2e2e37;
}

.suspect-thumb.active {
    border-color: var(--accent-gold);
    background-color: rgba(214, 163, 89, 0.1);
}

.suspect-thumb-portrait {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #1a1a1f;
    border: 1px solid var(--glass-border);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.suspect-thumb-portrait svg {
    width: 100%;
    height: 100%;
}

.suspect-thumb-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.suspect-thumb-info .name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-light);
}

.suspect-thumb-info .desc {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.interrogation-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-top: 1px solid var(--glass-border);
    padding-top: 15px;
}

.interrogation-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: radial-gradient(circle at 50% 30%, #202026 0%, #111113 100%);
    position: relative;
}

.suspect-stage {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

#suspect-portrait-container {
    width: 240px;
    height: 240px;
    border-radius: 12px;
    background-color: rgba(0, 0, 0, 0.3);
    border: 2px solid var(--glass-border);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    transition: var(--transition-smooth);
}

#suspect-portrait-container svg {
    width: 100%;
    height: 100%;
}

.suspect-details {
    text-align: center;
}

.suspect-details h2 {
    color: var(--accent-gold);
    font-size: 1.5rem;
    font-weight: 700;
}

.suspect-details span {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* صندوق الحوار في شاشة الاستجواب */
.dialogue-box {
    background-color: var(--glass-bg);
    border-top: 3px solid var(--accent-gold);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    box-shadow: 0 -10px 30px rgba(0,0,0,0.5);
}

.dialogue-text-container {
    min-height: 60px;
    background-color: rgba(0,0,0,0.2);
    border-radius: 6px;
    padding: 15px;
    border-right: 3px solid var(--accent-gold);
}

#dialogue-text {
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--text-light);
}

.dialogue-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

#dialogue-choices {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.choice-btn {
    background-color: #202026;
    border: 1px solid #3c3c46;
    color: var(--text-light);
    padding: 10px 15px;
    border-radius: 6px;
    text-align: right;
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition-smooth);
}

.choice-btn:hover {
    border-color: var(--accent-gold);
    background-color: #272730;
}

/* زر المواجهة بالتناقض النبّاض */
.confront-btn {
    background-color: var(--accent-red);
    color: white;
    border: none;
    padding: 15px 25px;
    font-size: 1.05rem;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    overflow: visible;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(201, 59, 59, 0.4);
}

.confront-btn:hover {
    background-color: #e24b4b;
    transform: scale(1.02);
}

.confront-pulse {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 6px;
    border: 2px solid var(--accent-red);
    animation: confrontPulse 1.8s infinite;
    pointer-events: none;
}

@keyframes confrontPulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    100% {
        transform: scale(1.25, 1.4);
        opacity: 0;
    }
}

/* بطاقة تقرير التقييم النفسي للمحقق ماهر (تظهر فقط عند تهور القناص) */
.psych-report-card {
    background: linear-gradient(135deg, #2b1414 0%, #170a0a 100%);
    border: 1.5px dashed #c93b3b;
    border-radius: 8px;
    padding: 16px 20px;
    margin: 15px 0;
    text-align: right;
    box-shadow: 0 4px 15px rgba(201, 59, 59, 0.25);
    animation: pulseWarning 2s infinite alternate;
}

.psych-header {
    font-size: 0.92rem;
    font-weight: 700;
    color: #ff6b6b;
    border-bottom: 1px solid #4a2020;
    padding-bottom: 6px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

#psych-report-text {
    font-size: 0.9rem;
    color: #ffeded;
    line-height: 1.6;
    font-family: 'Cairo', sans-serif;
}

/* 4. لوحة الاتهام والقرار */
.decision-board {
    max-width: 800px;
    margin: 40px auto;
    background-color: var(--glass-bg);
    border: 2px solid var(--accent-gold);
    border-radius: 8px;
    padding: 30px;
    box-shadow: var(--shadow-heavy);
    display: flex;
    flex-direction: column;
    gap: 25px;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
}

.board-header {
    text-align: center;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 15px;
}

.board-header h2 {
    color: var(--accent-gold);
    font-size: 1.6rem;
    font-weight: 700;
}

.board-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.decision-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.decision-section h3 {
    font-size: 1.1rem;
    color: var(--accent-gold);
    border-right: 3px solid var(--accent-gold);
    padding-right: 8px;
}

.grid-selection {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.select-card {
    background-color: #202026;
    border: 1px solid #3c3c46;
    border-radius: 6px;
    padding: 15px;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 12px;
}

.select-card:hover {
    border-color: var(--accent-gold);
    background-color: #25252f;
}

.select-card.selected {
    border-color: var(--accent-gold);
    background-color: rgba(214, 163, 89, 0.12);
    box-shadow: inset 0 0 10px rgba(214, 163, 89, 0.2);
}

.select-card-icon {
    width: 40px;
    height: 40px;
    background-color: #16161c;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--accent-gold);
}

.select-card-icon svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.select-card-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.select-card-info .title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-light);
}

.select-card-info .subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.board-footer {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    border-top: 1px solid var(--glass-border);
    padding-top: 20px;
}

/* 5. شاشة النتيجة والتقارير */
#screen-result {
    background: radial-gradient(circle at 50% 50%, #1b1511 0%, #0d0d0e 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.result-card {
    background-color: #f7f3e8;
    color: var(--text-dark);
    border: 2px solid #5a4b37;
    border-radius: 4px;
    width: 100%;
    max-width: 550px;
    padding: 40px;
    box-shadow: var(--shadow-heavy);
    position: relative;
    transform: rotate(-1deg);
    border-top: 15px solid #5a4b37;
}

.result-stamp {
    position: absolute;
    top: 25px;
    left: 30px;
    border: 4px solid var(--accent-red);
    color: var(--accent-red);
    font-weight: 900;
    font-size: 1.8rem;
    padding: 5px 20px;
    text-transform: uppercase;
    transform: rotate(-20deg);
    border-radius: 8px;
    opacity: 0.85;
    text-shadow: 0 0 2px rgba(201, 59, 59, 0.2);
    font-family: 'Courier Prime', monospace;
    letter-spacing: 2px;
}

.result-card.success-theme .result-stamp {
    border-color: #278540;
    color: #278540;
}

.result-card h2 {
    font-family: 'Courier Prime', 'Cairo', monospace;
    font-size: 1.6rem;
    color: #3b2c1b;
    margin-bottom: 20px;
    margin-top: 15px;
    border-bottom: 1px dashed #c0b49b;
    padding-bottom: 10px;
}

.result-details {
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 25px;
    color: #4b3d2b;
}

.reputation-change-display {
    background-color: #eae1cd;
    border-radius: 4px;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 30px;
    border: 1px solid #d2c5a2;
}

#reputation-diff {
    color: var(--accent-red);
    font-size: 1.25rem;
}

.result-card.success-theme #reputation-diff {
    color: #278540;
}

.result-actions {
    display: flex;
    gap: 15px;
}

/* النوافذ المنبثقة (Modals) */
.modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(0,0,0,0.85);
    z-index: 200;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-smooth);
}

.modal.active {
    opacity: 1;
    pointer-events: auto;
}

/* نافذة مواجهة الرهينة الدرامية (Hostage Standoff Modal) */
.standoff-modal-theme {
    background-color: rgba(10, 5, 5, 0.95);
    z-index: 500;
}

.standoff-container {
    background: linear-gradient(135deg, #1f1412 0%, #100b0a 100%);
    border: 2px solid #c93b3b;
    box-shadow: 0 0 50px rgba(201, 59, 59, 0.5), inset 0 0 30px rgba(0,0,0,0.8);
    border-radius: 8px;
    padding: 30px;
    max-width: 780px;
    width: 90%;
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
    animation: pulseWarning 2s infinite alternate;
}

@keyframes pulseWarning {
    from { border-color: #c93b3b; box-shadow: 0 0 30px rgba(201, 59, 59, 0.4); }
    to { border-color: #ff4d4d; box-shadow: 0 0 60px rgba(255, 77, 77, 0.8); }
}

.warning-badge {
    background-color: #c93b3b;
    color: white;
    font-weight: 700;
    font-size: 1.05rem;
    padding: 8px 18px;
    border-radius: 4px;
    display: inline-block;
    letter-spacing: 0.5px;
    animation: blinkGlow 1s infinite alternate;
}

@keyframes blinkGlow {
    from { opacity: 0.85; }
    to { opacity: 1; filter: drop-shadow(0 0 8px #ff4d4d); }
}

.standoff-stage {
    display: flex;
    align-items: center;
    gap: 20px;
    background-color: rgba(0,0,0,0.4);
    padding: 20px;
    border-radius: 6px;
    border: 1px solid #4a2828;
}

.killer-standoff-portrait {
    width: 140px;
    height: 140px;
    flex-shrink: 0;
    filter: drop-shadow(0 0 15px rgba(201, 59, 59, 0.6));
}

.standoff-speech-bubble {
    background-color: #2b1a18;
    border: 1.5px solid #d4a359;
    border-radius: 8px;
    padding: 18px;
    position: relative;
    flex-grow: 1;
}

.standoff-speech-bubble p {
    font-family: 'Cairo', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffeded;
    line-height: 1.6;
}

.negotiation-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.negotiate-btn {
    background: linear-gradient(135deg, #2c251e 0%, #1f1914 100%);
    border: 1px solid #7a6345;
    color: var(--text-light);
    padding: 14px 20px;
    border-radius: 6px;
    font-family: 'Cairo', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    text-align: right;
    transition: var(--transition-smooth);
}

.negotiate-btn:hover {
    border-color: var(--accent-gold);
    background-color: #3d3126;
    transform: translateX(-4px);
    box-shadow: 0 4px 15px rgba(212, 163, 89, 0.3);
}

/* هاتف القناص التكتيكي المنبثق من الجانب */
.tactical-phone {
    position: fixed;
    left: -350px;
    bottom: 40px;
    width: 310px;
    background: linear-gradient(145deg, #1c222e 0%, #0d1117 100%);
    border: 3px solid #7ab8d4;
    border-radius: 28px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.95), 0 0 35px rgba(122, 184, 212, 0.4);
    z-index: 2000;
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    padding: 16px;
}

.tactical-phone.active {
    transform: translateX(380px);
    animation: phoneRingVibrate 1.2s infinite ease-in-out;
}

@keyframes phoneRingVibrate {
    0% { transform: translateX(380px) translateY(0); }
    15% { transform: translateX(382px) translateY(-2px) rotate(0.8deg); }
    30% { transform: translateX(378px) translateY(2px) rotate(-0.8deg); }
    45% { transform: translateX(382px) translateY(-1px) rotate(0.5deg); }
    60% { transform: translateX(380px) translateY(0); }
    100% { transform: translateX(380px) translateY(0); }
}

.standoff-svg-anim {
    animation: standoffPulse 1.5s infinite alternate;
}

@keyframes standoffPulse {
    from { transform: scale(1); filter: drop-shadow(0 0 10px rgba(201, 59, 59, 0.5)); }
    to { transform: scale(1.02); filter: drop-shadow(0 0 25px rgba(255, 77, 77, 0.9)); }
}

.phone-screen {
    background-color: #090c10;
    border-radius: 10px;
    padding: 12px;
    border: 1px solid #1e2940;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.phone-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: #7ab8d4;
    font-weight: bold;
    border-bottom: 1px solid #1e2940;
    padding-bottom: 6px;
}

.signal-dot {
    animation: blinkGlow 0.8s infinite alternate;
}

.sniper-scope-preview {
    height: 100px;
    background-color: #051008;
    border: 1px solid #278540;
    border-radius: 6px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.scope-crosshair {
    width: 60px;
    height: 60px;
    border: 1.5px stroke #ff4d4d;
    border-radius: 50%;
    position: relative;
    border: 1.5px solid #ff4d4d;
    box-shadow: 0 0 10px rgba(255, 77, 77, 0.6);
}

.scope-crosshair::before {
    content: '';
    position: absolute;
    top: 50%; left: -10px; right: -10px; height: 1px;
    background-color: #ff4d4d;
}

.scope-crosshair::after {
    content: '';
    position: absolute;
    left: 50%; top: -10px; bottom: -10px; width: 1px;
    background-color: #ff4d4d;
}

.target-locked-text {
    position: absolute;
    bottom: 6px;
    font-size: 0.65rem;
    color: #ff4d4d;
    font-weight: bold;
    letter-spacing: 1px;
}

.phone-status {
    font-size: 0.82rem;
    color: #c0d0e0;
    line-height: 1.4;
}

.sniper-fire-btn {
    background: linear-gradient(135deg, #c93b3b 0%, #992222 100%);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 6px;
    font-family: 'Cairo', sans-serif;
    font-weight: bold;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(201, 59, 59, 0.5);
    transition: var(--transition-smooth);
}

.sniper-fire-btn:hover {
    background: linear-gradient(135deg, #ff4d4d 0%, #c93b3b 100%);
    transform: scale(1.03);
    box-shadow: 0 6px 20px rgba(255, 77, 77, 0.8);
}

.close-modal {
    position: absolute;
    top: 15px;
    left: 20px;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-dark);
    font-weight: bold;
    transition: var(--transition-smooth);
}

.close-modal:hover {
    color: var(--accent-red);
}

#zoom-content-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

#zoom-content-container p {
    font-size: 1.1rem;
    line-height: 1.7;
    text-align: right;
    width: 100%;
}

#zoom-content-container svg {
    width: 100%;
    max-width: 620px;
    height: auto;
    max-height: 480px;
    border: 1px solid var(--paper-border);
    background-color: transparent;
    border-radius: 6px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.4);
}

/* مفكرة الأدلة (Evidence Notebook) */
.notebook-content {
    background-color: #202026;
    color: var(--text-light);
    border: 2px solid var(--accent-gold);
    border-radius: 8px;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    max-height: 80%;
    overflow-y: auto;
    position: relative;
}

.notebook-content .close-modal {
    color: var(--text-light);
}

.notebook-content h3 {
    margin-bottom: 20px;
    color: var(--accent-gold);
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 10px;
}

#notebook-evidence-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.notebook-item {
    background-color: #2a2a33;
    border: 1px solid #3c3c46;
    border-radius: 6px;
    padding: 12px 16px;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 12px;
}

.notebook-item:hover {
    border-color: var(--accent-gold);
    background-color: #31313c;
}

.notebook-item-icon {
    width: 40px;
    height: 40px;
    background-color: #1a1a20;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-gold);
    flex-shrink: 0;
}

.notebook-item-icon svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.notebook-item-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.notebook-item-text .title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-light);
}

.notebook-item-text .desc {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* شاشة الوميض والاعتراض (Objection Flash Overlay) */
.objection-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(201, 59, 59, 0.9);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease-out;
}

.objection-overlay.active {
    opacity: 1;
    animation: objectionShake 0.4s ease-in-out;
}

.objection-text {
    font-size: 6rem;
    font-weight: 900;
    color: white;
    text-shadow: 0 5px 15px rgba(0,0,0,0.8), 0 0 30px #ffe596;
    letter-spacing: 5px;
    transform: scale(0.5);
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.objection-overlay.active .objection-text {
    transform: scale(1.2) rotate(-5deg);
}

@keyframes objectionShake {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    10% { transform: translate(-8px, -5px) rotate(-1deg); }
    30% { transform: translate(10px, 8px) rotate(1deg); }
    50% { transform: translate(-10px, 5px) rotate(-2deg); }
    70% { transform: translate(8px, -8px) rotate(2deg); }
    90% { transform: translate(-5px, 8px) rotate(-1deg); }
}

/* تخصيصات إضافية وتجاوب الهواتف المحمولة */
@media (max-width: 768px) {
    #game-container {
        height: 100vh;
        max-height: none;
        border-radius: 0;
        border: none;
    }
    
    .reader-layout {
        flex-direction: column;
    }

    .documents-tabs {
        width: 100%;
        height: auto;
        max-height: 200px;
    }

    .interrogation-layout {
        flex-direction: column;
    }

    .suspects-list-area {
        width: 100%;
        height: auto;
        max-height: 150px;
    }
    
    #dialogue-choices {
        grid-template-columns: 1fr;
    }
}
