/* ===== SkidmarkTech VDL - Retro Neon Theme ===== */

/* Google Fonts loaded in base.html */

:root {
    --primary: #23ac38;
    --primary-glow: rgba(35, 172, 56, 0.5);
    --primary-dark: #17902b;
    --primary-bright: #3aff5c;
    --bg-darkest: #0a0a0a;
    --bg-dark: #111111;
    --bg-card: #1a1a1a;
    --bg-input: #141414;
    --bg-hover: #1e1e1e;
    --text-primary: #e0e0e0;
    --text-secondary: #777777;
    --text-muted: #555555;
    --border-color: #2a2a2a;
    --danger: #ff3333;
    --font-mono: 'Share Tech Mono', 'Courier New', monospace;
    --font-display: 'Orbitron', 'Segoe UI', sans-serif;
    --glow-sm: 0 0 5px var(--primary-glow);
    --glow-md: 0 0 10px var(--primary-glow), 0 0 20px rgba(35, 172, 56, 0.2);
    --glow-lg: 0 0 7px var(--primary), 0 0 10px var(--primary), 0 0 21px var(--primary), 0 0 42px rgba(35, 172, 56, 0.3);
}

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg-darkest);
    color: var(--text-primary);
    font-family: var(--font-mono);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* Scanline overlay */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.03) 2px,
        rgba(0, 0, 0, 0.03) 4px
    );
    pointer-events: none;
    z-index: 9999;
}

/* ===== Typography ===== */

h1, h2, h3 {
    font-family: var(--font-display);
    letter-spacing: 0.05em;
}

.neon-text {
    color: var(--primary-bright);
    text-shadow: var(--glow-lg);
}

.neon-text-sm {
    color: var(--primary);
    text-shadow: var(--glow-sm);
}

/* ===== Navigation ===== */

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8em 2em;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand {
    font-family: var(--font-display);
    font-size: 1em;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    text-shadow: var(--glow-sm);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    gap: 1.5em;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 0.9em;
    font-weight: 600;
    padding: 0.4em 0.8em;
    border-radius: 0.4em;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.nav-links a:hover {
    color: var(--primary);
    text-shadow: var(--glow-sm);
}

.nav-links a.active {
    color: var(--primary-bright);
    text-shadow: var(--glow-md);
    background: rgba(35, 172, 56, 0.1);
}

/* ===== Main Layout ===== */

.page-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2em 1em;
}

.center-column {
    width: 100%;
    max-width: 460px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ===== Logo ===== */

.logo {
    width: 100%;
    max-width: 420px;
    height: auto;
    display: block;
    margin: 0 auto 1.5em auto;
    object-fit: contain;
    border-radius: 0.4em;
    filter: drop-shadow(0 0 12px rgba(35, 172, 56, 0.15));
}

/* ===== Cards ===== */

.card {
    background: var(--bg-card);
    padding: 2em 1.8em;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 3px 1px -2px rgba(0,0,0,0.2), 0 2px 2px 0 rgba(0,0,0,0.14), 0 1px 5px 0 rgba(0,0,0,0.12), var(--glow-sm);
    width: 100%;
    max-width: 460px;
    position: relative;
}

.card-title {
    font-family: var(--font-display);
    font-size: 1.2em;
    color: var(--primary);
    text-shadow: var(--glow-sm);
    margin: 0 0 1em 0;
    text-align: center;
    letter-spacing: 0.05em;
}

/* ===== Forms ===== */

form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1em;
}

