:root {
    /* Premium Summer & Cobblemon Vibe Palette */
    --bg-sky: #87CEEB;
    --glass-bg: rgba(255, 255, 255, 0.82);
    --glass-border: rgba(255, 255, 255, 0.6);
    --text-main: #1e293b;
    --text-muted: #64748b;
    
    /* Semantic Colors */
    --success: #10b981;
    --success-hover: #059669;
    --warning: #f59e0b;
    --warning-hover: #d97706;
    --danger: #ef4444;
    --danger-hover: #dc2626;
    
    /* Layout & Shadow */
    --radius-lg: 20px;
    --radius-md: 12px;
    --shadow-premium: 0 10px 30px -5px rgba(0, 0, 0, 0.08), 0 4px 12px -2px rgba(0, 0, 0, 0.03);
    --font-sans: 'Fredoka', sans-serif;
    --font-mono: 'Menlo', 'Monaco', 'Courier New', monospace;
}

/* --------------------------------- */
/* RESET & COMMON STYLES             */
/* --------------------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-sky);
    color: var(--text-main);
    min-height: 100vh;
    font-family: var(--font-sans);
    background-image: url('bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* --------------------------------- */
/* LOGIN BODY - HACKER TERMINAL VIBE */
/* --------------------------------- */
body.login-body {
    background: #020617; 
    background-image: none;
    color: #22c55e;
    font-family: 'VT323', monospace;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.terminal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.2),
        rgba(0, 0, 0, 0.2) 2px,
        transparent 2px,
        transparent 4px
    );
    pointer-events: none;
    z-index: 10;
}

.hacker-container {
    width: 90%;
    max-width: 500px;
    padding: 40px;
    border: 2px solid #22c55e;
    border-radius: 4px;
    background: rgba(2, 6, 23, 0.95);
    box-shadow: 0 0 30px rgba(34, 197, 94, 0.15), inset 0 0 15px rgba(34, 197, 94, 0.05);
    position: relative;
    z-index: 20;
}

.terminal-header-top {
    font-size: 26px;
    margin-bottom: 24px;
    border-bottom: 2px solid #22c55e;
    padding-bottom: 12px;
    display: flex;
    justify-content: space-between;
    letter-spacing: 1.5px;
}

.blinking-cursor {
    animation: blink 0.8s step-end infinite;
    font-weight: bold;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.typewriter-text p {
    font-size: 20px;
    margin-bottom: 12px;
    color: #4ade80;
    text-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
    letter-spacing: 1px;
}

.error-msg {
    margin: 20px 0;
    padding: 12px;
    border: 2px dashed #ef4444;
    color: #ef4444;
    font-size: 20px;
    text-align: center;
    text-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
    background: rgba(239, 68, 68, 0.05);
}

.hacker-form {
    margin-top: 30px;
}

.terminal-line {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
}

.terminal-line .prompt {
    font-size: 24px;
    margin-right: 15px;
    color: #22c55e;
    font-weight: bold;
    user-select: none;
}

.terminal-line input {
    flex: 1;
    background: transparent;
    border: none;
    border-bottom: 2px dashed #22c55e;
    color: #22c55e;
    font-size: 24px;
    font-family: 'VT323', monospace;
    outline: none;
    padding: 4px 8px;
    letter-spacing: 2px;
}

.terminal-line input:focus {
    background: rgba(34, 197, 94, 0.05);
    border-bottom-style: solid;
}

.hacker-btn {
    background: transparent;
    border: 2px solid #22c55e;
    color: #22c55e;
    font-size: 24px;
    font-family: 'VT323', monospace;
    cursor: pointer;
    padding: 6px 20px;
    transition: all 0.2s ease;
    text-shadow: 0 0 5px #22c55e;
    width: 100%;
    margin-top: 10px;
    letter-spacing: 2px;
}

.hacker-btn:hover {
    background: #22c55e;
    color: #020617;
    text-shadow: none;
    box-shadow: 0 0 15px rgba(34, 197, 94, 0.4);
}


/* --------------------------------- */
/* APP STRUCTURE & LAYOUT            */
/* --------------------------------- */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 2px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-premium);
}

.app-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 40px 24px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    padding: 18px 32px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 14px;
}

.header-icon {
    width: 28px;
    height: 28px;
    color: #f59e0b; /* Golden accent */
}

.logo h1 {
    font-family: 'Press Start 2P', cursive;
    font-size: 14px;
    color: var(--text-main);
    letter-spacing: 0.5px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 15px;
    background: rgba(255, 255, 255, 0.6);
    padding: 8px 18px;
    border-radius: 50px;
    border: 1px solid var(--glass-border);
    user-select: none;
}

