@import url('https://fonts.googleapis.com/css2?family=VT323&display=swap');

/* Global Animations */
@keyframes glow-pulse {

    0%,
    100% {
        text-shadow: 0 0 5px #00FF41, 0 0 10px #00FF41, 0 0 15px #00FF41;
    }

    50% {
        text-shadow: 0 0 8px #00FF41, 0 0 15px #00FF41, 0 0 25px #00FF41, 0 0 35px #00FF41;
    }
}

@keyframes background-scan {
    0% {
        background-position: 0% 0%;
    }

    100% {
        background-position: 100% 100%;
    }
}

@keyframes border-glow {

    0%,
    100% {
        border-color: #00FF41;
        box-shadow: 0 0 20px #00FF41, inset 0 0 15px rgba(0, 255, 65, 0.4);
    }

    50% {
        border-color: #40FF71;
        box-shadow: 0 0 30px #00FF41, 0 0 50px #00FF41, inset 0 0 25px rgba(0, 255, 65, 0.6);
    }
}

@keyframes scan-line {
    0% {
        transform: translateY(-100%);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translateY(200px);
        opacity: 0;
    }
}

/* Base Styles */
body {
    background: linear-gradient(45deg, #000 0%, #001100 25%, #000 50%, #001100 75%, #000 100%);
    background-size: 400% 400%;
    animation: background-scan 20s ease infinite;
    color: #00FF41;
    font-family: 'VT323', monospace;
    font-size: 18px;
    line-height: 1.1;
    margin: 0;
    padding: 0;
    text-shadow: 0 0 8px #00FF41, 0 0 15px #00FF41;
    animation: glow-pulse 3s ease-in-out infinite;
}

/* Game Container */
#game-container {
    height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    background: radial-gradient(circle at center, #001100 0%, #000 70%);
    border: 3px solid #00FF41;
    animation: border-glow 4s ease-in-out infinite;
    overflow: hidden;
}

/* Time Info (now in case file header) */
#time-info {
    color: #4CAF50;
    font-size: 1rem;
    text-shadow: 0 0 8px #4CAF50;
    font-weight: bold;
}

#game-date {
    font-weight: bold;
    letter-spacing: 1px;
    display: block;
}

#local-time {
    font-weight: bold;
    letter-spacing: 2px;
    display: block;
}

@keyframes time-pulse {

    0%,
    100% {
        text-shadow: 0 0 10px #00FF41, 0 0 20px #00FF41, 0 0 30px #00FF41;
        transform: scale(1);
    }

    50% {
        text-shadow: 0 0 15px #00FF41, 0 0 30px #00FF41, 0 0 45px #00FF41, 0 0 60px #00FF41;
        transform: scale(1.02);
    }
}

/* Footer removed */

/* Main Game Area */
#main-game {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Terminal Section (Left) */
#terminal-section {
    flex: 2;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: all 0.3s ease;
}

/* Full width terminal when case file is hidden */
#terminal-section.full-width {
    flex: 1;
}

#location-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.6;
    pointer-events: none;
    background-size: cover;
    background-position: center;
    z-index: 0;
}

#terminal-header {
    display: none;
    /* Hidden by default */
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: rgba(0, 0, 0, 0.9);
    border-bottom: 2px solid #00FF41;
    position: relative;
    z-index: 1;
    font-family: 'VT323', monospace;
}

#terminal-header.show {
    display: flex;
}

.terminal-location {
    color: #00FF41;
    font-size: 1rem;
    font-weight: bold;
    text-shadow: 0 0 8px #00FF41, 0 0 15px #00FF41;
    font-family: 'VT323', monospace;
    flex: 1;
    text-align: left;
    min-width: 0;
}

.terminal-date {
    color: #00FF41;
    font-size: 1rem;
    font-weight: bold;
    text-shadow: 0 0 8px #00FF41, 0 0 15px #00FF41;
    text-align: center;
    font-family: 'VT323', monospace;
    flex: 1;
    margin: 0 1rem;
    min-width: 0;
}

.terminal-time {
    color: #00FF41;
    font-size: 1rem;
    font-weight: bold;
    text-shadow: 0 0 8px #00FF41, 0 0 15px #00FF41;
    text-align: center;
    font-family: 'VT323', monospace;
    flex: 1;
    min-width: 0;
    text-align: right;
}

.terminal-content {
    flex: 1;
    padding: 1rem 1.5rem;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.7);
    position: relative;
    z-index: 1;
    padding-right: 1rem;
    min-height: 0;
}

.terminal-content::-webkit-scrollbar {
    width: 8px;
}

.terminal-content::-webkit-scrollbar-track {
    background: rgba(0, 255, 65, 0.1);
    border-radius: 4px;
}

