/* BalzakServer Terminal Style */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --green: #0f0;
    --green-dim: #0a0;
    --green-bright: #5f5;
    --bg: #0a0a0a;
    --bg-light: #111;
}

body {
    font-family: 'Share Tech Mono', 'Courier New', monospace;
    background: var(--bg);
    min-height: 100vh;
    color: var(--green);
    font-size: 18px;
    line-height: 1;
    overflow-x: hidden;
}

/* Scanlines overlay */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.15),
        rgba(0, 0, 0, 0.15) 1px,
        transparent 1px,
        transparent 2px
    );
    z-index: 1000;
}

/* CRT flicker effect */
body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(0,0,0,0.3) 100%);
    z-index: 999;
}

/* Toolbar */
.toolbar {
    background: var(--bg-light);
    border-bottom: 2px solid var(--green-dim);
    padding: 10px 20px;
    display: flex;
    gap: 30px;
    align-items: center;
    font-size: 16px;
}

.toolbar a {
    color: var(--green);
    text-decoration: none;
    padding: 5px 15px;
    border: 1px solid var(--green-dim);
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.toolbar a:hover {
    background: var(--green);
    color: var(--bg);
    box-shadow: 0 0 10px var(--green);
}

.toolbar a.active {
    background: var(--green-dim);
    color: var(--bg);
}

.status-indicator {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--green);
    animation: pulse 2s infinite;
}

.status-dot.offline {
    background: #f00;
    animation: none;
}

@keyframes pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 5px var(--green); }
    50% { opacity: 0.5; box-shadow: 0 0 15px var(--green); }
}

/* Main container */
.container {
    max-width: 95vw;
    margin: 0 auto;
    padding: 20px;
    position: relative;
}

/* Terminal window */
.terminal {
    background: var(--bg-light);
    border: 2px solid var(--green-dim);
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.1);
}

.terminal-header {
    background: var(--green-dim);
    color: var(--bg);
    padding: 8px 15px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.terminal-buttons {
    display: flex;
    gap: 6px;
}

.terminal-btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--bg);
}

.terminal-body {
    padding: 30px;
}

/* Home container */
.home-container {
    display: none;
    padding: 10px;
    max-width: 100vw;
}

.home-container.active {
    display: block;
}

/* Terminal container for other tabs */
.terminal-container {
    display: none;
    max-width: 900px;
}

.terminal-container.active {
    display: block;
}

/* Title */
.title {
    font-size: 48px;
    margin-bottom: 5px;
    text-shadow: 0 0 10px var(--green);
}

.title .cursor {
    animation: blink 1s infinite;
}

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

.subtitle {
    color: var(--green-dim);
    margin-bottom: 40px;
    font-size: 20px;
}

/* Prompt lines */
.prompt {
    margin-bottom: 15px;
}

.prompt::before {
    content: "> ";
    color: var(--green-bright);
}

/* Download button */
.download-section {
    margin: 40px 0;
}

.download-btn {
    display: inline-block;
    padding: 15px 40px;
    font-family: inherit;
    font-size: 22px;
    color: var(--bg);
    background: var(--green);
    border: none;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.download-btn:hover {
    background: var(--green-bright);
    box-shadow: 0 0 30px var(--green);
    transform: scale(1.02);
}

.download-btn::before {
    content: "[ ";
}

.download-btn::after {
    content: " ]";
}

.download-btn.copied {
    background: var(--green-bright);
}

.download-btn.copied::after {
    content: " ] COPIED!";
}

.url-display {
    margin-top: 15px;
    padding: 10px;
    background: var(--bg);
    border: 1px solid var(--green-dim);
    font-size: 14px;
    word-break: break-all;
    color: var(--green-dim);
}

/* Tab content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Home grid layout - fullscreen */
.home-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 10px;
    height: calc(100vh - 80px);
    min-height: 500px;
}

.home-left {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.section-subtitle {
    color: var(--green-dim);
    margin-bottom: 15px;
    font-size: 14px;
}

.home-right {
    display: flex;
    flex-direction: column;
}

/* Mini terminals */
.mini-terminal {
    background: var(--bg-light);
    border: 2px solid var(--green-dim);
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.1);
    display: flex;
    flex-direction: column;
    flex: 1;
}

.mini-terminal .terminal-body {
    padding: 15px;
    flex: 1;
    overflow-y: auto;
}

