/* ============================================================
   2002 TIME WARP STYLE
   Activated via body.time-warp class
   All rules scoped to body.time-warp to avoid conflicts
   ============================================================ */

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

/* ---- ROOT OVERRIDES ---- */
body.time-warp {
    background-color: #c6d6f5;
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4'%3E%3Crect width='4' height='4' fill='%23c6d6f5'/%3E%3Crect width='1' height='1' fill='%23b8caf0' opacity='0.5'/%3E%3C/svg%3E");
    color: #000000;
    font-family: Verdana, Arial, sans-serif;
    font-size: 11px;
    line-height: 1.4;
    cursor: default;
}

/* ---- SCROLLBAR (IE era) ---- */
body.time-warp ::-webkit-scrollbar { width: 16px; }
body.time-warp ::-webkit-scrollbar-track { background: #c0c0c0; border: 1px inset #808080; }
body.time-warp ::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #e8e8e8, #c0c0c0, #a0a0a0);
    border: 1px outset #808080;
}

/* ---- HEADER ---- */
body.time-warp header {
    background: linear-gradient(to bottom, #1f5fb5 0%, #0a3d8f 40%, #082f70 100%);
    border-bottom: 3px solid #f90;
    padding: 0;
    margin-bottom: 0;
    text-align: left;
}

body.time-warp header h1 {
    font-family: Verdana, Arial, sans-serif;
    font-size: 20px;
    font-weight: bold;
    color: #ffffff;
    text-shadow: 1px 1px 2px #000055;
    padding: 8px 12px 2px 12px;
    margin: 0;
    letter-spacing: 0;
}

body.time-warp header p {
    color: #aaccff;
    font-size: 10px;
    font-style: normal;
    padding: 2px 12px 8px 12px;
    margin: 0;
}

/* logo strip */
body.time-warp header::before {
    content: "🦋 Search  |  Shopping  |  Money  |  Games  |  Music | Candies";
    display: block;
    background: linear-gradient(to bottom, #0a3d8f, #072d6a);
    color: #aaccff;
    font-size: 10px;
    font-family: Verdana, Arial, sans-serif;
    padding: 3px 12px;
    border-bottom: 1px solid #3366cc;
    letter-spacing: 0.5px;
}

body.time-warp header::after {
    content: "⚡ You've got 3 new messages!  |  Today's top story: Candy production at record highs  ";
    display: block;
    background: #fffbe6;
    color: #333;
    font-size: 10px;
    font-family: Verdana, Arial, sans-serif;
    padding: 3px 12px;
    border-top: 1px solid #ccaa00;
    border-bottom: 2px solid #cc8800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---- CONTAINER ---- */
body.time-warp #container {
    max-width: 900px;
    margin: 0 auto;
    background: #c6d6f5;
}

/* ---- PANELS ---- */
body.time-warp .panel {
    background: #ffffff;
    border: 2px outset #c0c0c0;
    border-top-color: #f0f0f0;
    border-left-color: #f0f0f0;
    border-right-color: #808080;
    border-bottom-color: #808080;
    padding: 8px;
    margin-bottom: 4px;
    font-family: Verdana, Arial, sans-serif;
    font-size: 11px;
}

body.time-warp .panel h3 {
    background: linear-gradient(to right, #1f5fb5, #2e72c5, #1f5fb5);
    color: #ffffff;
    font-family: Verdana, Arial, sans-serif;
    font-size: 11px;
    font-weight: bold;
    padding: 3px 8px;
    margin: -8px -8px 8px -8px;
    border-bottom: 1px solid #0a3d8f;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

body.time-warp .panel h2 {
    background: linear-gradient(to right, #1f5fb5, #2e72c5, #1f5fb5);
    color: #ffffff;
    font-family: Verdana, Arial, sans-serif;
    font-size: 12px;
    font-weight: bold;
    padding: 4px 8px;
    margin: -8px -8px 10px -8px;
    border-bottom: 2px solid #f90;
}

/* ---- STATUS PANEL ---- */
body.time-warp #status-panel {
    background: linear-gradient(to bottom, #e8f0ff, #d0e0ff);
    border: 2px outset #c0c0c0;
    border-top-color: #f0f0f0;
    border-left-color: #f0f0f0;
}

body.time-warp .stat-row {
    border-bottom: 1px dotted #99aacc;
    padding: 2px 0;
    font-size: 11px;
}

body.time-warp .stat-label {
    color: #0a3d8f;
    font-weight: bold;
    font-size: 10px;
    text-transform: uppercase;
}

/* ---- BUTTONS ---- */
body.time-warp .action-btn {
    background: linear-gradient(to bottom, #ffffff 0%, #dce8ff 50%, #b8ccf0 100%);
    border: 2px outset #c0c0c0;
    border-top-color: #ffffff;
    border-left-color: #ffffff;
    color: #00218a;
    font-family: Verdana, Arial, sans-serif;
    font-size: 11px;
    font-weight: bold;
    padding: 3px 10px;
    cursor: pointer;
    min-width: 80px;
    text-align: center;
}

body.time-warp .action-btn:hover {
    background: linear-gradient(to bottom, #ffffff 0%, #ccdaff 50%, #99b0e8 100%);
    color: #cc0000;
    text-decoration: underline;
    font-weight: bold;
}

body.time-warp .action-btn:active {
    border: 2px inset #808080;
    background: linear-gradient(to bottom, #b8ccf0 0%, #dce8ff 100%);
}

body.time-warp .action-btn:disabled {
    background: #d4d0c8;
    color: #808080;
    border: 2px outset #c0c0c0;
    text-decoration: none;
    cursor: not-allowed;
    opacity: 1;
}

body.time-warp .upgrade-btn {
    background: linear-gradient(to bottom, #ffffff 0%, #dce8ff 50%, #b8ccf0 100%);
    border: 2px outset #c0c0c0;
    border-top-color: #ffffff;
    border-left-color: #ffffff;
    color: #00218a;
    font-family: Verdana, Arial, sans-serif;
    font-size: 10px;
    padding: 2px 7px;
    cursor: pointer;
    margin-left: 4px;
}

body.time-warp .upgrade-btn:hover:not(:disabled) {
    background: linear-gradient(to bottom, #ffffff, #ccdaff);
    color: #cc0000;
    text-decoration: underline;
}

body.time-warp .upgrade-btn:disabled {
    background: #d4d0c8;
    color: #808080;
    border: 2px outset #c0c0c0;
    cursor: not-allowed;
    opacity: 1;
}

body.time-warp .settings-btn {
    background: linear-gradient(to bottom, #ffffff 0%, #dce8ff 50%, #b8ccf0 100%);
    border: 2px outset #c0c0c0;
    border-top-color: #ffffff;
    border-left-color: #ffffff;
    color: #00218a;
    font-family: Verdana, Arial, sans-serif;
    font-size: 11px;
    padding: 3px 10px;
    cursor: pointer;
    margin-right: 4px;
    margin-bottom: 4px;
}

body.time-warp .settings-btn:hover {
    background: linear-gradient(to bottom, #ffffff, #ccdaff);
    color: #cc0000;
    text-decoration: underline;
}

/* ---- UPGRADE ITEMS ---- */
body.time-warp .upgrade-item {
    border-left: 3px solid #1f5fb5;
    background: #f0f5ff;
    padding: 4px 4px 4px 8px;
    margin-bottom: 4px;
}

body.time-warp .upgrade-name {
    color: #0a3d8f;
    font-weight: bold;
    font-size: 11px;
}

body.time-warp .upgrade-cost {
    color: #666666;
    font-size: 10px;
}

/* ---- LINKS / CLICKABLE ---- */
body.time-warp .clickable {
    color: #0000cc;
    text-decoration: underline;
    cursor: pointer;
    font-weight: normal;
}

body.time-warp .clickable:hover {
    color: #cc0000;
    background-color: transparent;
}

body.time-warp .locked {
    color: #808080;
    font-style: italic;
}

/* ---- MAP VIEW ---- */
body.time-warp #asciiMap {
    background: #e8f0ff;
    border: 1px inset #808080;
    padding: 10px;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    color: #000055;
}

/* ---- MONSTER SELECT ---- */
body.time-warp #monster-select-panel select {
    background: #ffffff;
    border: 2px inset #808080;
    color: #000000;
    font-family: Verdana, Arial, sans-serif;
    font-size: 11px;
    padding: 2px 4px;
}

/* ---- COMBAT DISPLAY ---- */
body.time-warp #combat-display {
    background: #000033;
    border: 2px inset #808080;
    color: #00ff00;
    font-family: 'Courier New', monospace;
}

/* ---- INVENTORY ---- */
body.time-warp .inventory-item {
    border-bottom: 1px dotted #99aacc;
    padding: 2px 0 2px 4px;
    color: #000055;
    font-size: 11px;
}

body.time-warp .inventory-item::before {
    content: "► ";
    color: #1f5fb5;
}

/* ---- COLOSSEUM ---- */
body.time-warp #colosseum-buffs-display {
    background: #e8f0ff;
    border: 2px inset #808080;
    color: #000055;
}

body.time-warp #buffChoices {
    background: #fffbe6;
    border: 2px solid #cc8800;
    color: #000000;
}

/* ---- LOG PANEL ---- */
body.time-warp .log-entry {
    font-size: 10px;
    color: #333366;
    border-bottom: 1px dotted #cccccc;
    padding: 1px 0 1px 4px;
}

body.time-warp .log-entry::before {
    content: "» ";
    color: #1f5fb5;
}

/* ---- FOOTER ---- */
body.time-warp footer {
    background: linear-gradient(to bottom, #1f5fb5, #0a3d8f);
    color: #aaccff;
    border-top: 3px solid #f90;
    padding: 6px 12px;
    font-size: 10px;
    text-align: center;
}

body.time-warp footer::before {
    content: "© 2002 Candy Box 3 Corporation. All rights reserved. | Privacy | Legal | Advertise with us";
    display: block;
    color: #aaccff;
    font-size: 10px;
    margin-bottom: 4px;
}

/* ---- SCROLLBAR (IE-era look) ---- */
body.time-warp ::-webkit-scrollbar-track { background: #d4d0c8; }
body.time-warp ::-webkit-scrollbar-thumb {
    background: linear-gradient(to right, #e8e4dc, #c0bdb4, #a09c94);
    border: 1px outset #c0c0c0;
}

/* ---- ANIMATED MARQUEE-STYLE NOTIFICATION BAR ---- */
body.time-warp #container::before {
    content: "🌟 NEW: Candy Box 3 now with 100% more sugar!  |  ⚔️ Defeat The Final Sweet for ultimate glory  |  💬 Chat with villagers in Town!  |  🏆 High Score: 9,999,999";
    display: block;
    background: linear-gradient(to right, #0a3d8f, #1f5fb5, #0a3d8f);
    color: #ffdd00;
    font-size: 10px;
    font-family: Verdana, Arial, sans-serif;
    padding: 3px 8px;
    border-bottom: 1px solid #f90;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    animation: marquee-scroll 20s linear infinite;
}

@keyframes marquee-scroll {
    0%   { letter-spacing: 0px; }
    50%  { letter-spacing: 0.2px; }
    100% { letter-spacing: 0px; }
}

/* ---- SELECT DROPDOWNS ---- */
body.time-warp select {
    background: #ffffff;
    border: 2px inset #808080;
    color: #000000;
    font-family: Verdana, Arial, sans-serif;
    font-size: 11px;
    padding: 2px 4px;
}

/* ---- PRE / ASCII ART ---- */
body.time-warp pre {
    background: #f0f5ff;
    border: 1px inset #808080;
    padding: 6px;
    font-family: 'Courier New', monospace;
    font-size: 10px;
    color: #000055;
    overflow-x: auto;
}

/* ---- SPECIAL TIME WARP BADGE on Laboratory button ---- */
body.time-warp [data-action="toggle-time-warp"] {
    background: linear-gradient(to bottom, #ffee44, #ffaa00);
    border: 2px outset #cc8800;
    color: #000000;
    font-weight: bold;
    animation: warp-pulse 2s ease-in-out infinite;
}

@keyframes warp-pulse {
    0%, 100% { box-shadow: 0 0 4px #ffaa00; }
    50%       { box-shadow: 0 0 10px #ff6600, 0 0 20px #ffaa00; }
}

@media (max-width: 600px) {
    body.time-warp pre,
    body.time-warp #asciiMap {
        font-size: 7px !important;
        line-height: 1.1;
        overflow-x: auto;
        max-width: 100%;
    }

    body.time-warp header::before,
    body.time-warp header::after {
        font-size: 9px;
        padding: 2px 6px;
    }

    body.time-warp #container::before {
        font-size: 9px;
    }
}

/* ============================================================
   TIME WARP + DARK MODE COMBINED — Wikipedia navy dark palette
   Only applies when BOTH classes are active simultaneously
   ============================================================ */

body.time-warp.dark-mode {
    background-color: #202122;
    color: #f8f9fa;
    font-family: Verdana, Arial, sans-serif;
}

body.time-warp.dark-mode #container {
    background: #202122;
}

body.time-warp.dark-mode #container::before {
    background: linear-gradient(to right, #1a2a4a, #2a4b7c, #1a2a4a);
    color: #a2c4f5;
    border-bottom-color: #3d4042;
}

body.time-warp.dark-mode header {
    background: linear-gradient(to bottom, #1a2a4a 0%, #0f1f3a 60%, #0a1628 100%);
    border-bottom-color: #2a4b7c;
}

body.time-warp.dark-mode header::before {
    background: linear-gradient(to bottom, #0f1f3a, #0a1628);
    color: #6fa0d8;
    border-bottom-color: #2a4b7c;
}

body.time-warp.dark-mode header::after {
    background: #27292d;
    color: #a2c4f5;
    border-top-color: #3d4042;
    border-bottom-color: #3d4042;
}

body.time-warp.dark-mode header h1 {
    color: #f8f9fa;
    text-shadow: 1px 1px 3px #000;
}

body.time-warp.dark-mode header p {
    color: #6fa0d8;
}

body.time-warp.dark-mode .panel {
    background: #27292d;
    border-top-color: #3a3c3e;
    border-left-color: #3a3c3e;
    border-right-color: #1a1b1c;
    border-bottom-color: #1a1b1c;
    color: #f8f9fa;
}

body.time-warp.dark-mode .panel h3 {
    background: linear-gradient(to right, #2a4b7c, #1e3a6a, #2a4b7c);
    color: #f8f9fa;
    border-bottom-color: #1a2a4a;
}

body.time-warp.dark-mode .panel h2 {
    background: linear-gradient(to right, #2a4b7c, #1e3a6a, #2a4b7c);
    color: #f8f9fa;
    border-bottom-color: #6fa0d8;
}

body.time-warp.dark-mode #status-panel {
    background: linear-gradient(to bottom, #27292d, #202530);
    border-color: #3d4042;
}

body.time-warp.dark-mode .stat-row {
    border-bottom-color: #3a3c3e;
    color: #f8f9fa;
}

body.time-warp.dark-mode .stat-label {
    color: #a2c4f5;
}

body.time-warp.dark-mode .action-btn {
    background: linear-gradient(to bottom, #2e3a4e 0%, #27313f 50%, #1e2836 100%);
    border-top-color: #4a5a70;
    border-left-color: #4a5a70;
    border-right-color: #111820;
    border-bottom-color: #111820;
    color: #a2c4f5;
}

body.time-warp.dark-mode .action-btn:hover {
    background: linear-gradient(to bottom, #3a4a60, #2e3a50);
    color: #ffffff;
    text-decoration: underline;
}

body.time-warp.dark-mode .action-btn:active {
    border: 2px inset #111820;
    background: linear-gradient(to bottom, #1e2836, #2e3a4e);
}

body.time-warp.dark-mode .action-btn:disabled {
    background: #3a3c3e;
    color: #777777;
    border-color: #2a2c2e;
}

body.time-warp.dark-mode .upgrade-btn {
    background: linear-gradient(to bottom, #2e3a4e 0%, #27313f 50%, #1e2836 100%);
    border_top_color: #4a5a70;
    border-left-color: #4a5a70;
    border-right-color: #111820;
    border_bottom_color: #111820;
    color: #a2c4f5;
}

body.time-warp.dark-mode .upgrade-btn:hover:not(:disabled) {
    background: linear-gradient(to bottom, #3a4a60, #2e3a50);
    color: #ffffff;
    text-decoration: underline;
}

body.time-warp.dark-mode .upgrade-btn:disabled {
    background: #3a3c3e;
    color: #777777;
    border-color: #2a2c2e;
}

body.time-warp.dark-mode .settings-btn {
    background: linear-gradient(to bottom, #2e3a4e 0%, #27313f 50%, #1e2836 100%);
    border-top-color: #4a5a70;
    border-left-color: #4a5a70;
    border-right-color: #111820;
    border-bottom-color: #111820;
    color: #a2c4f5;
}

body.time-warp.dark-mode .settings-btn:hover {
    background: linear-gradient(to bottom, #3a4a60, #2e3a50);
    color: #ffffff;
    text-decoration: underline;
}

body.time-warp.dark-mode .upgrade-item {
    border-left-color: #6fa0d8;
    background: #2a2c30;
}

body.time-warp.dark-mode .upgrade-name {
    color: #a2c4f5;
}

body.time-warp.dark-mode .upgrade-cost {
    color: #a0b0c8;
}

body.time-warp.dark-mode .clickable {
    color: #6fa0d8;
    text-decoration: underline;
}

body.time-warp.dark-mode .clickable:hover {
    color: #a2c4f5;
}

body.time-warp.dark-mode .locked {
    color: #666666;
}

body.time-warp.dark-mode #asciiMap {
    background: #1e2430;
    border-color: #3d4042;
    color: #a2c4f5;
}

body.time-warp.dark-mode pre {
    background: #1e2430;
    border-color: #3d4042;
    color: #a2c4f5;
}

body.time-warp.dark-mode #monster-select-panel select,
body.time-warp.dark-mode select {
    background: #27292d;
    border-color: #3d4042;
    color: #f8f9fa;
}

body.time-warp.dark-mode #combat-display {
    background: #0a0f1a;
    border-color: #2a4b7c;
    color: #00dd88;
}

body.time-warp.dark-mode .inventory-item {
    border-bottom-color: #3a3c3e;
    color: #c8d8f0;
}

body.time-warp.dark-mode .inventory-item::before {
    color: #6fa0d8;
}

body.time-warp.dark-mode #colosseum-buffs-display {
    background: #1e2430;
    border-color: #3d4042;
    color: #a2c4f5;
}

body.time-warp.dark-mode #buffChoices {
    background: #1e2818;
    border-color: #5a7a30;
    color: #f8f9fa;
}

body.time-warp.dark-mode .log-entry {
    color: #a0b8d0;
    border-bottom-color: #3a3c3e;
}

body.time-warp.dark-mode .log-entry::before {
    color: #6fa0d8;
}

body.time-warp.dark-mode footer {
    background: linear-gradient(to bottom, #1a2a4a, #0f1f3a);
    color: #6fa0d8;
    border_top_color: #2a4b7c;
}

body.time-warp.dark-mode footer::before {
    color: #6fa0d8;
}

body.time-warp.dark-mode ::-webkit-scrollbar-track {
    background: #27292d;
}

body.time-warp.dark-mode ::-webkit-scrollbar-thumb {
    background: linear-gradient(to right, #3a4a60, #2a3a50);
    border-color: #4a5a70;
}

body.time-warp.dark-mode [data-action="toggle-time-warp"] {
    background: linear-gradient(to bottom, #3a5a9a, #1e3a7a);
    border-color: #6fa0d8;
    color: #f8f9fa;
    animation: warp-pulse-dark 2s ease-in-out infinite;
}

@keyframes warp-pulse-dark {
    0%, 100% { box-shadow: 0 0 4px #2a4b7c; }
    50%       { box-shadow: 0 0 12px #6fa0d8, 0 0 24px #2a4b7c; }
}


@keyframes warp-pulse {
    0%, 100% { box-shadow: 0 0 4px #ffaa00; }
    50%       { box-shadow: 0 0 10px #ff6600, 0 0 20px #ffaa00; }
}