/* Guyana IPTV theme — Tailwind CSS companion */

:root {
    --accent: #9ef01a;
    --accent-dim: #7ed60a;
    --surface: #171717;
    --surface-light: #262626;
    --bg: #0a0a0a;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: #fff;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    overflow-x: hidden;
}

/* TV remote focus ring */
[data-focusable]:focus,
[data-focusable].focus,
button:focus,
a:focus,
input:focus {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.6) !important;
    border-radius: 0.5rem;
    transform: scale(1.03);
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

/* Hide scrollbars but keep functionality */
.hide-scrollbar::-webkit-scrollbar {
    display: none;
}
.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Horizontal row */
.row-scroll {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding: 0.5rem 0;
    scroll-snap-type: x mandatory;
}

.row-scroll > * {
    flex: 0 0 auto;
    scroll-snap-align: start;
}

/* Card hover lift */
.media-card {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.media-card:hover,
.media-card:focus {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

/* Gradient fallback for cards without images */
.gradient-fallback {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

/* Skeleton loading */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
.skeleton {
    background: linear-gradient(90deg, #262626 25%, #404040 50%, #262626 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* Player overlay controls */
.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, transparent 25%, transparent 75%, rgba(0,0,0,0.8) 100%);
    opacity: 1;
    transition: opacity 0.3s ease;
    pointer-events: none;
}
.player-overlay.hidden-controls {
    opacity: 0;
    pointer-events: none;
}
.player-overlay > * {
    pointer-events: auto;
}

/* Custom range / volume slider */
input[type="range"] {
    -webkit-appearance: none;
    background: transparent;
}
input[type="range"]::-webkit-slider-runnable-track {
    height: 4px;
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 14px;
    width: 14px;
    border-radius: 50%;
    background: var(--accent);
    margin-top: -5px;
    cursor: pointer;
}
input[type="range"]::-moz-range-track {
    height: 4px;
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
}
input[type="range"]::-moz-range-thumb {
    height: 14px;
    width: 14px;
    border: none;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
}

/* Progress bar */
.progress-track {
    background: rgba(255,255,255,0.2);
    height: 6px;
    border-radius: 3px;
    cursor: pointer;
    position: relative;
}
.progress-fill {
    background: var(--accent);
    height: 100%;
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s linear;
}
.progress-track:hover .progress-fill {
    background: var(--accent-dim);
}

/* Toast notifications */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(23, 23, 23, 0.95);
    border: 1px solid #262626;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    color: #fff;
    z-index: 200;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.toast.show {
    opacity: 1;
}

/* Splash screen QR */
.tv-qr {
    text-align: center;
    margin: 1.5rem auto;
    width: 200px;
    height: 200px;
}

.tv-qr img {
    display: block;
    margin: 0 auto;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

@media (min-width: 768px) {
    .tv-qr {
        width: 260px;
        height: 260px;
    }
}

/* Device info frame on splash */
.info-card {
    background: var(--surface);
    border: 1px solid var(--surface-light);
    border-radius: 1rem;
    padding: 1.25rem;
    margin: 1rem 0 1.5rem;
    text-align: left;
}

.info-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.info-row:last-of-type {
    margin-bottom: 0;
}

.info-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #a3a3a3;
}

.info-value {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 1rem;
    color: var(--accent);
    word-break: break-all;
}

.copy-btn {
    width: 100%;
    margin-top: 1rem;
}

.header-logo-link {
    border-radius: 0.5rem;
}

.header-logo {
    height: 32px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
}

.splash-logo {
    max-width: 100%;
    height: auto;
    width: 320px;
    margin: 0 auto 0.5rem;
}

/* Splash / pending TV classes */
.tv-app {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
    text-align: center;
}

.tv-card {
    background: var(--surface);
    border-radius: 1rem;
    padding: 2rem;
    max-width: 720px;
    width: 100%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.tv-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
    color: var(--accent);
}

.tv-subtitle {
    color: #a3a3a3;
    margin-bottom: 1.5rem;
}

.tv-device-id {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 1.25rem;
    letter-spacing: 0.03em;
    background: var(--surface-light);
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    margin: 0.75rem 0;
    word-break: break-all;
}

.tv-status {
    font-size: 0.95rem;
    color: #a3a3a3;
    margin-top: 1rem;
}

.tv-status.active { color: #22c55e; }
.tv-status.pending { color: #facc15; }
.tv-status.blocked { color: #ef4444; }

.tv-loading {
    font-size: 1rem;
    color: #a3a3a3;
}

.tv-error {
    color: #ef4444;
    font-size: 1rem;
}

.tv-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 180px;
    min-height: 48px;
    padding: 0.65rem 1.25rem;
    margin: 0.35rem;
    border: 2px solid transparent;
    border-radius: 0.75rem;
    background: var(--surface-light);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.05s ease;
}

.tv-btn:focus,
.tv-btn.focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.25);
}

.tv-btn-primary {
    background: var(--accent);
    color: #000;
}

.tv-btn-primary:focus,
.tv-btn-primary.focus {
    background: var(--accent-dim);
}

.tv-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

@media (min-width: 768px) {
    .tv-card {
        padding: 2.5rem;
    }
    .tv-title {
        font-size: 2.5rem;
    }
}
