/* =============================================================
   2k6Map - Stylesheet
   Based on Owen2k6 Network Design Language
   ============================================================= */

/* GLOBAL RESET */
*, *:before, *:after { box-sizing: border-box; }

html, body {
    height: 100%;
    margin: 0;
    overflow: hidden;
}

body {
    font-size: 15px;
    line-height: 1.6;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    color: #f2f2f2;
    background-color: #1a1a1a;
    background-image: linear-gradient(to bottom, #181818 0%, #1a1a1a 100%);
    -webkit-text-size-adjust: 100%;
    text-rendering: optimizeLegibility;
}

/* HEADER - Exact match to 2k6Bans */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    width: 100%;
    margin: 0;
    padding: 14px 4%;
    color: #fff;
    background-color: #2b2b2b;
    border-bottom: 2px solid #555;
    background-image: linear-gradient(to bottom, #3b3b3b, #1e1e1e);
    box-shadow: 0 2px 6px rgba(0,0,0,0.6);
    font-family: "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.header-title {
    margin: 0;
    font-size: 1.8em;
    text-shadow: 1px 1px 2px #000;
    font-weight: normal;
}

.header-nav {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.header-nav a {
    color: #a7c7ff;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background 0.2s;
}

.header-nav a:hover {
    background: rgba(255,255,255,0.1);
}

.header-nav a.active {
    background: rgba(255,255,255,0.15);
    color: #fff;
}

/* MAP CONTAINER */
.map-wrapper {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
}

.map-container {
    flex: 1;
    position: relative;
    background-color: #0a0a0a;
}

#mapCanvas {
    width: 100%;
    height: 100%;
    cursor: grab;
}

#mapCanvas:active {
    cursor: grabbing;
}