.map-terminal {
    flex: 1;
}

.map-body {
    padding: 0 !important;
    display: flex;
}

.map-body iframe {
    flex: 1;
    width: 100%;
    height: 100%;
    border: none;
}

/* Responsive */
@media (max-width: 900px) {
    .home-grid {
        grid-template-columns: 1fr;
        height: auto;
    }
    .mini-terminal {
        min-height: 300px;
    }
    .map-terminal {
        min-height: 400px;
    }
}

/* Players list */
.players-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.player-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px;
    border: 1px solid var(--green-dim);
    background: var(--bg);
}

.player-head {
    width: 32px;
    height: 32px;
    image-rendering: pixelated;
}

.player-name {
    font-size: 20px;
}

.no-players {
    color: var(--green-dim);
    font-style: italic;
}

/* Ranking list */
.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ranking-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    border: 1px solid var(--green-dim);
    background: var(--bg);
}

.ranking-position {
    font-size: 24px;
    color: var(--green-bright);
    min-width: 40px;
}

.ranking-item:nth-child(1) .ranking-position { color: #ffd700; }
.ranking-item:nth-child(2) .ranking-position { color: #c0c0c0; }
.ranking-item:nth-child(3) .ranking-position { color: #cd7f32; }

.ranking-name {
    font-size: 20px;
    flex: 1;
}

.ranking-balance {
    font-size: 18px;
    color: var(--green-bright);
}

.ranking-head {
    width: 32px;
    height: 32px;
    image-rendering: pixelated;
}

.ranking-header {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-bottom: 1px solid var(--green-dim);
    margin-bottom: 10px;
    font-size: 14px;
    color: var(--green-dim);
}

.ranking-header-spacer {
    min-width: 40px;
}

.ranking-header-name {
    flex: 1;
    margin-left: 47px;
}

/* Toggle switch */
.toggle-switch {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.toggle-switch input {
    display: none;
}

.toggle-slider {
    width: 40px;
    height: 20px;
    background: var(--bg);
    border: 1px solid var(--green-dim);
    border-radius: 10px;
    position: relative;
    transition: all 0.3s;
}

.toggle-slider::before {
    content: "";
    position: absolute;
    width: 14px;
    height: 14px;
    background: var(--green);
    border-radius: 50%;
    top: 2px;
    left: 3px;
    transition: all 0.3s;
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--green-dim);
}

.toggle-switch input:checked + .toggle-slider::before {
    left: 21px;
}

.toggle-label {
    font-size: 12px;
    min-width: 50px;
}

.toggle-label.inactive {
    color: var(--green-dim);
}

/* Balzak ASCII Art - positioned outside container */
.balzak-decoration {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    font-family: 'VT323', monospace;
    font-size: 10px;
    line-height: 1;
    color: var(--green);
    text-shadow: 0 0 8px var(--green);
    white-space: pre;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.balzak-decoration.left {
    right: calc(50% + 460px);
}

.balzak-decoration.right {
    left: calc(50% + 370px);
}

.balzak-decoration.visible {
    opacity: 1;
    visibility: visible;
}

/* Steps */
.steps {
    margin: 40px 0;
    border-left: 2px solid var(--green-dim);
    padding-left: 20px;
}

.step {
    margin-bottom: 20px;
    position: relative;
}

.step::before {
    content: "";
    position: absolute;
    left: -25px;
    top: 8px;
    width: 10px;
    height: 10px;
    background: var(--green);
    border-radius: 50%;
}

.step-num {
    color: var(--green-bright);
    font-size: 14px;
}

.step-title {
    font-size: 20px;
    margin-bottom: 5px;
}

.step-desc {
    color: var(--green-dim);
}

.step-desc a {
    color: var(--green-bright);
}

.step-desc code {
    background: var(--bg);
    padding: 2px 8px;
    border: 1px solid var(--green-dim);
}

/* Server info */
.server-info {
    margin-top: 40px;
    padding: 20px;
    border: 1px dashed var(--green-dim);
}

.server-info code {
    font-size: 20px;
    color: var(--green-bright);
}

/* Footer */
.footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--green-dim);
    color: var(--green-dim);
    font-size: 14px;
}

/* ASCII art */
.ascii {
    font-size: 10px;
    line-height: 1.1;
    color: var(--green-dim);
    white-space: pre;
    margin-bottom: 20px;
}
