/* BIOS-inspired styling */
:root {
    --bios-blue: #0000AA;
    --bios-light-blue: #0055AA;
    --bios-text: #AAAAAA;
    --bios-highlight: #FFFFFF;
    --bios-border: #888888;
    --bios-window: #555555;
    --bios-error: #AA0000;
}

@font-face {
    font-family: 'BIOS';
    src: url('/images/PxPlus_IBM_BIOS.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'BIOS', monospace;
    cursor: none;
}

body, html {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: var(--bios-blue);
    color: var(--bios-text);
    font-size: 16px;
}

#app {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* OS name display */
#os-name {
    position: fixed;
    top: 5px;
    left: 10px;
    color: var(--bios-highlight);
    font-size: 14px;
    z-index: 100;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

/* Custom cursor */
#cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    background-image: url('/images/cursor.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: top left;
    pointer-events: none;
    z-index: 9999;
    transform: none;
}

#loading-cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    background-image: url('/images/loading-cursor.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: top left;
    pointer-events: none;
    z-index: 9999;
    transform: none;
    display: none;
}

/* Window styling */
.window {
    background-color: var(--bios-window);
    border: 2px solid var(--bios-border);
    box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.5);
    width: 400px;
    max-width: 90%;
}

.window-header {
    background-color: var(--bios-blue);
    color: var(--bios-highlight);
    padding: 6px 10px;
    font-weight: bold;
    border-bottom: 2px solid var(--bios-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.window-title {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex: 1;
}

/* Logout link */
.logout-link {
    position: fixed;
    top: 5px;
    right: 10px;
    color: var(--bios-text);
    font-size: 12px;
    cursor: none;
    z-index: 100;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.logout-link:hover {
    color: var(--bios-highlight);
    text-decoration: underline;
}

.window-content {
    padding: 20px;
}

/* Form styling */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: var(--bios-highlight);
}

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 8px;
    background-color: var(--bios-blue);
    border: 1px solid var(--bios-border);
    color: var(--bios-highlight);
    outline: none;
    font-size: 16px;
}

.error-message {
    color: var(--bios-error);
    margin-top: 5px;
    min-height: 20px;
}

.input-hint {
    color: var(--bios-text);
    font-size: 12px;
    margin-top: 4px;
}

button {
    background-color: var(--bios-blue);
    color: var(--bios-highlight);
    border: 1px solid var(--bios-border);
    padding: 8px 16px;
    font-size: 16px;
    cursor: none;
}

button:hover {
    background-color: var(--bios-light-blue);
}

/* Auth styles */
.form-actions {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.form-switch {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
}

.form-switch a {
    color: var(--bios-highlight);
    text-decoration: none;
}

.form-switch a:hover {
    text-decoration: underline;
}

h2 {
    text-align: center;
    color: var(--bios-highlight);
    margin-bottom: 20px;
    font-size: 20px;
}

/* Tab system */
.tabs {
    display: flex;
    border-bottom: 1px solid var(--bios-border);
    margin-bottom: 15px;
}

.tab {
    padding: 8px 16px;
    color: var(--bios-text);
    border: 1px solid var(--bios-border);
    border-bottom: none;
    margin-right: 5px;
    background-color: var(--bios-blue);
    cursor: none;
}

.tab.active {
    background-color: var(--bios-light-blue);
    color: var(--bios-highlight);
    border-bottom: 1px solid var(--bios-light-blue);
    margin-bottom: -1px;
}

.tab:hover {
    color: var(--bios-highlight);
}

.tab-content {
    min-height: 300px;
}

/* Leaderboard styling */
.leaderboard {
    border: 1px solid var(--bios-border);
    background-color: var(--bios-blue);
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 15px;
}

.leaderboard-header {
    display: grid;
    grid-template-columns: 40px 1fr 40px 40px 60px;
    padding: 8px;
    background-color: var(--bios-light-blue);
    color: var(--bios-highlight);
    font-weight: bold;
    border-bottom: 1px solid var(--bios-border);
}

.leaderboard-row {
    display: grid;
    grid-template-columns: 40px 1fr 40px 40px 60px;
    padding: 8px;
    border-bottom: 1px solid var(--bios-border);
    color: var(--bios-text);
}

.leaderboard-row:last-child {
    border-bottom: none;
}

.leaderboard-row:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.05);
}