#statusText {
    transition: color 0.3s;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--danger);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
    border: 2px solid white;
    transition: all 0.3s;
}

.status-dot.online {
    background: var(--success);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1.15); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.btn-logout {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.08);
    padding: 8px 16px;
    border-radius: 50px;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.btn-logout svg {
    width: 16px;
    height: 16px;
}

.btn-logout:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    color: var(--danger);
}


/* --------------------------------- */
/* DASHBOARD GRID & RESPONSIVENESS   */
/* --------------------------------- */
.dashboard-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 28px;
}

/* Control Center Panel */
.control-center {
    padding: 30px 24px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.section-title h2 {
    font-family: 'Press Start 2P', cursive;
    font-size: 11px;
    color: var(--text-main);
    margin-bottom: 6px;
}

.section-title p {
    font-size: 13px;
    color: var(--text-muted);
}

.actions-group {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.btn-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 52px;
    width: 100%;
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.btn-icon {
    width: 18px;
    height: 18px;
}

.btn-start {
    background: var(--success);
    color: white;
}
.btn-start:hover:not(:disabled) {
    background: var(--success-hover);
    transform: translateY(-1px);
}

.btn-stop {
    background: var(--warning);
    color: white;
}
.btn-stop:hover:not(:disabled) {
    background: var(--warning-hover);
    transform: translateY(-1px);
}

.btn-kill {
    background: transparent;
    border: 2px solid var(--danger);
    color: var(--danger);
    box-shadow: none;
}
.btn-kill:hover:not(:disabled) {
    background: var(--danger);
    color: white;
    transform: translateY(-1px);
}

.btn-action:active:not(:disabled) {
    transform: translateY(1px);
}

.btn-action:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

.server-meta {
    border-top: 1px solid rgba(0,0,0,0.06);
    padding-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.meta-item {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
}

.meta-label {
    color: var(--text-muted);
}

.meta-value {
    font-weight: 600;
}

/* Prank Roulette Styles */
.mischief-panel {
    border-top: 1px solid rgba(0,0,0,0.06);
    padding-top: 24px;
}

.mischief-panel h3 {
    font-family: 'Press Start 2P', cursive;
    font-size: 10px;
    color: var(--text-main);
    margin-bottom: 14px;
}

.roulette-box {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.roulette-screen {
    background: #0f172a; /* Sleek dark screen background */
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: 16px;
    font-family: var(--font-sans);
    color: white;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.roulette-screen::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(
        rgba(18, 16, 16, 0) 50%, 
        rgba(0, 0, 0, 0.25) 50%
    ), linear-gradient(
        90deg, 
        rgba(255, 0, 0, 0.06), 
        rgba(0, 255, 0, 0.02), 
        rgba(0, 0, 255, 0.06)
    );
    background-size: 100% 4px, 6px 100%;
    pointer-events: none;
}

.screen-label {
    font-size: 10px;
    font-family: 'Press Start 2P', cursive;
    color: #64748b;
    letter-spacing: 0.5px;
}

.screen-player {
    font-size: 20px;
    font-weight: 700;
    color: #38bdf8; /* sky blue player name */
    text-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
    min-height: 30px;
    display: flex;
    align-items: center;
    transition: transform 0.1s;
}

.screen-prank {
    font-size: 15px;
    font-weight: 600;
    color: #fb7185; /* rose prank text */
    text-shadow: 0 0 10px rgba(251, 113, 133, 0.4);
    min-height: 24px;
    display: flex;
    align-items: center;
    transition: transform 0.1s;
}

/* Spin Button Styling */
.btn-spin {
    background: linear-gradient(135deg, #ec4899, #8b5cf6); /* Pink to Purple */
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(236, 72, 153, 0.3);
}

.btn-spin:hover:not(:disabled) {
    background: linear-gradient(135deg, #db2777, #7c3aed);
    box-shadow: 0 6px 20px rgba(236, 72, 153, 0.4);
    transform: translateY(-1px);
}

.btn-spin:active:not(:disabled) {
    transform: translateY(1px);
}

.btn-spin svg {
    animation: spin-icon 6s linear infinite;
}

@keyframes spin-icon {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Animations during Roulette Spin */
.spinning-active .screen-player, 
.spinning-active .screen-prank {
    filter: blur(1.5px);
    transform: scale(0.95);
    color: #e2e8f0;
}

.roulette-screen.landed {
    background: #064e3b; /* Succesful land color (emerald) */
    border-color: #10b981;
    animation: land-flash 0.3s ease-in-out 3;
}

.roulette-screen.landed .screen-player {
    color: #34d399; /* Green success */
    text-shadow: 0 0 15px rgba(52, 211, 153, 0.8);
    transform: scale(1.05);
}

.roulette-screen.landed .screen-prank {
    color: #fcd34d; /* Golden success */
    text-shadow: 0 0 15px rgba(252, 211, 77, 0.8);
    transform: scale(1.05);
}

@keyframes land-flash {
    0%, 100% { border-color: rgba(255, 255, 255, 0.1); }
    50% { border-color: #10b981; box-shadow: 0 0 15px rgba(16, 185, 129, 0.4); }
}


/* --------------------------------- */
/* TERMINAL & CONSOLE COMPONENT      */
/* --------------------------------- */
.terminal-section {
    display: flex;
    flex-direction: column;
    height: 70vh;
    overflow: hidden;
}

.terminal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    background: rgba(255, 255, 255, 0.4);
    user-select: none;
}

.terminal-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Press Start 2P', cursive;
    font-size: 10px;
    color: var(--text-muted);
}

.title-icon {
    width: 16px;
    height: 16px;
}

.terminal-tools {
    display: flex;
    gap: 10px;
}

.btn-tool {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: white;
    border: 1px solid rgba(0,0,0,0.1);
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-family: var(--font-sans);
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-tool svg {
    width: 14px;
    height: 14px;
    color: var(--text-muted);
}

.btn-tool:hover {
    background: #f8fafc;
    border-color: rgba(0,0,0,0.15);
}

.btn-tool-disabled {
    color: var(--danger) !important;
    border-color: rgba(239, 68, 68, 0.3) !important;
}

.btn-tool-disabled svg {
    color: var(--danger) !important;
}

.terminal-output {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    font-family: var(--font-mono);
    font-size: 13.5px;
    line-height: 1.6;
    color: #334155;
    background: rgba(255, 255, 255, 0.45);
}

/* Custom Scrollbar for Terminal */
.terminal-output::-webkit-scrollbar {
    width: 8px;
}
.terminal-output::-webkit-scrollbar-track {
    background: transparent;
}
.terminal-output::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}
.terminal-output::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.2);
}

/* Console Log Formatting */
.log-line {
    padding: 2px 0;
    white-space: pre-wrap;
    word-break: break-all;
    border-bottom: 1px solid rgba(0, 0, 0, 0.02);
}

.log-warn {
    color: #b45309;
    background: rgba(245, 158, 11, 0.05);
}

.log-error {
    color: #b91c1c;
    background: rgba(239, 68, 68, 0.05);
}

.log-system {
    color: #047857;
    background: rgba(16, 185, 129, 0.05);
    font-weight: 600;
}

.terminal-input {
    display: flex;
    padding: 16px 24px;
    background: rgba(255, 255, 255, 0.75);
    border-top: 1px solid rgba(0,0,0,0.06);
    align-items: center;
    gap: 12px;
}

.terminal-input .prompt {
    display: flex;
    align-items: center;
    color: var(--success);
}

.terminal-input .prompt svg {
    width: 18px;
    height: 18px;
}

.terminal-input input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-family: var(--font-mono);
    font-size: 14px;
    outline: none;
    font-weight: 500;
}

.terminal-input input::placeholder {
    color: #94a3b8;
}


/* --------------------------------- */
/* ADAPTIVE DESIGN (MEDIA QUERIES)   */
/* --------------------------------- */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .control-center {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 20px;
    }
    
    .section-title {
        display: none; /* Hide description on tablets/mobile to save space */
    }
    
    .actions-group {
        flex-direction: row;
        width: 100%;
        max-width: 600px;
    }
    
    .server-meta {
        border-top: none;
        padding-top: 0;
        min-width: 200px;
    }
}

@media (max-width: 768px) {
    .app-container {
        padding: 20px 12px;
    }
    
    header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
        padding: 20px;
    }
    
    .header-right {
        width: 100%;
        justify-content: space-between;
    }
    
    .control-center {
        flex-direction: column;
        align-items: stretch;
    }
    
    .actions-group {
        flex-direction: column;
        width: 100%;
    }
    
    .server-meta {
        border-top: 1px solid rgba(0,0,0,0.06);
        padding-top: 16px;
    }
    
    .terminal-section {
        height: 60vh;
    }
    
    .terminal-tools span {
        display: none; /* Hide text on tools to only show icons */
    }
}