input[type=url],
input[type=text],
input[type=email] {
    width: 100%;
    padding: 1.2em 1em 0.8em;
    font-size: 0.95em;
    font-family: var(--font-mono);
    border: none;
    border-bottom: 2px solid var(--border-color);
    border-radius: 4px 4px 0 0;
    background: var(--bg-input);
    color: var(--text-primary);
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

input[type=url]:focus,
input[type=text]:focus,
input[type=email]:focus {
    border-bottom: 2px solid var(--primary);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* ===== Buttons ===== */

.btn {
    padding: 0.8em 2em;
    font-size: 1em;
    font-family: var(--font-mono);
    font-weight: 700;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s, box-shadow 0.3s, transform 0.1s;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--primary);
    color: #111;
    box-shadow: 0 3px 1px -2px rgba(0,0,0,0.2), 0 2px 2px 0 rgba(0,0,0,0.14), 0 1px 5px 0 rgba(0,0,0,0.12), var(--glow-sm);
}

.btn-primary:hover {
    background: var(--primary-bright);
    box-shadow: 0 2px 4px -1px rgba(0,0,0,0.2), 0 4px 5px 0 rgba(0,0,0,0.14), 0 1px 10px 0 rgba(0,0,0,0.12), var(--glow-md);
}

.btn-primary:active {
    box-shadow: 0 5px 5px -3px rgba(0,0,0,0.2), 0 8px 10px 1px rgba(0,0,0,0.14), 0 3px 14px 2px rgba(0,0,0,0.12);
    transform: translateY(1px);
}

.btn-block {
    width: 100%;
}

.btn-lg {
    padding: 1em 2.5em;
    font-size: 1.1em;
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
}

.btn-outline:hover {
    background: rgba(35, 172, 56, 0.1);
    box-shadow: var(--glow-sm);
}

/* ===== Progress Bar ===== */

.progress-container {
    width: 100%;
    margin: 1.2em 0 0.5em 0;
    display: none;
}

.progress-track {
    background: #222;
    border-radius: 0.5em;
    width: 100%;
    height: 22px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.progress-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--primary-dark), var(--primary), var(--primary-bright));
    border-radius: 0.5em;
    text-align: center;
    line-height: 22px;
    color: #fff;
    font-weight: 700;
    font-size: 0.85em;
    font-family: var(--font-mono);
    transition: width 0.3s;
    box-shadow: var(--glow-sm);
}

/* Animated glow pulse on progress */
@keyframes progress-glow {
    0%, 100% { box-shadow: var(--glow-sm); }
    50% { box-shadow: var(--glow-md); }
}

.progress-fill.active {
    animation: progress-glow 2s ease-in-out infinite;
}

/* ===== Loader ===== */