.leaderboard-empty {
    padding: 20px;
    text-align: center;
    color: var(--bios-text);
}

.rank {
    font-weight: bold;
    color: var(--bios-highlight);
}

.stats {
    text-align: center;
}

.refresh-button {
    width: 100%;
    margin-top: 10px;
}

/* Server controls with logout */
#logout-button {
    margin-left: auto;
    color: var(--bios-text);
}

/* Server browser */
.server-controls {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 15px;
}

.icon-button {
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 10px;
    font-size: 18px;
    padding: 0;
}

.server-list {
    max-height: 300px;
    overflow-y: auto;
}

.server-item {
    padding: 10px;
    border: 1px solid var(--bios-border);
    margin-bottom: 5px;
    background-color: var(--bios-blue);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.server-item:hover {
    background-color: var(--bios-light-blue);
}

.server-name {
    color: var(--bios-highlight);
}

.players-count {
    color: var(--bios-text);
    font-size: 14px;
}

/* Lobby screen */
.players-list {
    margin-bottom: 20px;
}

.player {
    padding: 10px;
    border: 1px solid var(--bios-border);
    margin-bottom: 10px;
    background-color: var(--bios-blue);
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 50px;
    box-sizing: border-box;
    width: 100%;
}

.player-name {
    color: var(--bios-highlight);
    min-height: 1.2em;
    flex: 1;
}

.player-status {
    color: var(--bios-text);
    min-width: 80px;
    text-align: right;
}

#countdown {
    text-align: center;
    margin-bottom: 20px;
    color: var(--bios-highlight);
    font-size: 18px;
}

/* Game screen */
#game-screen {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#game-canvas {
    background-color: var(--bios-blue);
    border: 2px solid var(--bios-border);
}

.score-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    font-size: 24px;
    color: var(--bios-highlight);
}

.score-divider {
    margin: 0 10px;
}

/* Notifications */
.notification {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
}

.notification-content {
    background-color: var(--bios-window);
    border: 2px solid var(--bios-border);
    padding: 20px;
    text-align: center;
    width: 400px;
    max-width: 90%;
}

.notification-content h2 {
    color: var(--bios-highlight);
    margin-bottom: 20px;
}

.notification-content button {
    margin-top: 20px;
}

/* Error screen */
.notification-content.error {
    background-color: var(--bios-error);
    position: relative;
    overflow: hidden;
}

@keyframes glitch {
    0% {
        opacity: 0.3;
        transform: translate(0);
    }
    20% {
        opacity: 0.4;
        transform: translate(-5px, 2px);
    }
    40% {
        opacity: 0.25;
        transform: translate(5px, -2px);
    }
    60% {
        opacity: 0.35;
        transform: translate(2px, 5px);
    }
    80% {
        opacity: 0.45;
        transform: translate(-2px, -5px);
    }
    100% {
        opacity: 0.3;
        transform: translate(0);
    }
}

.corruption-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('/images/corruption.jpg');
    background-size: cover;
    opacity: 0.3;
    pointer-events: none;
    animation: glitch 0.5s infinite;
}

/* Utility classes */
.hidden {
    display: none !important;
}

.server-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#toggle-music {
    margin-left: auto; /* Push to the right */
}

#toggle-music.muted {
    opacity: 0.5;
}

/* Online player count */
.online-count {
    font-size: 12px;
    color: var(--bios-text);
    margin-left: auto;
}

/* Lobby controls */
.lobby-controls {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

#start-game {
    background-color: var(--bios-light-blue);
    font-weight: bold;
}

#start-game:hover {
    background-color: var(--bios-blue);
    box-shadow: 0 0 5px 2px rgba(255, 255, 255, 0.2);
}

#in-game-countdown {
    text-align: center;
    margin-bottom: 15px;
    color: var(--bios-highlight);
    font-size: 24px;
    font-weight: bold;
    background-color: var(--bios-window);
    padding: 5px 15px;
    border: 1px solid var(--bios-border);
    border-radius: 4px;
}

#in-game-timer {
    color: #ff9900;
} 