/* SIDEBAR - Skeuomorphic panel style */
.sidebar {
    width: 320px;
    height: 100%;
    background-color: #1e1e1e;
    border-left: 1px solid #2a2a2a;
    box-shadow: -2px 0 10px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar.hidden {
    display: none;
}

.sidebar-header {
    padding: 16px;
    background-color: #242424;
    border-bottom: 1px solid #444;
    background-image: linear-gradient(145deg, #2e2e2e, #1c1c1c);
    box-shadow: inset 2px 2px 5px #0e0e0e, inset -2px -2px 5px #2e2e2e;
}

.sidebar-header h2 {
    margin: 0 0 12px 0;
    font-size: 1.3em;
    color: #fff;
    text-shadow: 1px 1px 2px #000;
    font-weight: normal;
}

.search-input {
    width: 100%;
    padding: 10px 14px;
    background: #151515;
    border: 1px solid #333;
    border-radius: 4px;
    color: #f2f2f2;
    font-size: 0.95em;
    box-shadow: inset 1px 1px 3px #000;
}

.search-input:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: inset 1px 1px 3px #000, 0 0 5px rgba(0,102,204,0.3);
}

/* TABS */
.sidebar-tabs {
    display: flex;
    background: #1a1a1a;
    border-bottom: 1px solid #333;
}

.sidebar-tabs .tab {
    flex: 1;
    padding: 12px 8px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: #888;
    cursor: pointer;
    font-size: 0.9em;
    font-family: inherit;
    transition: all 0.2s;
}

.sidebar-tabs .tab:hover {
    color: #ccc;
    background: rgba(255,255,255,0.03);
}

.sidebar-tabs .tab.active {
    color: #fff;
    border-bottom-color: #0066cc;
    background: rgba(0,102,204,0.1);
}

/* TAB CONTENT */
.tab-content {
    display: none;
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.tab-content.active {
    display: block;
}

/* LIST ITEMS - Skeuomorphic cards */
.list-item {
    margin: 0 0 10px 0;
    padding: 14px;
    border: 1px solid #444;
    background-color: #242424;
    border-radius: 8px;
    box-shadow: inset 2px 2px 5px #0e0e0e, inset -2px -2px 5px #2e2e2e;
    background-image: linear-gradient(145deg, #2e2e2e, #1c1c1c);
    cursor: pointer;
    transition: all 0.2s;
}

.list-item:hover {
    border-color: #0066cc;
    box-shadow: inset 2px 2px 5px #0e0e0e, inset -2px -2px 5px #2e2e2e, 0 0 8px rgba(0,102,204,0.3);
}

.list-item h4 {
    margin: 0 0 6px 0;
    font-size: 1.05em;
    color: #55ff55;
    font-weight: normal;
    text-shadow: 1px 1px 1px #000;
}

.list-item p {
    margin: 0 0 8px 0;
    font-size: 0.85em;
    color: #999;
}

.list-item .nation-tag {
    color: #ffaa00;
}

.list-item .stats {
    display: flex;
    gap: 16px;
    font-size: 0.8em;
    color: #777;
}

.list-item .stats span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* TOOLTIP */
.tooltip {
    position: fixed;
    background-color: #242424;
    border: 1px solid #0066cc;
    border-radius: 6px;
    padding: 12px 16px;
    pointer-events: none;
    display: none;
    z-index: 500;
    max-width: 250px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.6), inset 1px 1px 2px rgba(255,255,255,0.05);
    background-image: linear-gradient(145deg, #2a2a2a, #1e1e1e);
}

.tooltip h4 {
    margin: 0 0 8px 0;
    color: #55ff55;
    font-size: 1em;
    font-weight: normal;
    text-shadow: 1px 1px 1px #000;
}

.tooltip p {
    margin: 4px 0;
    font-size: 0.85em;
    color: #bbb;
}

.tooltip .nation-tag {
    color: #ffaa00;
}

/* MAP CONTROLS - Skeuomorphic buttons */
.map-controls {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 50;
}

.control-btn {
    width: 40px;
    height: 40px;
    background: linear-gradient(to bottom, #3a3a3a, #252525);
    border: 1px solid #555;
    border-radius: 6px;
    color: #fff;
    font-size: 1.4em;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.4), inset 1px 1px 1px rgba(255,255,255,0.1);
    transition: all 0.15s;
    font-family: inherit;
}

.control-btn:hover {
    background: linear-gradient(to bottom, #4a4a4a, #353535);
    border-color: #666;
}

.control-btn:active {
    background: linear-gradient(to bottom, #252525, #3a3a3a);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.4);
}

/* MAP INFO PANEL */
.map-info {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background-color: #242424;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 12px 16px;
    z-index: 50;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5), inset 2px 2px 5px #0e0e0e, inset -2px -2px 5px #2e2e2e;
    background-image: linear-gradient(145deg, #2e2e2e, #1c1c1c);
}

.info-row {
    display: flex;
    gap: 12px;
    align-items: center;
    font-size: 0.9em;
    color: #ccc;
    margin-bottom: 8px;
}

.info-row:last-child {
    margin-bottom: 0;
}

.separator {
    color: #555;
}

.legend {
    display: flex;
    gap: 16px;
    font-size: 0.8em;
    color: #999;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.colour-box {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    border: 1px solid rgba(255,255,255,0.2);
}

.colour-box.spawn-marker {
    background: #55ff55;
    border-radius: 50%;
    box-shadow: 0 0 4px #55ff55;
}

/* SCROLLBAR - Match other sites */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: #3a3a3a;
    border-radius: 5px;
    border: 2px solid #1a1a1a;
}

::-webkit-scrollbar-thumb:hover {
    background: #4a4a4a;
}

/* LOADING STATE */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100px;
    color: #888;
}

/* NO DATA MESSAGE */
.no-data {
    text-align: center;
    padding: 30px;
    color: #666;
    font-style: italic;
}

/* RESPONSIVE */
@media (max-width: 900px) {
    .sidebar {
        position: absolute;
        right: 0;
        top: 0;
        z-index: 60;
        width: 100%;
        max-width: 350px;
    }
}

@media (max-width: 600px) {
    .header-title {
        font-size: 1.4em;
    }

    .sidebar {
        max-width: 100%;
    }

    .map-info {
        left: 8px;
        right: 8px;
        bottom: 8px;
    }

    .legend {
        flex-wrap: wrap;
        gap: 10px;
    }
}
