/* ============================================================
   2010s TIME WARP STYLE
   Activated via body.xp-warp class
   Light mode: Windows XP Luna palette
   Dark mode:  Newgrounds 2011 palette
   All rules scoped to body.xp-warp to avoid conflicts
   ============================================================ */

/* ---- ROOT OVERRIDES ---- */
body.xp-warp {
    background-color: #3a6ea5;
    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='%233a6ea5'/%3E%3Crect width='1' height='1' fill='%232d5d92' opacity='0.4'/%3E%3C/svg%3E");
    color: #000000;
    font-family: Tahoma, Verdana, sans-serif;
    font-size: 11px;
    line-height: 1.4;
    cursor: default;
}

/* ---- SCROLLBAR (XP chunky style) ---- */
body.xp-warp ::-webkit-scrollbar { width: 17px; }
body.xp-warp ::-webkit-scrollbar-track { background: #d4d0c8; border: 1px inset #808080; }
body.xp-warp ::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #ffffff, #d8d8d8, #b0b0b0);
    border: 1px outset #a0a0a0;
}

/* ---- HEADER ---- */
body.xp-warp header {
    background: linear-gradient(to bottom, #1a6fc4 0%, #1254a0 60%, #0e4488 100%);
    border-bottom: 3px solid #2ad400;
    padding: 0;
    margin-bottom: 0;
    text-align: left;
}

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

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

/* nav strip — XP taskbar style */
body.xp-warp header::before {
    content: "🟢 Start  |  My Computer  |  My Documents  |  Internet Explorer  |  Candy Box 3";
    display: block;
    background: linear-gradient(to bottom, #245edc, #1a4db5);
    color: #ffffff;
    font-size: 10px;
    font-family: Tahoma, Verdana, sans-serif;
    font-weight: bold;
    padding: 4px 12px;
    border-bottom: 1px solid #3d7ae8;
    letter-spacing: 0.3px;
}

body.xp-warp header::after {
    content: "🔔 Updates available  |  💬 You have 3 messages in Inbox  |  🛡️ Windows Firewall is ON";
    display: block;
    background: #fffbe6;
    color: #333;
    font-size: 10px;
    font-family: Tahoma, Verdana, 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.xp-warp #container {
    max-width: 900px;
    margin: 0 auto;
    background: #3a6ea5;
}

/* ---- PANELS (XP window chrome) ---- */
body.xp-warp .panel {
    background: #ece9d8;
    border: 2px outset #c0c0c0;
    border-top-color: #f8f8f8;
    border-left-color: #f8f8f8;
    border-right-color: #808080;
    border-bottom-color: #808080;
    padding: 8px;
    margin-bottom: 4px;
    font-family: Tahoma, Verdana, sans-serif;
    font-size: 11px;
}

body.xp-warp .panel h3 {
    background: linear-gradient(to right, #1f5fb5 0%, #3d95e8 50%, #1f5fb5 100%);
    color: #ffffff;
    font-family: Tahoma, Verdana, sans-serif;
    font-size: 11px;
    font-weight: bold;
    padding: 3px 8px;
    margin: -8px -8px 8px -8px;
    border-bottom: 3px solid #7fc7e8;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-radius: 0;
}

body.xp-warp .panel h2 {
    background: linear-gradient(to right, #1f5fb5 0%, #3d95e8 50%, #1f5fb5 100%);
    color: #ffffff;
    font-family: Tahoma, Verdana, sans-serif;
    font-size: 12px;
    font-weight: bold;
    padding: 4px 8px;
    margin: -8px -8px 10px -8px;
    border-bottom: 3px solid #2ad400;
}

/* ---- STATUS PANEL ---- */
body.xp-warp #status-panel {
    background: linear-gradient(to bottom, #dce8f8, #c8daf0);
    border: 2px outset #c0c0c0;
    border-top-color: #f8f8f8;
    border-left-color: #f8f8f8;
}

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

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

/* ---- BUTTONS (XP Luna raised style) ---- */
body.xp-warp .action-btn {
    background: linear-gradient(to bottom, #f6f6f6 0%, #e3e3e3 50%, #d4d4d4 100%);
    border: 2px outset #a0b8d8;
    border-top-color: #ffffff;
    border-left-color: #ffffff;
    border-radius: 3px;
    color: #003399;
    font-family: Tahoma, Verdana, sans-serif;
    font-size: 11px;
    font-weight: bold;
    padding: 3px 10px;
    cursor: pointer;
    min-width: 80px;
    text-align: center;
}

body.xp-warp .action-btn:hover {
    background: linear-gradient(to bottom, #daeaff 0%, #b8d4ff 100%);
    border-color: #0054e3;
    color: #0033cc;
}

body.xp-warp .action-btn:active {
    border: 2px inset #808080;
    background: #c8dcff;
}

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

body.xp-warp .upgrade-btn {
    background: linear-gradient(to bottom, #f6f6f6 0%, #e3e3e3 50%, #d4d4d4 100%);
    border: 2px outset #a0b8d8;
    border-top-color: #ffffff;
    border-left-color: #ffffff;
    border-radius: 3px;
    color: #003399;
    font-family: Tahoma, Verdana, sans-serif;
    font-size: 10px;
    padding: 2px 7px;
    cursor: pointer;
    margin-left: 4px;
}

body.xp-warp .upgrade-btn:hover:not(:disabled) {
    background: linear-gradient(to bottom, #daeaff, #b8d4ff);
    border-color: #0054e3;
    color: #0033cc;
}

body.xp-warp .upgrade-btn:disabled {
    background: #d4d0c8;
    color: #808080;
    cursor: not-allowed;
    opacity: 1;
}

body.xp-warp .settings-btn {
    background: linear-gradient(to bottom, #f6f6f6 0%, #e3e3e3 50%, #d4d4d4 100%);
    border: 2px outset #a0b8d8;
    border-top-color: #ffffff;
    border-left-color: #ffffff;
    border-radius: 3px;
    color: #003399;
    font-family: Tahoma, Verdana, sans-serif;
    font-size: 11px;
    padding: 3px 10px;
    cursor: pointer;
    margin-right: 4px;
    margin-bottom: 4px;
}

body.xp-warp .settings-btn:hover {
    background: linear-gradient(to bottom, #daeaff, #b8d4ff);
    border-color: #0054e3;
    color: #0033cc;
}

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

body.xp-warp .upgrade-name {
    color: #003399;
    font-weight: bold;
    font-size: 11px;
}

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

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

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

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

/* ---- MAP NODE BUTTONS & CONNECTORS ---- */
body.xp-warp .map-btn {
    min-width: 160px;
    white-space: nowrap;
}

body.xp-warp .map-conn {
    color: #003399;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    font-weight: bold;
}

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

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

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

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

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

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

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

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

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

/* ---- FOOTER ---- */
body.xp-warp footer {
    background: linear-gradient(to bottom, #1254a0, #0e3a80);
    color: #b8d8ff;
    border-top: 3px solid #2ad400;
    padding: 6px 12px;
    font-size: 10px;
    text-align: center;
}

body.xp-warp footer::before {
    content: "© 2010 Candy Box 3 Corporation. All rights reserved. | Privacy Policy | Terms of Use | Help";
    display: block;
    color: #b8d8ff;
    font-size: 10px;
    margin-bottom: 4px;
}

/* ---- ANIMATED TICKER ---- */
body.xp-warp #container::before {
    content: "🟢 Candy Box 3 is running normally  |  ⚔️ New monsters discovered in the forest  |  🏆 Top player: YOU  |  ⬆️ Version 3.0.1 is available";
    display: block;
    background: linear-gradient(to right, #0e4488, #1a6fc4, #0e4488);
    color: #ffffff;
    font-size: 10px;
    font-family: Tahoma, Verdana, sans-serif;
    padding: 3px 8px;
    border-bottom: 1px solid #2ad400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    animation: xp-marquee 20s linear infinite;
}

@keyframes xp-marquee {
    0%   { letter-spacing: 0px; }
    50%  { letter-spacing: 0.15px; }
    100% { letter-spacing: 0px; }
}

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

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

/* ---- SPECIAL BADGE on Warp to 2010s button ---- */
body.xp-warp [data-action="toggle-time-warp-2"] {
    background: linear-gradient(to bottom, #3aaa20, #287a10);
    border: 2px outset #5acc30;
    border-top-color: #88ff60;
    border-left-color: #88ff60;
    border-radius: 3px;
    color: #ffffff;
    font-weight: bold;
    text-shadow: 1px 1px 1px #000;
    animation: xp-pulse 2s ease-in-out infinite;
}

@keyframes xp-pulse {
    0%, 100% { box-shadow: 0 0 4px #2ad400; }
    50%       { box-shadow: 0 0 10px #55ff00, 0 0 20px #2ad400; }
}

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

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

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

/* ============================================================
   XP WARP + DARK MODE — Newgrounds 2011 palette
   Bold orange on near-black. Activated by body.xp-warp.dark-mode
   ============================================================ */

body.xp-warp.dark-mode {
    background-color: #111111;
    color: #dddddd;
    font-family: Arial, Tahoma, sans-serif;
}

body.xp-warp.dark-mode #container {
    background: #191919;
}

body.xp-warp.dark-mode #container::before {
    background: linear-gradient(to right, #1a1a1a, #222222, #1a1a1a);
    color: #ff6600;
    border-bottom-color: #333333;
    font-family: Arial, sans-serif;
}

/* NG-style orange header */
body.xp-warp.dark-mode header {
    background: linear-gradient(to bottom, #cc4400 0%, #993300 100%);
    border-bottom: 2px solid #ff6600;
}

body.xp-warp.dark-mode header::before {
    content: "🔥 Audio Portal  |  Art  |  Movies  |  Games  |  🏆 Top Rated  |  Scouting  |  Login";
    background: #1a1a1a;
    color: #ff6600;
    border-bottom: 1px solid #333333;
    font-family: Arial, sans-serif;
    font-weight: bold;
}

body.xp-warp.dark-mode header::after {
    background: #1e1e1e;
    color: #ff9933;
    border-top-color: #333333;
    border-bottom-color: #333333;
    font-family: Arial, sans-serif;
}

body.xp-warp.dark-mode header h1 {
    color: #ffffff;
    text-shadow: 1px 1px 3px #000, 0 0 8px #cc4400;
}

body.xp-warp.dark-mode header p {
    color: #ffaa66;
}

/* ---- PANELS ---- */
body.xp-warp.dark-mode .panel {
    background: #1e1e1e;
    border: 1px solid #444444;
    border-radius: 0;
    color: #dddddd;
}

body.xp-warp.dark-mode .panel h3 {
    background: #ff6600;
    color: #000000;
    border-bottom: 2px solid #cc4400;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

body.xp-warp.dark-mode .panel h2 {
    background: #ff6600;
    color: #000000;
    border-bottom: 2px solid #cc4400;
}

/* ---- STATUS PANEL ---- */
body.xp-warp.dark-mode #status-panel {
    background: #1a1a1a;
    border: 1px solid #444444;
}

body.xp-warp.dark-mode .stat-row {
    border-bottom: 1px solid #333333;
    color: #dddddd;
}

body.xp-warp.dark-mode .stat-label {
    color: #ff6600;
    font-weight: bold;
    text-transform: uppercase;
}

/* ---- BUTTONS (NG orange style) ---- */
body.xp-warp.dark-mode .action-btn {
    background: linear-gradient(to bottom, #ff8000, #cc4400);
    border: 1px solid #ff6600;
    border-radius: 2px;
    color: #ffffff;
    font-family: Arial, Tahoma, sans-serif;
    font-weight: bold;
    font-size: 11px;
    padding: 3px 10px;
    cursor: pointer;
    min-width: 80px;
    text-align: center;
    text-shadow: 1px 1px 1px #000;
}

body.xp-warp.dark-mode .action-btn:hover {
    background: linear-gradient(to bottom, #ff9933, #e05000);
    box-shadow: 0 0 6px #ff6600;
    color: #ffffff;
    text-decoration: underline;
}

body.xp-warp.dark-mode .action-btn:active {
    background: linear-gradient(to bottom, #cc4400, #ff8000);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.5);
}

body.xp-warp.dark-mode .action-btn:disabled {
    background: #333333;
    color: #666666;
    border-color: #444444;
    cursor: not-allowed;
    box-shadow: none;
    opacity: 1;
}

body.xp-warp.dark-mode .upgrade-btn {
    background: linear-gradient(to bottom, #ff8000, #cc4400);
    border: 1px solid #ff6600;
    border-radius: 2px;
    color: #ffffff;
    font-family: Arial, Tahoma, sans-serif;
    font-size: 10px;
    padding: 2px 7px;
    cursor: pointer;
    margin-left: 4px;
    text-shadow: 1px 1px 1px #000;
}

body.xp-warp.dark-mode .upgrade-btn:hover:not(:disabled) {
    background: linear-gradient(to bottom, #ff9933, #e05000);
    box-shadow: 0 0 6px #ff6600;
    text-decoration: underline;
}

body.xp-warp.dark-mode .upgrade-btn:disabled {
    background: #333333;
    color: #666666;
    border-color: #444444;
    cursor: not-allowed;
    opacity: 1;
}

body.xp-warp.dark-mode .settings-btn {
    background: linear-gradient(to bottom, #ff8000, #cc4400);
    border: 1px solid #ff6600;
    border-radius: 2px;
    color: #ffffff;
    font-family: Arial, Tahoma, sans-serif;
    font-size: 11px;
    padding: 3px 10px;
    cursor: pointer;
    margin-right: 4px;
    margin-bottom: 4px;
    text-shadow: 1px 1px 1px #000;
}

body.xp-warp.dark-mode .settings-btn:hover {
    background: linear-gradient(to bottom, #ff9933, #e05000);
    box-shadow: 0 0 6px #ff6600;
    text-decoration: underline;
}

/* ---- UPGRADE ITEMS ---- */
body.xp-warp.dark-mode .upgrade-item {
    background: #222222;
    border-left: 3px solid #ff6600;
    padding: 4px 4px 4px 8px;
    margin-bottom: 4px;
}

body.xp-warp.dark-mode .upgrade-name {
    color: #ff9933;
    font-weight: bold;
}

body.xp-warp.dark-mode .upgrade-cost {
    color: #888888;
}

/* ---- LINKS / CLICKABLE ---- */
body.xp-warp.dark-mode .clickable {
    color: #ff6600;
    text-decoration: underline;
    cursor: pointer;
}

body.xp-warp.dark-mode .clickable:hover {
    color: #ffaa33;
    background-color: transparent;
}

body.xp-warp.dark-mode .locked {
    color: #555555;
    font-style: italic;
}

/* ---- MAP NODE BUTTONS & CONNECTORS ---- */
body.xp-warp.dark-mode .map-conn {
    color: #ff6600;
}

/* ---- MAP VIEW ---- */
body.xp-warp.dark-mode #asciiMap {
    background: #111111;
    border: 1px solid #ff6600;
    color: #ff9933;
}

/* ---- MONSTER SELECT ---- */
body.xp-warp.dark-mode #monster-select-panel select,
body.xp-warp.dark-mode select {
    background: #222222;
    border: 1px solid #ff6600;
    color: #dddddd;
}

/* ---- COMBAT DISPLAY (NG-style orange terminal) ---- */
body.xp-warp.dark-mode #combat-display {
    background: #0d0d0d;
    border: 1px solid #ff6600;
    color: #ff6600;
    font-family: 'Courier New', monospace;
}

/* ---- INVENTORY ---- */
body.xp-warp.dark-mode .inventory-item {
    border-bottom: 1px solid #333333;
    color: #dddddd;
}

body.xp-warp.dark-mode .inventory-item::before {
    content: "► ";
    color: #ff6600;
}

/* ---- COLOSSEUM ---- */
body.xp-warp.dark-mode #colosseum-buffs-display {
    background: #111111;
    border: 1px solid #ff6600;
    color: #ff9933;
}

body.xp-warp.dark-mode #buffChoices {
    background: #1a1000;
    border: 2px solid #ff6600;
    color: #dddddd;
}

/* ---- LOG PANEL ---- */
body.xp-warp.dark-mode .log-entry {
    font-size: 10px;
    color: #bbbbbb;
    border-bottom: 1px solid #333333;
    padding: 1px 0 1px 4px;
}

body.xp-warp.dark-mode .log-entry::before {
    content: "► ";
    color: #ff6600;
}

/* ---- PRE / ASCII ART ---- */
body.xp-warp.dark-mode pre {
    background: #111111;
    border: 1px solid #333333;
    color: #ff9933;
}

/* ---- FOOTER ---- */
body.xp-warp.dark-mode footer {
    background: #111111;
    color: #ff6600;
    border-top: 2px solid #ff6600;
    padding: 6px 12px;
    font-size: 10px;
    text-align: center;
}

body.xp-warp.dark-mode footer::before {
    content: "© 2011 Newgrounds.com | Privacy | Terms | Advertise | About NG | API";
    display: block;
    color: #ff6600;
    font-size: 10px;
    margin-bottom: 4px;
}

/* ---- SCROLLBAR (slim dark style) ---- */
body.xp-warp.dark-mode ::-webkit-scrollbar { width: 12px; }
body.xp-warp.dark-mode ::-webkit-scrollbar-track {
    background: #1a1a1a;
}
body.xp-warp.dark-mode ::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #cc4400, #993300);
    border: 1px solid #ff6600;
}

/* ---- SPECIAL BADGE on Warp button in dark NG mode ---- */
body.xp-warp.dark-mode [data-action="toggle-time-warp-2"] {
    background: linear-gradient(to bottom, #cc4400, #882200);
    border: 1px solid #ff6600;
    color: #ffffff;
    animation: ng-pulse 2s ease-in-out infinite;
}

@keyframes ng-pulse {
    0%, 100% { box-shadow: 0 0 4px #cc4400; }
    50%       { box-shadow: 0 0 12px #ff6600, 0 0 24px #cc4400; }
}
