body {
    background-color: teal;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    cursor: url("https://files.catbox.moe/2tpljw.cur"), default;
    font-family: OldFont, sans-serif;
}

@media (max-width: 1000px) {
    body {
        background-color: teal;
        margin: 0;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 100vh;
        cursor: url("https://files.catbox.moe/2tpljw.cur"), default;
    }
}

#game-window {
    width: 880px;
    height: 640px;
    display: flex;
    left: 20%;
    flex-direction: column;
    box-shadow: 4px 4px 10px rgba(0,0,0,0.5);
}

.title-bar {
    background: linear-gradient(90deg, #000080, #1084d0) !important;
    padding: 3px 2px 3px 3px !important;
    display: flex;
    align-items: center;
}

.title-bar-text {
    color: white !important;
    font-weight: bold;
    margin-left: 4px;
    flex-grow: 1;
}

.title-bar-icon img {
    width: 16px;
    height: 16px;
    image-rendering: pixelated;
    margin-right: 4px;
}

ul[role="menubar"] {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    background: #c0c0c0;
    border-bottom: 1px solid #808080;
    height: 20px;
    align-items: center;
}

[role="menuitem"] {
    position: relative;
    padding: 2px 8px;
    cursor: url("https://files.catbox.moe/2tpljw.cur"), default;
    font-size: 12px;
}

[role="menuitem"]:hover {
    background: #000080;
    color: white;
}

ul[role="menu"] {
    display: none;
    position: absolute;
    left: 0;
    top: 100%;
    z-index: 1000;
    background: #c0c0c0;
    color: black;
    list-style: none;
    margin: 0;
    padding: 2px;
    border: 1px solid #808080;
    box-shadow: 2px 2px 0 #000;
    min-width: 100px;
}

[role="menuitem"]:hover > ul[role="menu"] {
    display: block;
}

ul[role="menu"] [role="menuitem"] {
    padding: 2px 20px 2px 10px;
    white-space: nowrap;
}

.window-body2 {
    background: black;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    flex-grow: 1;
    position: relative;
    overflow: hidden;
    box-shadow: inset 2px 2px 4px #000, inset -2px -2px 4px #808080;
}

.splash-image {
    image-rendering: pixelated;
    max-width: 60%;
    height: auto;
    margin-bottom: 30px;
}

.splash-footer {
    font-family: "Fixedsys 62", monospace;
    font-size: 24px;
    font-weight: bold;
    letter-spacing: 1px;
}

button, a {
    cursor: url("https://files.catbox.moe/2tpljw.cur"), default;
}

a { 
    text-decoration: none;
    color: inherit; 
    display: block;
    width: 100%;
}

.url {
    cursor:url("https://files.catbox.moe/rllfo2.cur"), pointer;
}

.gamebox {
    font-family: 'Fixedsys 62'; color: white; line-height: 1.5;
}

.gamebox2 {
    font-size: 24px;
    font-family: 'Fixedsys 62';
    color: white;
    line-height: 1.35;
    white-space: pre-wrap;
    overflow-y: auto;
    max-height: 100%;
}

.title-bar.dragging, body.dragging, .title-bar-text.dragging, .title-bar-text, .title-bar {
    cursor: url("https://files.catbox.moe/2tpljw.cur"), default !important;
}

#help-us-window {
    display: none;
    position: fixed;
    width: 500px;
}

#about-window {
    display: none;
    position: fixed;
}

.window-hidden {
    display: none !important;
}

.window.maximized {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    margin: 0 !important;
    z-index: 1000 !important;
}

@font-face {
  font-family: OldFont; 
  src: url(fonts/ms_sans_serif.woff2); 
}

img {
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

#about-window .title-bar {
    background: linear-gradient(90deg, #000080, #1084d0);
}

#about-window {
    width: 400px;
    height: 320px;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 4px 10px rgba(0,0,0,0.5);
}

#about-window .window-body2 {
    background: grey;
    padding: 20px; 
    box-shadow: inset 2px 2px 4px #000, inset -2px -2px 4px #808080;
}

