:root {
  --bg-base: #0a0a0a;
  --bg-surface: #121212;
  --bg-surface-hover: #1a1a1a;
  --border-color: #262626;
  --border-focus: #525252;
  --text-primary: #ededed;
  --text-secondary: #a3a3a3;
  --text-muted: #737373;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --danger: #ef4444;
  --danger-hover: #dc2626;
  --radius: 6px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
}

/* Layout */
.app-container {
  display: flex;
  min-height: 100vh;
}

aside {
  width: 260px;
  background-color: var(--bg-surface);
  border-right: 1px solid var(--border-color);
  padding: 24px;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  padding: 40px;
  max-width: 1200px;
  overflow-y: auto;
}

/* Typography & Headers */
h1 { font-size: 24px; font-weight: 600; letter-spacing: -0.5px; margin-bottom: 8px; }
h2 { font-size: 18px; font-weight: 600; margin-bottom: 16px; }
p.subtitle { color: var(--text-secondary); margin-bottom: 24px; }

/* Navigation Sidebar */
.brand {
  font-weight: 600;
  font-size: 16px;
  color: var(--text-primary);
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.nav-links a {
  display: block;
  padding: 10px 12px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius);
  transition: all 0.15s ease;
}

.nav-links a:hover, .nav-links a.active {
  background-color: var(--bg-surface-hover);
  color: var(--text-primary);
}

/* Forms & Inputs */
.form-group {
  margin-bottom: 20px;
}

label {
  display: block;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

input[type="text"],
input[type="password"],
input[type="url"],
input[type="number"],
textarea,
select {
  width: 100%;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 10px 14px;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  transition: border-color 0.15s ease;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--border-focus);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.btn-primary {
  background-color: var(--text-primary);
  color: var(--bg-base);
}

.btn-primary:hover {
  background-color: var(--text-secondary);
}

.btn-secondary {
  background-color: var(--bg-surface);
  border-color: var(--border-color);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background-color: var(--bg-surface-hover);
}

.btn-danger {
  background-color: rgba(239, 68, 68, 0.1);
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
  background-color: rgba(239, 68, 68, 0.2);
}

/* Tables */
.table-container {
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  background-color: var(--bg-surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th, td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
}

th {
  background-color: rgba(255, 255, 255, 0.02);
  font-weight: 500;
  color: var(--text-secondary);
  font-size: 13px;
}

tr:last-child td {
  border-bottom: none;
}

/* Login Card */
.login-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  width: 100%;
}

.login-card {
  width: 100%;
  max-width: 400px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 32px;
  border-radius: 8px;
}

/* Container Cards & Section Panels */
.dashboard-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 32px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

/* Comments Sub-block inside Video Cards */
.comment-sub-block {
  background-color: var(--bg-base);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius);
  padding: 12px;
  margin-top: 10px;
}

.comment-sub-block h4 {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Gallery Grid & Image Cards */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.gallery-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
}

.gallery-card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}

.gallery-card-body {
  padding: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}

/* Floating Tag Pills */
.tag-pill-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.tag-pill {
  background-color: var(--bg-surface-hover);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 6px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .app-container {
    flex-direction: column;
  }
  aside {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}