/* ==========================================================================
   mc.mazol.com — style główne
   ========================================================================== */

/* --- Zmienne --- */
:root {
    --accent: #00f2ff;
    --glass: rgba(255, 255, 255, 0.05);
    --border: rgba(255, 255, 255, 0.1);
}

/* --- Globalne (body, html) --- */
body, html {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Roboto, sans-serif;
    background: #050505;
    color: white;
    overflow-x: hidden;
    overflow-y: auto;
}

/* --- Tło animowane --- */
.bg-animate {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #050505, #0a1128, #001f3f, #050505);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    z-index: -1;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* --- Główny panel (glass-panel) --- */
.glass-panel {
    background: var(--glass);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    isolation: isolate;
    border: 1px solid var(--border);
    border-radius: 30px;
    padding: 60px;
    width: 90%;
    max-width: 900px;
    text-align: center;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    margin: 80px auto;
    position: relative;
}

.header h1 {
    font-size: 3.2rem;
    margin: 0;
    font-weight: 800;
    letter-spacing: 2px;
    background: linear-gradient(to bottom, #fff, #aaa);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hostname {
    color: #888;
    font-family: monospace;
    font-size: 1.1rem;
    margin-top: 10px;
    letter-spacing: 1px;
    margin-bottom: 25px;
}

.subtitle {
    color: var(--accent);
    font-weight: 700;
    letter-spacing: 4px;
    margin-top: 5px;
    font-size: 1.2rem;
    text-transform: uppercase;
}

.divider {
    height: 1px;
    width: 120px;
    background: var(--accent);
    margin: 30px auto;
    box-shadow: 0 0 15px var(--accent);
}

.services {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    margin-top: 40px;
    gap: 20px;
}

.service-item {
    flex: 1;
    min-width: 200px;
    padding: 25px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
    transition: 0.4s;
}

.service-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent);
    transform: translateY(-5px);
}

.service-item i {
    font-size: 2.2rem;
    color: var(--accent);
    margin-bottom: 15px;
    text-shadow: 0 0 15px var(--accent);
}

.service-item h3 { font-size: 1.1rem; margin: 10px 0; font-weight: 600; }
.service-item p { font-size: 0.85rem; color: #aaa; line-height: 1.4; }

.terminal-footer {
    margin-top: 50px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.85rem;
    color: var(--accent);
    background: rgba(0, 0, 0, 0.3);
    padding: 12px 25px;
    border-radius: 10px;
    border-left: 3px solid var(--accent);
    display: inline-block;
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.1);
}

.status-online {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #00ff88;
    border-radius: 50%;
    margin-right: 12px;
    box-shadow: 0 0 10px #00ff88;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.4; }
    100% { opacity: 1; }
}

/* --- Moduły terminalowe (panel mapy BlueMap) --- */
.panel-map,
.panel-map:link,
.panel-map:visited {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    width: 90%;
    max-width: 900px;
    margin: 0 auto 50px auto;
    padding: 12px 25px;
    min-height: 2.5rem;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.85rem;
    color: var(--accent);
    text-align: center;
    text-decoration: none;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 10px;
    border-left: 3px solid var(--accent);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    isolation: isolate;
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.1);
    transition: 0.2s;
}

.panel-map:hover {
    background: rgba(0, 0, 0, 0.35);
    box-shadow: 0 0 22px rgba(0, 242, 255, 0.25);
}

/* --- Dashboard statystyk (.framestats, karty metryk) --- */
.framestats {
    display: block;
    clear: both;
    width: 90%;
    max-width: 1200px;
    margin: 0 auto 80px auto;
    padding: 25px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 25px;
    border: 1px solid var(--border);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    isolation: isolate;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.7);
}

.framestats h2 {
    font-family: 'Segoe UI', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0 0 20px 0;
    padding-bottom: 16px;
    background: linear-gradient(135deg, #fff 0%, #2ecc71 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #fff;
    filter: drop-shadow(0 0 15px rgba(46, 204, 113, 0.4));
}

.framestats h2 i {
    color: #2ecc71;
    -webkit-text-fill-color: #2ecc71;
    text-shadow: 0 0 12px rgba(46, 204, 113, 0.5);
    animation: pulse 2s ease-in-out infinite;
}

.framestats h2::after {
    content: '';
    display: block;
    width: 100%;
    height: 1px;
    margin-top: 15px;
    background: linear-gradient(to right, transparent 0%, rgba(46, 204, 113, 0.5) 50%, transparent 100%);
}

@media (max-width: 768px) {
    .framestats h2 {
        font-size: 1.15rem;
        letter-spacing: 1px;
    }
}

.time-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    font-family: 'Courier New', Courier, monospace;
}

