@font-face {
    font-family: 'SpaceFont';
    src: url('../fonds/massive-grunge.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700;800;900&display=swap');

:root {
    --bg-color: #0d1117;
    --card-bg: rgba(22, 27, 34, 0.7);
    --primary-color: #58a6ff;
    --text-color: #c9d1d9;
    --border-color: #30363d;
    --glass-border: 1px solid rgba(255, 255, 255, 0.1);
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-title: 'SpaceFont', 'Orbitron', sans-serif;
}

html {
    /* Background removed to allow video visibility */
}

body {
    background-color: transparent;
    font-family: var(--font-family);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

/* Video Background */
.video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    pointer-events: none;
}

.video-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 17, 23, 0.75);
    z-index: -1;
    pointer-events: none;
}

/* Auth Pages (Login/Register) */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    position: relative;
    z-index: 1;
}

.auth-box {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: var(--glass-border);
    border-radius: 12px;
    padding: 2rem;
    width: 350px;
    box-shadow: var(--shadow);
    text-align: center;
}

.auth-box img.logo {
    max-width: 150px;
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: #010409;
    color: var(--text-color);
    box-sizing: border-box;
}

.btn {
    display: inline-block;
    background: var(--primary-color);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
    width: 100%;
    box-sizing: border-box;
}

.btn:hover {
    filter: brightness(1.1);
}

.btn-secondary {
    background: #21262d;
    margin-top: 0.5rem;
}

/* Dashboard */
.navbar {
    background: var(--card-bg);
    border-bottom: var(--glass-border);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 10;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    margin-left: 1rem;
    font-weight: 500;
}

.nav-links a:hover {
    color: var(--primary-color);
}

/* Logo Area Link */
a.logo-area {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
}

a.logo-area h3 {
    color: var(--text-color);
    margin: 0;
    font-family: var(--font-family);
    font-weight: 600;
}

.main-content {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.server-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.server-card {
    background: var(--card-bg);
    border: var(--glass-border);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: transform 0.2s;
}

.server-card:hover {
    transform: translateY(-2px);
}

.server-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.server-icon {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    background: #21262d;
    /* Ideally replace with game icon */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    font-weight: bold;
    color: #8b949e;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-online {
    background: #238636;
    color: white;
}

.status-offline {
    background: #da3633;
    color: white;
}

.status-installing {
    background: #d29922;
    color: white;
}

.status-updating {
    background: #1f6feb;
    color: white;
}

.server-details {
    font-size: 0.9rem;
    color: #8b949e;
    margin-bottom: 1rem;
}

.server-controls {
    display: flex;
    gap: 0.5rem;
}

.control-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    color: white;
}

.btn-start {
    background: #238636;
}

.btn-stop {
    background: #da3633;
}

.btn-manage {
    background: #1f6feb;
}

.btn-install {
    background: #8957e5;
}

/* Admin Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
}

th,
td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background: rgba(255, 255, 255, 0.05);
}

tr:last-child td {
    border-bottom: none;
}

/* Utilities / Refactoring */
.server-title {
    margin: 0;
}

.server-ip {
    color: #fff;
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #da3633;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.7rem;
    font-weight: bold;
}

.user-profile-link {
    color: white;
    text-decoration: underline;
    margin-right: 15px;
}

.nav-notif-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.empty-state {
    grid-column: 1/-1;
    text-align: center;
    padding: 2rem;
    color: #8b949e;
}

.empty-state-link {
    color: var(--primary-color);
    text-decoration: none;
}

.empty-state-link:hover {
    text-decoration: underline;
}

.btn-delete {
    background: #da3633;
    margin-left: 5px;
}