.start-button {
      background-color: #C0C0C0;
      border-top: 2px solid white;
      border-left: 2px solid white;
      border-right: 2px solid #000;
      border-bottom: 2px solid #000;
      padding: 2px 6px;
      margin-right: 4px;
        cursor: url("https://files.catbox.moe/2tpljw.cur"), default;
      font-weight: bold;
      color: black;
      display: flex;
      align-items: center;
      height: 100%;
    }

    .start-button:active {
      border-top: 2px solid #000;
      border-left: 2px solid #000;
      border-right: 2px solid white;
      border-bottom: 2px solid white;
      padding: 3px 5px 1px 7px; 
    }

    .start-button img {
      width: 18px;
      height: 18px;
      margin-right: 4px;
    }

    .taskbar {
      position: fixed;
      bottom: 0;
      left: 0;
      right: 0;
      height: 28px;
      background-color: #C0C0C0;
      border-top: 2px solid white;
      display: flex;
      align-items: center;
      padding: 2px;
      z-index: 1000;
    }

    .desktop-icon {
      position: absolute;
      width: 70px;
      text-align: center;
      padding: 5px;
      cursor: url("https://files.catbox.moe/2tpljw.cur"), default;
      color: white;
      text-shadow: 1px 1px #000;
    }

    .desktop-icon img {
      width: 32px;
      height: 32px;
      margin-bottom: 5px;
      image-rendering: pixelated;
    }

    .desktop-icon span {
      display: block;
      font-size: 12px;
      line-height: 1.2;
    }

    .desktop-icon:hover {
      background-color: rgba(0, 0, 0, 0.2);
      border: 1px dotted white;
    }

    .desktop-icon.selected {
      background-color: rgba(0, 0, 128, 0.5);
      border: 1px dotted white;
    }

    .window {
        position: absolute;
        top: 50px;
        left: 50px;
        z-index: 10;
        background: #c0c0c0;
        border: 2px solid;
        border-color: #dfdfdf #808080 #808080 #dfdfdf;
        box-shadow: 1px 1px 0 0 #ffffff inset, -1px -1px 0 0 #808080 inset;
    }
    
    .window .window-body {
        background: #c0c0c0;
        color: black;
    }

/* --- ANIMATIONS --- */
#animation-stage {
    position: absolute;
    bottom: 20%;
    width: 100%;
    height: 100px;
    pointer-events: none;
    overflow: hidden;
}

.sprite-run {
    position: absolute;
    height: 80px;
    image-rendering: pixelated;
    left: -100px;
    animation: moveAcross 4s linear forwards;
}

@keyframes moveAcross {
    from { left: -100px; }
    to { left: 110%; }
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.7; transform: translate(-50%, -50%) scale(1.2); }
}

#cursor {
    font-weight: bold;
}

button:link, a:link { color: #0000EE; }
button:visited, a:visited { color: #551A8B; }
button:hover, a:hover { filter: brightness(1.2); }
button:active, a:active { transform: translateY(1px); }

#investigation-view {
    display: grid;
    grid-template-columns: 320px 1fr;
    grid-template-rows: 40px 1fr 80px;
    height: 100%;
    width: 100%;
    background: #000;
}

.investigation-header {
    grid-column: 1 / span 2;
    border-bottom: 2px solid white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
    background: #222;
}

.city-display {
    border-right: 2px solid white;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.clue-text-area {
    padding: 20px;
    background: #111;
    overflow-y: auto;
}

.action-bar {
    grid-column: 1 / span 2;
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: #c0c0c0;
    border-top: 2px solid white;
    padding: 5px;
}

/* Tablet View (768px - 1024px) */
@media (min-width: 601px) and (max-width: 1024px) {
    #game-window {
        width: 90vw;
        height: 85vh;
    }
    #investigation-view {
        grid-template-columns: 250px 1fr;
        grid-template-rows: auto 1fr auto;
    }
    .investigation-left {
        width: 100%;
        border-right: 2px solid white;
        border-bottom: none;
    }
    .action-buttons button {
        font-size: 12px;
        padding: 8px;
    }
}

@media (max-width: 900px) {
    #game-window {
        width: 95vw;
        height: 90vh;
    }
    #investigation-view {
        grid-template-columns: 1fr;
        grid-template-rows: auto 200px 1fr auto;
    }
    .investigation-left {
        width: 100%;
        border-right: none;
        border-bottom: 2px solid white;
    }
    .investigation-right {
        width: 100%;
    }
    .action-buttons {
        flex-wrap: wrap;
        height: auto;
        padding: 5px;
    }
    .action-buttons button {
        width: 48%;
        margin: 2px;
        font-size: 11px;
        padding: 5px;
    }
    #typewriter-view {
        flex-direction: column;
    }
    .typewriter-left,
    .typewriter-right {
        width: 100%;
    }
}

