* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #e2e8f0;
    min-height: 100vh;
    padding: 20px;
}

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

.header {
    margin-bottom: 30px;
    text-align: center;
}

.header h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 20px;
}

.filters {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

select {
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 8px;
    border: 1px solid #4a5568;
    background: #2d3748;
    color: white;
    min-width: 250px;
    cursor: pointer;
}

.btn-apply {
    padding: 10px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    background: #3b82f6;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-apply:hover:not(:disabled) {
    background: #2563eb;
    transform: translateY(-1px);
}

.btn-apply:disabled {
    background: #4a5568;
    cursor: not-allowed;
    opacity: 0.5;
}

.pagination-bar {
    display: none;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.pagination-info {
    font-size: 14px;
    color: #a0aec0;
}

.pagination {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 28px;
}

.page-btn {
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid #4a5568;
    background: #2d3748;
    color: #e2e8f0;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    min-width: 38px;
    text-align: center;
    transition: all 0.2s;
}

.page-btn:hover:not(:disabled):not(.active) {
    background: #3b82f6;
    border-color: #3b82f6;
}

.page-btn.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #fff;
    font-weight: 700;
    pointer-events: none;
}

.page-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.page-btn.ellipsis {
    background: transparent;
    border-color: transparent;
    pointer-events: none;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    /* 480p player cards still fit comfortably per row */
    gap: 16px;
}

.card {
    background: #2d3748;
    border: 1px solid #4a5568;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s;
}

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

.preview-box {
    position: relative;
    padding-bottom: 56.25%;
    background: #000;
}

.preview-box iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.card-body {
    padding: 15px;
}

.card-title {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 5px;
}

.card-infra {
    font-size: 12px;
    color: #a0aec0;
    margin-bottom: 10px;
}

.status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.status-online {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.status-offline {
    background: rgba(107, 114, 128, 0.2);
    color: #9ca3af;
}

.btn-fullscreen {
    display: block;
    width: 100%;
    padding: 8px;
    background: #3b82f6;
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: 6px;
    margin-top: 10px;
    font-size: 14px;
    font-weight: 500;
}

.btn-fullscreen:hover {
    background: #2563eb;
}

.skeleton {
    background: linear-gradient(90deg, #2d3748 25%, #374151 50%, #2d3748 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.skeleton-preview {
    padding-bottom: 56.25%;
    background: #1a202c;
}

.skeleton-text {
    height: 16px;
    border-radius: 4px;
    margin-bottom: 8px;
}

.error-card .preview-box {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1a1a1a;
}

.error-icon {
    font-size: 48px;
    color: #ef4444;
}
