:root {
    --bg-color: #0d0f1a;
    --panel-bg: rgba(20, 24, 40, 0.7);
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --status-online: #10b981;
    --status-expired: #ef4444;
    --status-renovating: #f59e0b;
    --border: rgba(255, 255, 255, 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    padding: 2rem;
    position: relative;
    overflow-x: hidden;
}

/* Dynamic background */
.overlay-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at 15% 50%, rgba(99, 102, 241, 0.15), transparent 40%),
                radial-gradient(circle at 85% 30%, rgba(236, 72, 153, 0.1), transparent 40%);
    z-index: -1;
    animation: pulseBg 15s ease-in-out infinite alternate;
}

@keyframes pulseBg {
    0% { transform: scale(1); }
    100% { transform: scale(1.05); }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 3rem;
}

header h1 {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.highlight {
    background: linear-gradient(135deg, #6366f1, #ec4899);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

header p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

.glass-panel {
    background: var(--panel-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-panel:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
}

.add-section {
    margin-bottom: 2rem;
}

.add-section h2 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

form {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

input {
    flex: 1;
    min-width: 200px;
    padding: 0.8rem 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    transition: all 0.3s;
}

input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.3);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
}

.btn-primary:active {
    transform: scale(0.95);
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

@media (max-width: 900px) {
    .main-content {
        grid-template-columns: 1fr;
    }
}

.table-container {
    overflow-x: auto;
    margin-top: 1rem;
}

table {
    width: 100%;
    border-collapse: collapse;
}

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

th {
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
}

tr:last-child td {
    border-bottom: none;
}

.status-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
}

.status-Online { background: rgba(16, 185, 129, 0.2); color: var(--status-online); }
.status-Expired { background: rgba(239, 68, 68, 0.2); color: var(--status-expired); }
.status-Renovating { background: rgba(245, 158, 11, 0.2); color: var(--status-renovating); animation: pulseRenovate 2s infinite; }

@keyframes pulseRenovate {
    0% { opacity: 0.7; }
    50% { opacity: 1; }
    100% { opacity: 0.7; }
}

.action-btn {
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    margin-right: 0.3rem;
    transition: background 0.2s;
}

.action-btn:hover { background: rgba(255,255,255,0.2); }

.video-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    margin-top: 1.5rem;
}

#videoPlayer {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.placeholder {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.8);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 1.1rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.placeholder.show {
    opacity: 1;
    pointer-events: all;
}

.player-info {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    text-align: center;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    vertical-align: middle;
    transition: transform 0.3s;
}

.btn-icon:hover { transform: rotate(180deg); }

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--primary);
    color: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    font-weight: 600;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1000;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.top-row {
    margin-bottom: 2rem;
}