@media (max-width: 600px) {
    body {
        padding: 0;
    }
    #game-window {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        z-index: 1001;
    }
    .window {
        width: calc(100% - 20px) !important;
        max-height: 80vh !important;
        top: 10px !important;
        left: 10px !important;
    }
    #investigation-view {
        grid-template-rows: auto 150px 1fr auto;
    }
    .investigation-header {
        font-size: 12px;
        height: auto;
        padding: 5px;
    }
    .location-header {
        font-size: 14px;
    }
    .day-time {
        font-size: 10px;
        margin-left: 5px;
    }
    .action-buttons {
        flex-wrap: wrap;
        height: auto;
        gap: 2px;
    }
    .action-buttons button {
        width: 48%;
        font-size: 9px;
        padding: 4px;
        height: auto;
    }
    .splash-footer {
        font-size: 16px;
    }
    #typewriter-view {
        flex-direction: column;
    }
    .typewriter-left,
    .typewriter-right {
        width: 100%;
    }
    .terminal-box {
        min-height: 100px;
        font-size: 12px;
    }
    .window-body {
        padding: 10px !important;
    }
    #destination-list {
        max-height: 150px;
    }
}

.overlay-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #c0c0c0;
    color: black;
    z-index: 50;
    display: none;
    padding: 20px;
    box-sizing: border-box;
}

.warrant-form {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 10px;
    margin-top: 15px;
    padding: 10px;
    background: #dfdfdf;
    border: 2px inset white;
}

input[type="text"], select {
    border: 2px inset #ffffff;
    padding: 2px;
    font-family: 'Fixedsys 62', monospace;
}

.desktop-icon-explorer {
    top: 10px;
    left: 10px;
}

.desktop-icon-playnow {
    top: 10px;
    left: 85px;
}

.window-hidden {
    display: none;
}

#intro-sequence {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

#game-ui {
    display: none;
    width: 100%;
    height: 100%;
    background: black;
}

#game-ui.active {
    display: flex !important;
}

#typewriter-view {
    display: flex;
    width: 100%;
    height: 100%;
    
}

.typewriter-left {
    width: 50%;
    padding: 20px;
    border-right: 2px solid white;
}

.terminal-box {
    background: white;
    color: black;
    padding: 10px;
    font-family: 'Fixedsys 62';
    min-height: 150px;
}

.typewriter-image {
    width: 100%;
    height: auto;
    margin: -70px auto 0 auto;
    display: block;
    object-fit: contain;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

.typewriter-right {
    width: 50%;
}

#investigation-view {
    display: none;
    width: 100%;
    height: 100%;
    flex-direction: column;
}

#investigation-view.active {
    display: flex !important;
}

.investigation-header {
    height: 40px;
    border-bottom: 2px solid white;
    text-align: center;
    padding-top: 5px;
}

.location-header {
    font-size: 16px;
}

.day-time {
    font-size: 12px;
    margin-left: 20px;
}

.timer-display {
    font-size: 12px;
    margin-left: auto;
    margin-right: 10px;
    color: #ffff00;
    font-weight: bold;
}

.timer-warning {
    color: #ff6600 !important;
}

.timer-critical {
    color: #ff0000 !important;
}

.investigation-content {
    display: flex;
    flex-grow: 1;
}

.investigation-left {
    width: 40%;
    border-right: 2px solid white;
    padding: 10px;
}

.investigation-right {
    width: 60%;
    display: flex;
    flex-direction: column;
}

.investigation-top {
    flex-grow: 1;
    border-bottom: 2px solid white;
    background: #111;
}

.action-buttons {
    height: 60px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: #222;
}

#destination-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: #fff;
    border: 2px inset white;
    padding: 5px;
    height: 100px;
    overflow-y: auto;
}

.destination-item {
    padding: 5px 10px;
    background: #c0c0c0;
    border: 2px outset #dfdfdf;
    cursor:url("https://files.catbox.moe/rllfo2.cur"), pointer;
    font-weight: bold;
    text-align: left;
    transition: all 0.1s;
}

.destination-item:hover {
    background: #000080;
    color: white;
}

.destination-item:active {
    border: 2px inset #dfdfdf;
}

.travel-close-btn {
    margin-top: 10px;
    width: 100%;
}

.warrant-container {
    background: #808080;
    padding: 10px;
    border: 2px inset white;
}

.warrant-grid {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 5px;
}

.warrant-actions {
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
}

.warrant-btn-bold {
    font-weight: bold;
}

.menu-accent {
    color: red;
}

.menu-disabled {
    color: #808080;
}

.city-picture-img {
    width: 100%;
    max-width: 100%;
    height: 500px;
    object-fit: cover;
    border: 1px solid white;
}