.terminal-content::-webkit-scrollbar-thumb {
    background: #00FF41;
    border-radius: 4px;
    box-shadow: 0 0 5px rgba(0, 255, 65, 0.5);
}

.terminal-content::-webkit-scrollbar-thumb:hover {
    background: #40FF71;
    box-shadow: 0 0 8px rgba(0, 255, 65, 0.8);
}

.terminal-content p {
    margin: 0 0 0.5rem 0;
    line-height: 1.2;
    text-shadow: 0 0 8px #00FF41, 0 0 15px #00FF41;
    font-size: 1rem;
    color: #00FF41;
}

.terminal-input {
    padding: 0.8rem 1.5rem;
    background: rgba(0, 0, 0, 0.9);
    border-top: 1px solid #333;
    min-height: 60px;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

.terminal-input p {
    text-shadow: 0 0 8px #00FF41, 0 0 15px #00FF41;
    font-size: 1rem;
    color: #00FF41;
    line-height: 1.2;
    margin: 0 0 0.5rem 0;
}

/* Message Styles */
.message {
    color: #fff !important;
    text-shadow: 0 0 8px #fff, 0 0 15px #fff, 0 0 25px #fff !important;
    font-weight: bold;
}

.highlight {
    color: #FFFF00 !important;
    text-shadow: 0 0 10px #FFFF00, 0 0 20px #FFFF00, 0 0 30px #FFFF00 !important;
    font-weight: bold;
}

/* Case File Section (Right) */
#case-file-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.8);
    min-width: 350px;
    border-left: 1px solid #333;
}

#case-file-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, rgba(255, 255, 0, 0.1) 0%, rgba(0, 0, 0, 0.9) 100%);
    border-bottom: 2px solid #FFFF00;
}

.file-title {
    color: #FFFF00;
    font-size: 1rem;
    font-weight: bold;
    text-shadow: 0 0 8px #FFFF00;
    flex: 1;
}

.file-classification {
    color: #4CAF50;
    font-size: 0.9rem;
    text-shadow: 0 0 5px #4CAF50;
    font-weight: bold;
    font-family: 'VT323', monospace;
}

.file-classification.time-flash {
    animation: time-flash 0.5s ease-in-out;
}

@keyframes time-flash {
    0% {
        background: transparent;
    }

    50% {
        background: rgba(255, 255, 255, 0.3);
    }

    100% {
        background: transparent;
    }
}

/* Evidence Section */
#evidence-section {
    padding: 1rem;
    border-bottom: 1px solid #333;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

#evidence-section h3 {
    margin: 0 0 0.5rem 0;
    color: #00FFFF;
    font-size: 1.1rem;
    text-shadow: 0 0 8px #00FFFF;
    border-bottom: 1px dotted #00FFFF;
    padding-bottom: 0.3rem;
    line-height: 1.1;
}

#clues-container {
    flex: 1;
    overflow-y: auto;
    padding-right: 0.5rem;
    min-height: 0;
}

#clues-container::-webkit-scrollbar {
    width: 6px;
}

#clues-container::-webkit-scrollbar-track {
    background: rgba(0, 255, 255, 0.1);
    border-radius: 3px;
}

#clues-container::-webkit-scrollbar-thumb {
    background: #00FFFF;
    border-radius: 3px;
    box-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
}

#clues-container::-webkit-scrollbar-thumb:hover {
    background: #40FFFF;
    box-shadow: 0 0 8px rgba(0, 255, 255, 0.8);
}

#clues ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

#clues li {
    margin-bottom: 0.5rem;
    padding: 0.4rem;
    background: rgba(0, 255, 255, 0.05);
    border-left: 3px solid #00FFFF;
    line-height: 1.2;
    font-size: 0.9rem;
    text-shadow: 0 0 5px #00FFFF;
    color: #00FFFF;
}

/* Suspect Section */
#suspect-section {
    flex: 1;
    padding: 1rem;
    display: flex;
    flex-direction: column;
}

#suspect-section h3 {
    margin: 0 0 0.5rem 0;
    color: #FF6B6B;
    font-size: 1.1rem;
    text-shadow: 0 0 8px #FF6B6B;
    border-bottom: 1px dotted #FF6B6B;
    padding-bottom: 0.3rem;
    line-height: 1.1;
}

#suspect-profile {
    display: flex;
    flex-direction: column;
    flex: 1;
}

#mugshot-container {
    width: 100%;
    aspect-ratio: 1;
    max-height: 150px;
    background: radial-gradient(circle at center, #1a1a1a 0%, #111 100%);
    border: 2px solid #444;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 0 20px rgba(0, 255, 65, 0.1);
}