.loader-overlay {
    position: absolute;
    z-index: 12;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(10, 10, 10, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    border-radius: 1em;
    backdrop-filter: blur(4px);
}

.loader {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.spinner {
    border: 4px solid #333;
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    animation: spin 0.8s linear infinite;
    margin-bottom: 1em;
    box-shadow: var(--glow-sm);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loader-text {
    color: var(--primary);
    font-size: 0.95em;
    font-weight: 600;
    font-family: var(--font-mono);
    text-shadow: var(--glow-sm);
}

/* ===== Video Preview ===== */

.result-section {
    width: 100%;
    margin-top: 1.5em;
    display: none;
    flex-direction: column;
    align-items: center;
}

.video-preview-box {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #111;
    border-radius: 0.7em;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    min-height: 120px;
    margin-bottom: 1em;
}

.video-preview {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    border-radius: 0.7em;
    background: #111;
    outline: none;
}

/* ===== Messages ===== */

.msg {
    color: var(--danger);
    min-height: 1.5em;
    font-size: 0.9em;
    text-align: center;
}

/* ===== Gallery ===== */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5em;
    max-width: 1200px;
    margin: 0 auto 3em auto;
    padding: 0 2em;
    align-items: start;
}

.video-thumb {
    position: relative;
    background: var(--bg-card);
    border-radius: 0.8em;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    transition: all 0.25s;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.video-thumb video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #0a0a0a;
    display: block;
}

.video-thumb:hover,
.video-thumb:focus-within {
    border-color: var(--primary);
    box-shadow: 0 4px 24px rgba(35, 172, 56, 0.3), var(--glow-sm);
    transform: translateY(-2px);
}

.video-thumb:hover video,
.video-thumb:focus-within video {
    filter: brightness(1.1);
}

.download-link {
    display: block;
    position: absolute;
    right: 0.6em;
    bottom: 0.6em;
    background: rgba(35, 172, 56, 0.9);
    color: #fff;
    padding: 0.3em 0.8em;
    border-radius: 0.4em;
    font-size: 0.85em;
    font-family: var(--font-mono);
    font-weight: 700;
    text-decoration: none;
    opacity: 0;
    transition: opacity 0.2s;
    box-shadow: var(--glow-sm);
}

.video-thumb:hover .download-link,
.video-thumb:focus-within .download-link {
    opacity: 1;
}

/* ===== Lightbox ===== */

.lightbox {
    display: none;
    position: fixed;
    z-index: 200;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 85vh;
    width: 900px;
    background: #111;
    border-radius: 1em;
    border: 1px solid var(--primary);
    overflow: hidden;
    box-shadow: var(--glow-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.lightbox video {
    width: 100%;
    height: 100%;
    max-height: 85vh;
    background: #000;
}

.lightbox .close-btn {
    position: absolute;
    top: 0.6em;
    right: 1em;
    font-size: 2em;
    color: var(--primary);
    background: none;
    border: none;
    cursor: pointer;
    z-index: 2;
    text-shadow: var(--glow-sm);
    transition: color 0.2s;
}

.lightbox .close-btn:hover {
    color: var(--primary-bright);
    text-shadow: var(--glow-md);
}

/* ===== Stats ===== */

.stats-header {
    text-align: center;
    margin: 1.5em 0;
}

.stats-header h1 {
    font-family: var(--font-display);
    color: var(--primary);
    text-shadow: var(--glow-md);
    font-size: 1.6em;
    margin-bottom: 0.5em;
}

.period-filters {
    display: flex;
    gap: 0.5em;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2em;
}

.period-btn {
    padding: 0.5em 1.2em;
    font-size: 0.85em;
    font-family: var(--font-mono);
    font-weight: 600;
    border: 1px solid var(--border-color);
    border-radius: 2em;
    background: var(--bg-card);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.period-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.period-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: var(--glow-sm);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.2em;
    max-width: 900px;
    margin: 0 auto 2em auto;
    padding: 0 2em;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0.8em;
    padding: 1.5em;
    text-align: center;
    transition: all 0.2s;
}

.stat-card:hover {
    border-color: var(--primary);
    box-shadow: var(--glow-sm);
}

.stat-value {
    font-family: var(--font-display);
    font-size: 2.2em;
    font-weight: 700;
    color: var(--primary-bright);
    text-shadow: var(--glow-md);
    margin-bottom: 0.2em;
}

.stat-label {
    font-family: var(--font-mono);
    font-size: 0.8em;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.stats-table-section {
    max-width: 900px;
    margin: 0 auto 2em auto;
    padding: 0 2em;
}

.stats-table-section h3 {
    font-family: var(--font-display);
    color: var(--primary);
    text-shadow: var(--glow-sm);
    font-size: 1em;
    margin-bottom: 0.8em;
    letter-spacing: 0.05em;
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-mono);
    font-size: 0.9em;
}

.stats-table th {
    background: var(--bg-card);
    color: var(--primary);
    padding: 0.7em 1em;
    text-align: left;
    border-bottom: 1px solid var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.8em;
}

.stats-table td {
    padding: 0.6em 1em;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

.stats-table tr:hover td {
    background: rgba(35, 172, 56, 0.05);
}

.stats-table .count {
    color: var(--primary);
    font-weight: 700;
}

/* ===== Empty State ===== */

.empty-state {
    color: var(--text-muted);
    text-align: center;
    padding: 3em;
    font-family: var(--font-mono);
    grid-column: 1 / -1;
}

/* ===== Install Button (PWA) ===== */

.install-btn {
    position: fixed;
    bottom: 1.5em;
    right: 1.5em;
    z-index: 50;
    display: none;
}

/* ===== Page Title ===== */

.page-title {
    text-align: center;
    margin: 1.5em 0;
    font-family: var(--font-display);
    color: var(--primary);
    text-shadow: var(--glow-md);
    font-size: 1.4em;
    letter-spacing: 0.05em;
}

/* ===== Offline Page ===== */

.offline-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    text-align: center;
    padding: 2em;
}

.offline-icon {
    font-size: 4em;
    margin-bottom: 0.5em;
    opacity: 0.6;
}

.offline-container h1 {
    font-family: var(--font-display);
    color: var(--primary);
    text-shadow: var(--glow-md);
    font-size: 1.5em;
    margin-bottom: 0.5em;
}

.offline-container p {
    color: var(--text-secondary);
    font-size: 1em;
    max-width: 400px;
}

/* ===== Responsive ===== */

@media (max-width: 600px) {
    .nav {
        padding: 0.6em 1em;
    }
    .nav-brand {
        font-size: 0.85em;
    }
    .nav-links {
        gap: 0.8em;
    }
    .nav-links a {
        font-size: 0.8em;
        padding: 0.3em 0.5em;
    }
    .card {
        padding: 1.5em 1em;
        border-radius: 0.7em;
    }
    .logo {
        max-width: 95vw;
    }
    .center-column {
        max-width: 95vw;
    }
    .gallery-grid {
        gap: 1em;
        padding: 0 1em;
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        padding: 0 1em;
    }
    .stats-table-section {
        padding: 0 1em;
    }
    .lightbox-content {
        width: 98vw;
        max-width: 98vw;
        border-radius: 0.5em;
    }
}

.site-footer {
    text-align: center;
    padding: 1.5em 1em;
    margin-top: 2em;
    color: #555;
    font-size: 0.75em;
    font-family: 'Share Tech Mono', monospace;
    border-top: 1px solid #1a1a1a;
}
