@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --bg-color: #060a06;
    --card-bg: #0f1a0f;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent: #39ff14;
    --accent-hover: #2bc90f;
    --accent-dim: rgba(57, 255, 20, 0.12);
    --accent-glow: rgba(57, 255, 20, 0.35);
    --input-bg: #152015;
    --border-color: #1e3a1e;
}

/* ── Light theme ── */
:root.light {
    --bg-color: #f2f7f2;
    --card-bg: #ffffff;
    --text-primary: #0d1f0d;
    --text-secondary: #4a6b4a;
    --accent: #1a7a00;
    --accent-hover: #156000;
    --accent-dim: rgba(26, 122, 0, 0.1);
    --accent-glow: rgba(26, 122, 0, 0.25);
    --input-bg: #e8f2e8;
    --border-color: #b8d4b8;
}

* {
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    margin-bottom: 40px;
    border-bottom: 1px solid var(--border-color);
}

nav a {
    color: var(--text-primary);
    text-decoration: none;
    margin-left: 20px;
    font-weight: 500;
    transition: color 0.2s;
}

nav a:hover { color: var(--accent); }

nav .brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 0;
    text-decoration: none;
}

nav .brand img {
    height: 38px;
    width: auto;
}

nav .brand span {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--accent);
    text-shadow: 0 0 16px rgba(57, 255, 20, 0.4);
    letter-spacing: -0.01em;
}

:root.light nav .brand span {
    text-shadow: 0 0 8px rgba(26, 122, 0, 0.3);
}

/* ── Theme toggle button ── */
.theme-toggle {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    transition: background 0.2s, border-color 0.2s, transform 0.15s;
    color: var(--text-primary);
    margin-left: 12px;
    flex-shrink: 0;
    vertical-align: middle;
}

.theme-toggle:hover {
    border-color: var(--accent);
    transform: scale(1.08);
}

h1,
h2,
h3 {
    margin-top: 0;
}

.card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    margin-bottom: 20px;
}

/* Forms */
.form-group {
    margin-bottom: 15px;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 12px;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
}

input:focus {
    outline: 2px solid var(--accent);
    border-color: transparent;
}

button,
.btn {
    display: inline-block;
    background: var(--accent);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s;
}

button:hover,
.btn:hover {
    background: var(--accent-hover);
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

th,
td {
    text-align: left;
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
}

th {
    color: var(--text-secondary);
    font-weight: 600;
}

/* Grid for Videos */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.video-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 15px;
    transition: transform 0.2s;
}

.video-card:hover {
    transform: translateY(-5px);
}

.timestamp {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.video-thumbnail {
    width: 100%;
    height: 180px;
    background: #000;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    margin-bottom: 15px;
}

/* Custom Video Controls */
.video-container {
    position: relative;
    width: 100%;
    background: #000;
}

.video-controls {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    padding: 15px;
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
}

.control-btn {
    background: #334155;
    border: none;
    color: white;
    padding: 15px 5px;
    border-radius: 8px;
    font-size: 0.9rem;
    /* Smaller font for mobile fit */
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
}

.control-btn:active {
    background: var(--accent);
}

.control-btn.active {
    background: var(--accent);
}

.control-btn svg {
    margin-bottom: 5px;
    width: 24px;
    height: 24px;
}

.speed-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
    padding-bottom: 10px;
}

.speed-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
}

.speed-btn.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}