#mugshot-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #00FF41, transparent);
    animation: scan-line 4s ease-in-out infinite;
    z-index: 1;
}

#suspect-details {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.suspect-field {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.3rem 0.5rem;
    background: rgba(255, 107, 107, 0.05);
    border-left: 3px solid #FF6B6B;
}

.field-label {
    color: #FF6B6B;
    font-weight: bold;
    text-shadow: 0 0 5px #FF6B6B;
    font-size: 0.9rem;
    line-height: 1.1;
}

.field-value {
    color: #fff;
    text-shadow: 0 0 5px #fff;
    text-align: right;
    font-size: 0.9rem;
    line-height: 1.1;
}

/* Lineup Container */
#lineup-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-y: auto;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.8);
    flex: 1;
}

.suspect-card {
    border: 2px solid #333;
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.suspect-card:hover {
    border-color: #00FF41;
    background: rgba(0, 255, 65, 0.1);
    transform: translateX(5px);
}

.suspect-card h3 {
    margin: 0;
    color: #FFFF00;
    font-size: 1.5rem;
    min-width: 30px;
    text-shadow: 0 0 8px #FFFF00, 0 0 15px #FFFF00;
}

.suspect-mugshot {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border: 2px solid #444;
    background: #555;
}

.suspect-info {
    flex: 1;
    font-size: 1rem;
    text-shadow: 0 0 8px #00FF41, 0 0 15px #00FF41;
    color: #00FF41;
}

.suspect-info p {
    margin: 0.3rem 0;
    text-shadow: 0 0 8px #00FF41, 0 0 15px #00FF41;
    color: #00FF41;
}

/* Main Menu */
#main-menu {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    height: 100vh;
    padding: 5vh 0 6vh;
    box-sizing: border-box;
    position: relative;
    background:
        radial-gradient(ellipse at center, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.7) 100%),
        url('img/title.png') center / cover no-repeat,
        radial-gradient(circle at center, #001100 0%, #000 70%);
}

/* Title sits inside the dark 'logo box' area at the top of the key art */
#main-menu h1 {
    color: #00FF41;
    font-size: 3.8rem;
    text-shadow: 0 0 20px #00FF41, 0 0 40px #000, 2px 2px 0 #000;
    margin: 2vh 0 0;
    text-align: center;
    animation: glow-pulse 3s ease-in-out infinite;
    position: relative;
    z-index: 1;
}

/* Push menu controls to the lower part of the art */
#career-line {
    margin-top: auto;
}

#main-menu .menu-button,
#main-menu p {
    position: relative;
    z-index: 1;
}

#main-menu p {
    background: rgba(0, 0, 0, 0.7);
    padding: 0.3rem 1rem;
    border-radius: 4px;
}

#career-line {
    color: #FFFF00;
    font-size: 1.1rem;
    text-shadow: 0 0 10px #FFFF00;
    letter-spacing: 2px;
    margin-bottom: 1.2rem;
}

/* CRT scanline overlay */
#main-menu::after,
#game-container::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: repeating-linear-gradient(0deg,
            rgba(0, 0, 0, 0.18) 0px,
            rgba(0, 0, 0, 0.18) 1px,
            transparent 1px,
            transparent 3px);
    z-index: 50;
}

#game-container {
    position: relative;
}

.menu-button {
    background: linear-gradient(135deg, #e0e0e0 0%, #c0c0c0 100%);
    color: #111;
    font-family: 'VT323', monospace;
    font-weight: bold;
    font-size: 1.5rem;
    text-shadow: none;
    padding: 1rem 2rem;
    border: 2px solid #555;
    border-radius: 8px;
    width: 400px;
    max-width: 90%;
    text-align: center;
    margin: 0.5rem 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.menu-button:hover {
    background: linear-gradient(135deg, #fff 0%, #e0e0e0 100%);
    border-color: #000;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 1200px) {
    #main-game {
        flex-direction: column;
    }

    #terminal-section {
        flex: 1;
        border-bottom: 1px solid #333;
    }

    #case-file-section {
        flex: 0 0 300px;
        min-width: auto;
        border-left: none;
        border-top: 1px solid #333;
    }

    #status-bar {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    #system-info {
        text-align: center;
    }
}

@media (max-width: 768px) {
    body {
        font-size: 16px;
    }

    #status-bar {
        padding: 0.5rem 1rem;
    }

    #case-header h1 {
        font-size: 1.4rem;
    }

    .terminal-content,
    .terminal-input {
        padding: 1rem;
    }

    #evidence-section,
    #suspect-section {
        padding: 1rem;
    }
}

/* Remove old clock styling - now handled in terminal header */
