:root {
    --bg-color: #0B0F19;
    --text-color: #f8fafc;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --glass-bg: rgba(26, 34, 53, 0.8);
    --glass-border: rgba(255, 255, 255, 0.1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
}

.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle at center, #1a2235, #0B0F19);
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.login-container { width: 100%; max-width: 400px; text-align: center; }
.login-container h2 { margin-bottom: 1.5rem; font-weight: 600; }
.login-container input {
    width: 100%; padding: 0.75rem; margin-bottom: 1rem;
    border-radius: 8px; border: 1px solid var(--glass-border);
    background: rgba(0,0,0,0.2); color: white; outline: none;
}
.login-container button {
    width: 100%; padding: 0.75rem; border-radius: 8px; border: none;
    background: var(--primary); color: white; font-weight: 600;
    cursor: pointer; transition: background 0.2s;
}
.login-container button:hover { background: var(--primary-hover); }
.error { color: #ef4444; margin-bottom: 1rem; font-size: 0.875rem; }

/* Dashboard Layout */
.dashboard-nav {
    display: flex; align-items: center; padding: 1rem 2rem;
    background: var(--glass-bg); border-bottom: 1px solid var(--glass-border);
}
.dashboard-nav h1 { font-size: 1.25rem; font-weight: 600; margin-right: 2rem; }
.nav-links button {
    background: none; border: none; color: #94a3b8; font-size: 1rem;
    margin-right: 1.5rem; cursor: pointer; transition: color 0.2s; font-family: 'Inter', sans-serif;
}
.nav-links button.active, .nav-links button:hover { color: white; }
.logout-btn { margin-left: auto; color: #ef4444 !important; text-decoration: none; }

.main-content { padding: 2rem; max-width: 1200px; margin: 0 auto; }
.tab-content { display: none; animation: fadeIn 0.3s; }
.tab-content.active { display: block; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Live Stream Video */
#remoteVideo {
    width: 100%; max-width: 800px; border-radius: 12px;
    background: black; box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    display: block; margin: 0 auto 1.5rem auto; aspect-ratio: 16/9;
}
.controls { text-align: center; }
.btn {
    padding: 0.75rem 1.5rem; border-radius: 8px; border: none;
    background: var(--primary); color: white; font-weight: 600;
    cursor: pointer; transition: background 0.2s; font-family: 'Inter', sans-serif;
}
.btn:hover { background: var(--primary-hover); }

/* Settings Form */
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 0.5rem; color: #cbd5e1; }
.form-group input {
    width: 100%; padding: 0.75rem; border-radius: 8px; border: 1px solid var(--glass-border);
    background: rgba(0,0,0,0.2); color: white; font-family: 'Inter', sans-serif; outline: none;
}
.settings-panel { max-width: 500px; }

/* Gallery */
.gallery-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1.5rem;
}
.gallery-item {
    background: var(--glass-bg); border: 1px solid var(--glass-border);
    border-radius: 12px; overflow: hidden; padding: 1rem; text-align: center;
}
.gallery-item img, .gallery-item video {
    width: 100%; height: 150px; object-fit: cover; border-radius: 8px; margin-bottom: 0.5rem; background: #000;
}
.gallery-item p { font-size: 0.875rem; color: #cbd5e1; word-break: break-all; margin-bottom: 0.5rem; }
.gallery-item a { color: var(--primary); text-decoration: none; font-size: 0.875rem; display: inline-block; }
.gallery-item a:hover { text-decoration: underline; }

/* The Modal (background) */
.modal {
  display: none; 
  position: fixed; 
  z-index: 1000; 
  padding-top: 50px; 
  left: 0;
  top: 0;
  width: 100%; 
  height: 100%; 
  overflow: auto; 
  background-color: rgba(11, 15, 25, 0.95);
}
.modal-content {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 80vh;
  border-radius: 12px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  object-fit: contain;
}
#modalCaption {
  margin: auto;
  display: block;
  width: 80%;
  max-width: 700px;
  text-align: center;
  color: #ccc;
  padding: 15px 0;
  font-size: 1rem;
}
.close {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
}
.close:hover,
.close:focus {
  color: #bbb;
  text-decoration: none;
  cursor: pointer;
}
.prev, .next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  width: auto;
  padding: 16px;
  margin-top: -50px;
  color: white;
  font-weight: bold;
  font-size: 30px;
  transition: 0.6s ease;
  border-radius: 0 8px 8px 0;
  user-select: none;
  background-color: rgba(26, 34, 53, 0.5);
}
.next {
  right: 0;
  border-radius: 8px 0 0 8px;
}
.prev:hover, .next:hover {
  background-color: rgba(59, 130, 246, 0.8);
}
