/* Case Page Specific Styles */
.case-page {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary-dark) 100%);
}

/* Case Header */
.case-header {
    background-color: rgba(26, 31, 58, 0.9);
    padding: 3rem 0;
    text-align: center;
    border-bottom: 3px solid var(--accent-gold);
    margin-bottom: 2rem;
}

.case-badge {
    display: inline-block;
    background-color: var(--danger-red);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.case-main-title {
    font-family: 'Special Elite', monospace;
    font-size: 3rem;
    color: var(--accent-gold);
    margin-bottom: 1rem;
}

.case-meta {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    color: var(--text-dim);
}

.case-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.case-meta i {
    color: var(--accent-gold);
}

/* Investigation Tools */
.investigation-tools {
    padding: 2rem 0;
    background-color: rgba(0, 0, 0, 0.3);
    margin-bottom: 3rem;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.tool-card {
    background-color: var(--secondary-dark);
    border: 2px solid var(--accent-gold);
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
}

.tool-card i {
    font-size: 2rem;
    color: var(--accent-gold);
    margin-bottom: 0.5rem;
}

.tool-card span {
    display: block;
    color: var(--text-dim);
    margin-bottom: 1rem;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.timer {
    font-family: 'Special Elite', monospace;
    font-size: 2rem;
    color: var(--accent-gold);
    margin-bottom: 1rem;
}

.hints-count {
    font-family: 'Special Elite', monospace;
    font-size: 2rem;
    color: var(--accent-gold);
    margin-bottom: 1rem;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-gold), #ffd700);
    transition: width 0.3s ease;
    width: 0;
}

.progress-percent {
    font-size: 1.5rem;
    color: var(--accent-gold);
    font-weight: bold;
}

.tool-btn {
    padding: 0.75rem 1.5rem;
    background-color: var(--accent-gold);
    color: var(--primary-dark);
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.tool-btn:hover {
    background-color: #c49b2d;
    transform: scale(1.05);
}

.tool-btn:disabled {
    background-color: var(--text-dim);
    cursor: not-allowed;
}

/* Case Sections */
.case-section {
    padding: 3rem 0;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--accent-gold);
}

.section-header i {
    font-size: 2rem;
    color: var(--accent-gold);
}

.section-header h2 {
    font-family: 'Special Elite', monospace;
    font-size: 2rem;
    color: var(--text-light);
}

/* Case Brief */
.case-brief {
    background-color: rgba(26, 31, 58, 0.7);
    border: 2px solid var(--accent-gold);
    border-radius: 10px;
    padding: 2rem;
    font-family: 'Courier New', monospace;
    line-height: 1.8;
}

.brief-content h3 {
    color: var(--accent-gold);
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.brief-content h3:first-child {
    margin-top: 0;
}

.brief-content p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

/* Evidence Grid */
.evidence-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
}

.evidence-item {
    background-color: var(--secondary-dark);
    border: 2px solid var(--accent-gold);
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s;
}

.evidence-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(212, 175, 55, 0.3);
}

.evidence-icon {
    font-size: 3rem;
    color: var(--accent-gold);
    margin-bottom: 1rem;
}

.evidence-item h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

.evidence-item p {
    color: var(--text-dim);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.evidence-btn {
    padding: 0.75rem 1.5rem;
    background-color: var(--accent-gold);
    color: var(--primary-dark);
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.evidence-btn:hover {
    background-color: #c49b2d;
    transform: scale(1.05);
}

/* Documents Grid */
.documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.document-item {
    background-color: var(--secondary-dark);
    border: 2px solid var(--accent-gold);
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s;
}

.document-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(212, 175, 55, 0.3);
}

.document-icon {
    font-size: 3rem;
    color: var(--accent-gold);
    margin-bottom: 1rem;
}

.document-item h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

.document-item p {
    color: var(--text-dim);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.document-btn {
    padding: 0.75rem 1.5rem;
    background-color: var(--accent-gold);
    color: var(--primary-dark);
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.document-btn:hover {
    background-color: #c49b2d;
    transform: scale(1.05);
}

/* Witnesses Grid */
.witnesses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
}

.witness-card {
    background-color: var(--secondary-dark);
    border: 2px solid var(--accent-gold);
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s;
}

.witness-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(212, 175, 55, 0.3);
}

.witness-photo {
    width: 100px;
    height: 100px;
    margin: 0 auto 1rem;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.witness-photo i {
    font-size: 3rem;
    color: var(--accent-gold);
}

.witness-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

.witness-role {
    color: var(--text-dim);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.witness-btn {
    padding: 0.75rem 1.5rem;
    background-color: var(--accent-gold);
    color: var(--primary-dark);
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.witness-btn:hover {
    background-color: #c49b2d;
    transform: scale(1.05);
}

/* Suspects Grid */
.suspects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.suspect-card {
    background-color: var(--secondary-dark);
    border: 2px solid var(--danger-red);
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s;
}

.suspect-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(220, 53, 69, 0.3);
}

.suspect-photo {
    width: 120px;
    height: 120px;
    margin: 0 auto 1rem;
    background-color: rgba(220, 53, 69, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--danger-red);
}

.suspect-photo i {
    font-size: 4rem;
    color: var(--danger-red);
}

.suspect-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

.suspect-role {
    color: var(--accent-gold);
    margin-bottom: 1rem;
    font-size: 1rem;
    font-weight: 600;
}

.suspect-info {
    text-align: left;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 5px;
}

.suspect-info p {
    color: var(--text-dim);
    margin-bottom: 0.5rem;
}

.suspect-info strong {
    color: var(--text-light);
}

.suspect-btn {
    padding: 0.75rem 1.5rem;
    background-color: var(--danger-red);
    color: white;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.suspect-btn:hover {
    background-color: #c82333;
    transform: scale(1.05);
}

/* Evidence Board */
.evidence-board {
    background-color: rgba(26, 31, 58, 0.7);
    border: 2px solid var(--accent-gold);
    border-radius: 10px;
    padding: 2rem;
    min-height: 300px;
}

.board-instruction {
    text-align: center;
    color: var(--text-dim);
    margin-bottom: 1rem;
}

.board-area {
    min-height: 200px;
    border: 2px dashed var(--accent-gold);
    border-radius: 5px;
    padding: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.board-item {
    background-color: var(--secondary-dark);
    border: 2px solid var(--accent-gold);
    padding: 1rem;
    border-radius: 5px;
    cursor: move;
}

/* Solution Section */
.solution-form {
    max-width: 800px;
    margin: 0 auto;
    background-color: rgba(26, 31, 58, 0.7);
    border: 2px solid var(--accent-gold);
    border-radius: 10px;
    padding: 2rem;
}

.solution-form > p {
    text-align: center;
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: var(--text-light);
}

.radio-group {
    margin-bottom: 2rem;
}

.radio-option {
    display: block;
    padding: 1rem;
    background-color: var(--secondary-dark);
    border: 2px solid var(--accent-gold);
    border-radius: 5px;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.radio-option:hover {
    background-color: rgba(212, 175, 55, 0.1);
}

.radio-option input[type="radio"] {
    margin-right: 1rem;
}

.radio-option span {
    font-size: 1.1rem;
    color: var(--text-light);
}

#reasoning {
    width: 100%;
    padding: 1rem;
    background-color: var(--secondary-dark);
    border: 2px solid var(--accent-gold);
    border-radius: 5px;
    color: var(--text-light);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    resize: vertical;
    margin-bottom: 1.5rem;
}

.submit-btn {
    width: 100%;
    padding: 1rem;
    background-color: var(--accent-gold);
    color: var(--primary-dark);
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

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

.solution-result {
    margin-top: 2rem;
    padding: 1.5rem;
    border-radius: 5px;
    text-align: center;
    font-size: 1.1rem;
    display: none;
}

.solution-result.correct {
    background-color: var(--success-green);
    color: white;
    display: block;
}

.solution-result.incorrect {
    background-color: var(--danger-red);
    color: white;
    display: block;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    overflow-y: auto;
}

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

.modal-content {
    background-color: var(--secondary-dark);
    border: 3px solid var(--accent-gold);
    border-radius: 10px;
    padding: 2rem;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    color: var(--accent-gold);
    cursor: pointer;
    background: none;
    border: none;
    transition: color 0.3s;
}

.modal-close:hover {
    color: #c49b2d;
}

.modal-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--accent-gold);
}

.modal-header h2 {
    font-family: 'Special Elite', monospace;
    color: var(--accent-gold);
    font-size: 1.8rem;
}

.modal-body {
    color: var(--text-light);
    line-height: 1.8;
}

.modal-body p {
    margin-bottom: 1rem;
}

.modal-body img {
    width: 100%;
    height: auto;
    border-radius: 5px;
    margin: 1rem 0;
}

/* Hint Display */
.hint-display {
    background-color: rgba(212, 175, 55, 0.1);
    border: 2px solid var(--accent-gold);
    border-radius: 10px;
    padding: 1.5rem;
    margin: 2rem auto;
    max-width: 600px;
    text-align: center;
}

.hint-display h3 {
    color: var(--accent-gold);
    margin-bottom: 1rem;
}

.hint-display p {
    color: var(--text-light);
    line-height: 1.6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .case-main-title {
        font-size: 2rem;
    }

    .case-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .tools-grid {
        grid-template-columns: 1fr;
    }

    .evidence-grid,
    .documents-grid,
    .witnesses-grid,
    .suspects-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        padding: 1rem;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }
}

/* ============================================
   AUTH GATE - Sign-in Required
   ============================================ */

.auth-gate {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.auth-gate-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(10, 14, 39, 0.98) 0%, rgba(26, 31, 58, 0.98) 100%);
    backdrop-filter: blur(10px);
}

.auth-gate-content {
    position: relative;
    z-index: 100000;
    max-width: 500px;
    width: 100%;
    background: rgba(26, 31, 58, 0.95);
    border: 2px solid var(--accent-gold);
    border-radius: 15px;
    padding: 3rem;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    animation: gateSlideIn 0.5s ease-out;
}

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

.auth-gate-icon {
    font-size: 4rem;
    color: var(--accent-gold);
    margin-bottom: 1.5rem;
    animation: lockPulse 2s ease-in-out infinite;
}

@keyframes lockPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.auth-gate-content h2 {
    font-family: 'Special Elite', cursive;
    font-size: 2rem;
    color: var(--accent-gold);
    margin-bottom: 1rem;
}

.auth-gate-content > p {
    color: var(--text-dim);
    font-size: 1.1rem;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.auth-gate-benefits {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 1.5rem;
    margin: 2rem 0;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.auth-gate-benefits ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

.auth-gate-benefits li {
    color: var(--text-light);
    padding: 0.75rem 0;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.95rem;
}

.auth-gate-benefits li i {
    color: var(--accent-gold);
    font-size: 1.2rem;
    flex-shrink: 0;
}

.auth-gate-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 2rem 0;
}

.auth-gate-btn {
    padding: 1rem 2rem;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.auth-gate-btn.primary {
    background: linear-gradient(135deg, var(--accent-gold) 0%, #c99f3a 100%);
    color: var(--primary-dark);
    border: none;
}

.auth-gate-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.5);
}

.auth-gate-btn.secondary {
    background: transparent;
    color: var(--text-dim);
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.auth-gate-btn.secondary:hover {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}

.auth-gate-note {
    color: var(--text-dim);
    font-size: 0.9rem;
    margin-top: 1rem;
}

.auth-gate-note a {
    color: var(--accent-gold);
    text-decoration: none;
    font-weight: 600;
}

.auth-gate-note a:hover {
    text-decoration: underline;
}

/* Auth Gate Mobile Responsive */
@media (max-width: 768px) {
    .auth-gate-content {
        padding: 2rem 1.5rem;
    }
    
    .auth-gate-icon {
        font-size: 3rem;
    }
    
    .auth-gate-content h2 {
        font-size: 1.5rem;
    }
    
    .auth-gate-benefits li {
        font-size: 0.9rem;
    }
}