.time-selector button {
    padding: 8px 16px;
    font-family: inherit;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s;
}

.time-selector button:hover {
    background: rgba(0, 0, 0, 0.45);
    border-color: var(--accent);
    color: var(--accent);
}

.time-selector button.active {
    background: rgba(0, 242, 255, 0.12);
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 0 12px rgba(0, 242, 255, 0.2);
}

.metrics-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.chart-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    font-family: 'Courier New', Courier, monospace;
}

.chart-controls .toggle-btn {
    padding: 8px 14px;
    font-family: inherit;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid;
    border-radius: 8px;
    cursor: pointer;
    transition: opacity 0.2s, box-shadow 0.2s;
}

.chart-controls .toggle-btn:not(.active) {
    opacity: 0.5;
}

.chart-controls .toggle-btn.active {
    box-shadow: 0 0 12px currentColor;
}

.chart-controls .toggle-btn[data-dataset="0"] { border-color: #3498db; color: #3498db; }
.chart-controls .toggle-btn[data-dataset="1"] { border-color: #2ecc71; color: #2ecc71; }
.chart-controls .toggle-btn[data-dataset="2"] { border-color: #9b59b6; color: #9b59b6; }
.chart-controls .toggle-btn[data-dataset="3"] { border-color: #e67e22; color: #e67e22; }
.chart-controls .toggle-btn[data-dataset="4"] { border-color: #f1c40f; color: #f1c40f; }

@media (max-width: 768px) {
    .metrics-container {
        grid-template-columns: 1fr;
    }
}

.metric-card {
    padding: 15px;
    font-family: 'Courier New', Courier, monospace;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    border-left: 4px solid;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.metric-card .metric-label {
    display: block;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.metric-card .metric-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
}

.metric-card .metric-icon {
    margin-right: 6px;
    font-size: 1rem;
}

.metric-card-players { border-left-color: #3498db; }
.metric-card-cpu     { border-left-color: #2ecc71; }
.metric-card-ram     { border-left-color: #9b59b6; }
.metric-card-tps     { border-left-color: #e67e22; }
.metric-card-mspt    { border-left-color: #1abc9c; }

.metric-card .metric-sub {
    display: block;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 4px;
    line-height: 1.3;
}

/* Ikona pomocy i chmurka tooltip (ZADANIE-NR-20260302-12-FixedTooltips) */
.metric-card {
    position: relative;
}

.metric-card .info-icon {
    margin-left: 6px;
    font-size: 0.85rem;
    opacity: 0.6;
    cursor: pointer;
    transition: opacity 0.2s, color 0.2s, text-shadow 0.2s;
}

.metric-card .info-icon:hover,
.metric-card .info-icon:focus { opacity: 1; }

.metric-card-tps .info-icon:hover,
.metric-card-tps .info-icon:focus { color: #e67e22; text-shadow: 0 0 8px rgba(230, 126, 34, 0.6); }

.metric-card-mspt .info-icon:hover,
.metric-card-mspt .info-icon:focus { color: #1abc9c; text-shadow: 0 0 8px rgba(26, 188, 156, 0.6); }

.metric-card .metric-label-wrap {
    position: relative;
    display: inline-block;
}

/* Chmurka (tooltip) — ukryta domyślnie, widoczna po hover lub kliku */
.metric-card .tooltip-box {
    display: block;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 100%;
    margin-top: 6px;
    width: 450px;
    max-width: calc(100vw - 24px);
    padding: 20px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.92);
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid #2ecc71;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s, visibility 0.2s;
    z-index: 1000;
}

.metric-card .tooltip-box strong {
    color: #2ecc71;
}

.metric-card .metric-label-wrap:hover .tooltip-box,
.metric-card .tooltip-box.visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