.city-picture-placeholder {
    width: 100%;
    height: 500px;
    border: 1px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.window-content-scrollable {
    max-height: 300px;
    overflow-y: auto;
    background: #c0c0c0;
    padding: 10px;
    border: 2px inset white;
}

.map-content-scrollable {
    max-height: 350px;
    overflow-y: auto;
    background: #c0c0c0;
    padding: 10px;
    border: 2px inset white;
}

.dossier-content-scrollable {
    max-height: 400px;
    overflow-y: auto;
    background: #c0c0c0;
    padding: 10px;
    border: 2px inset white;
}

.dossier-center {
    text-align: center;
    margin-bottom: 10px;
}

#dossier-image {
    width: 100px;
    height: 100px;
    margin: 0 auto 10px;
    background: #999;
    border: 2px solid black;
    display: flex;
    align-items: center;
    justify-content: center;
}

#dossier-emoji {
    font-size: 48px;
}

.dossier-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.dossier-table td {
    border: 1px solid black;
    padding: 5px;
}

.dossier-table td:first-child {
    font-weight: bold;
}

#cities-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.city-item {
    padding: 8px;
    background: #dfdfdf;
    border: 2px outset #fff;
    cursor:url("https://files.catbox.moe/rllfo2.cur"), pointer;
}

.city-item:hover {
    background: #c0c0c0;
}

.city-item-country {
    font-size: 11px;
    color: #666;
}

.credits-link {
    color: #0f0;
    text-decoration: underline;
}

.credits-copyright {
    color: #00ff00;
}

.dossiers-list-header {
    padding: 10px;
    background: #c0c0c0;
    border-bottom: 2px solid #999;
    margin-bottom: 10px;
}

.dossiers-list-header p {
    margin: 0;
    font-size: 12px;
    font-weight: bold;
}

.dossiers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    padding: 10px;
    max-height: 420px;
    overflow-y: auto;
    background: #c0c0c0;
    border: 2px inset white;
}

.dossier-card {
    background: #dfdfdf;
    border: 2px outset #fff;
    padding: 10px;
    cursor:url("https://files.catbox.moe/rllfo2.cur"), pointer;
    transition: all 0.2s ease;
}

.dossier-card:hover {
    background: #b0b0b0;
    border: 2px inset #000;
    text-decoration: underline;
}

.dossier-card:active {
    background: #909090;
    border: 2px inset #fff;
}

.dossier-card-emoji {
    font-size: 32px;
    text-align: center;
    margin-bottom: 8px;
}

.dossier-card-name {
    font-weight: bold;
    font-size: 12px;
    margin-bottom: 6px;
    text-align: center;
}

.dossier-card-info {
    font-size: 11px;
    line-height: 1.4;
    border-top: 1px solid #999;
    padding-top: 6px;
}

.dossier-card-info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3px;
}

.dossier-card-info-label {
    font-weight: bold;
    color: #000080;
}

.dossier-card-info-value {
    color: #333;
    text-align: right;
}

@media (max-width: 800px) {
    .dossiers-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 8px;
        padding: 8px;
    }
    
    .dossier-card {
        padding: 8px;
    }
    
    .dossier-card-emoji {
        font-size: 24px;
        margin-bottom: 6px;
    }
    
    .dossier-card-name {
        font-size: 11px;
        margin-bottom: 4px;
    }
    
    .dossier-card-info {
        font-size: 10px;
        line-height: 1.3;
    }
}

@media (max-width: 480px) {
    .dossiers-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 6px;
        padding: 6px;
    }
    
    .dossier-card {
        padding: 6px;
    }
    
    .dossier-card-emoji {
        font-size: 20px;
        margin-bottom: 4px;
    }
    
    .dossier-card-name {
        font-size: 10px;
        margin-bottom: 3px;
    }
    
    .dossier-card-info {
        font-size: 9px;
        line-height: 1.2;
    }
    
    .dossier-card-info-row {
        margin-bottom: 2px;
    }
}

/* ===== ARREST BUTTON ANIMATION ===== */
@keyframes pulse-critical {
    0%, 100% { 
        background: #cc0000; 
        box-shadow: 0 0 3px #ff0000, inset 0 0 2px #000; 
    }
    50% { 
        background: #ff0000; 
        box-shadow: 0 0 10px #ff6666, inset 0 0 4px #ffcccc; 
    }
}

#arrest-btn {
    animation: pulse-critical 0.6s infinite !important;
    font-weight: bold !important;
}

.notification-window {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { opacity: 0; transform: translate(-50%, -55%); }
    to { opacity: 1; transform: translate(-50%, -50%); }
}