/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #ff00ff;
    --secondary-color: #8b00ff;
    --bg-dark: #1a0a2e;
    --bg-darker: #0f0528;
    --text-light: #ffffff;
    --text-muted: #b0b0b0;
    --card-bg: rgba(255, 255, 255, 0.1);
    --card-hover: rgba(255, 255, 255, 0.15);
    --border-color: rgba(255, 255, 255, 0.2);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, var(--bg-darker) 0%, var(--bg-dark) 100%);
    color: var(--text-light);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Login Screen */
.login-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--bg-darker) 0%, var(--bg-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.login-content {
    background: rgba(0, 0, 0, 0.8);
    padding: 3rem;
    border-radius: 16px;
    border: 2px solid var(--primary-color);
    max-width: 400px;
    width: 90%;
    text-align: center;
}

.login-content .logo {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.login-content h2 {
    color: var(--text-light);
    margin-bottom: 2rem;
    font-size: 1.5rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group input {
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.login-btn {
    padding: 1rem 2rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s, transform 0.1s;
    margin-top: 0.5rem;
}

.login-btn:hover {
    background: #ff00cc;
    transform: scale(1.02);
}

.login-btn:active {
    transform: scale(0.98);
}

#login-error {
    color: #ff4444;
    font-size: 0.9rem;
    margin-top: -0.5rem;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--bg-darker) 0%, var(--bg-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-content {
    text-align: center;
}

.logo {
    font-size: 3rem;
    font-weight: bold;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 2rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    color: var(--text-muted);
    font-size: 1rem;
}

/* App Container */
.app-container {
    max-width: 100%;
    margin: 0 auto;
    min-height: 100vh;
    padding-bottom: 2rem;
}

/* Header */
.logout-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1.3rem;
    color: var(--text-light);
}
.logout-btn:hover {
    background: rgba(255, 0, 255, 0.2);
    transform: scale(1.1);
    box-shadow: 0 0 15px var(--primary-color);
}
.logout-btn:active {
    transform: scale(0.95);
}

.logout-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1.3rem;
    color: var(--text-light);
}
.logout-btn:hover {
    background: rgba(255, 0, 255, 0.2);
    transform: scale(1.1);
    box-shadow: 0 0 15px var(--primary-color);
}
.logout-btn:active {
    transform: scale(0.95);
}

.app-header {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.logo-icon {
    width: 28px;
    height: 28px;
    max-width: 28px;
    max-height: 28px;
    object-fit: contain;
    filter: drop-shadow(0 0 6px var(--primary-color));
    animation: pulse 2s ease-in-out infinite;
    display: block;
    flex-shrink: 0;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 10px var(--primary-color));
    }
    50% {
        transform: scale(1.1);
        filter: drop-shadow(0 0 15px var(--primary-color));
    }
}

.app-title {
    font-size: 1.75rem;
    font-weight: bold;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 20px rgba(255, 0, 255, 0.3);
    letter-spacing: 0.5px;
}

.menu-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.menu-btn span {
    width: 25px;
    height: 3px;
    background: var(--text-light);
    border-radius: 2px;
    transition: all 0.3s;
}

/* Side Menu */
.side-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 280px;
    height: 100vh;
    background: var(--bg-darker);
    z-index: 1000;
    transition: left 0.3s ease;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
}

.side-menu.active {
    left: 0;
}

.menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.menu-header h2 {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-list {
    list-style: none;
    padding: 1rem 0;
}

.menu-item {
    display: block;
    padding: 1rem 1.5rem;
    color: var(--text-light);
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.menu-item:hover,
.menu-item.active {
    background: rgba(255, 0, 255, 0.1);
    border-left-color: var(--primary-color);
    color: var(--primary-color);
}

/* Main Content */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem;
    padding-bottom: 100px; /* Space for fixed footer */
}

.content-section {
    display: none;
}

.content-section.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-header {
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}
.multi-stream-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    margin: -0.5rem 0 1.25rem 0;
}

.multi-stream-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.2rem;
    border-radius: 12px;
    border: 1px solid var(--primary-color);
    background: linear-gradient(135deg, rgba(255,0,255,0.14), rgba(139,0,255,0.14));
    color: var(--text-light);
    font-weight: 700;
    letter-spacing: 0.3px;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(255, 0, 255, 0.18);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.multi-stream-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 30px rgba(255, 0, 255, 0.26);
    background: linear-gradient(135deg, rgba(255,0,255,0.22), rgba(139,0,255,0.22));
}

.multi-stream-btn:active {
    transform: translateY(0);
}

.multi-stream-btn .multi-icon {
    font-size: 1.2rem;
}

.multi-stream-btn .multi-text {
    font-size: 1rem;
}

.multi-stream-hint {
    font-size: 0.9rem;
    color: var(--text-muted);
}
.home-icon-btn {
    background: transparent;
    border: none;
    border-radius: 50%;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 3rem;
    position: absolute;
    left: 0;
    opacity: 0.9;
    filter: drop-shadow(0 0 12px var(--primary-color)) drop-shadow(0 0 20px rgba(255, 0, 255, 0.5));
    text-shadow: 0 0 10px var(--primary-color);
}
.home-icon-btn:hover {
    opacity: 1;
    transform: scale(1.2);
    filter: drop-shadow(0 0 20px var(--primary-color)) drop-shadow(0 0 30px rgba(255, 0, 255, 0.8));
    text-shadow: 0 0 15px var(--primary-color), 0 0 25px rgba(255, 0, 255, 0.6);
}
.home-icon-btn:active {
    transform: scale(0.9);
}

.home-logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2rem 0 2.5rem 0;
}

.home-logo {
    width: 150px;
    height: 150px;
    max-width: 150px;
    max-height: 150px;
    object-fit: contain;
    filter: drop-shadow(0 0 10px var(--primary-color));
}

.section-header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1rem;
}

.app-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    text-align: center;
    padding: 1.5rem 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border-color);
    z-index: 50;
    display: flex;
    justify-content: center;
    align-items: center;
}

.app-footer p {
    color: #FFD700 !important;
    font-size: 0.9rem;
    font-style: italic;
    margin: 0;
    text-align: center;
    width: 100%;
}

/* Quick Links */
.quick-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.quick-links.second-row {
    margin-top: 1.5rem;
}

.quick-link-card {
    background: linear-gradient(135deg, rgba(255, 0, 255, 0.15), rgba(139, 0, 255, 0.15));
    border: 2px solid transparent;
    border-radius: 20px;
    padding: 2rem 1.5rem;
    text-align: center;
    text-decoration: none;
    color: var(--text-light);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.quick-link-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.quick-link-card:hover::before {
    left: 100%;
}

.quick-link-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--primary-color);
    box-shadow: 0 15px 40px rgba(255, 0, 255, 0.4), 0 0 30px rgba(139, 0, 255, 0.3);
}

.card-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, var(--primary-color), transparent);
    opacity: 0;
    filter: blur(20px);
    transition: opacity 0.4s;
    pointer-events: none;
}

.quick-link-card:hover .card-glow {
    opacity: 0.3;
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
    transition: transform 0.4s;
    display: inline-block;
}

.quick-link-card:hover .card-icon {
    transform: scale(1.2) rotate(5deg);
}

.live-icon {
    animation: pulse-red 2s ease-in-out infinite;
}

@keyframes pulse-red {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 5px rgba(255, 0, 0, 0.8));
    }
    50% {
        transform: scale(1.1);
        filter: drop-shadow(0 0 15px rgba(255, 0, 0, 1));
    }
}

.soon-icon {
    animation: rotate-clock 3s linear infinite;
}

@keyframes rotate-clock {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.today-icon {
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

.vip-icon {
    animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% {
        transform: scale(1) rotate(0deg);
        filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.8));
    }
    50% {
        transform: scale(1.15) rotate(10deg);
        filter: drop-shadow(0 0 15px rgba(255, 215, 0, 1));
    }
}

.search-icon {
    animation: pulse-search 2s ease-in-out infinite;
}

@keyframes pulse-search {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 5px rgba(255, 0, 255, 0.6));
    }
    50% {
        transform: scale(1.1);
        filter: drop-shadow(0 0 12px rgba(255, 0, 255, 0.9));
    }
}

.telegram-icon {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-8px) rotate(5deg);
    }
}

.quick-link-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.quick-link-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    position: relative;
    z-index: 1;
    margin-top: 0.5rem;
}

/* Events Grid */
.events-grid,
.channels-grid,
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
}

.event-card,
.channel-card,
.content-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.event-card:hover,
.channel-card:hover,
.content-card:hover {
    background: var(--card-hover);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(255, 0, 255, 0.2);
}

.event-card.live::before {
    content: '🔴 LIVE';
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(255, 0, 0, 0.8);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
}

.event-title,
.channel-name,
.content-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.event-category {
    font-weight: bold;
    color: #9d4edd; /* Different purple - more violet/indigo */
    margin-right: 0.5rem;
}

.event-meta,
.content-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.event-time {
    color: var(--primary-color);
    font-weight: 500;
}

/* Search Input */
.search-input {
    width: 100%;
    padding: 0.75rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-light);
    font-size: 1rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 0, 255, 0.1);
}

.search-input::placeholder {
    color: var(--text-muted);
}

/* Loading Placeholder */
.loading-placeholder {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: var(--bg-darker);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 1.25rem;
    color: var(--primary-color);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    max-height: calc(80vh - 80px);
}

/* Multi Stream Modal */
.multi-stream-modal .multi-stream-content {
    max-width: 100vw;
    width: 100vw;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
}

.multi-stream-modal .modal-body {
    height: calc(100vh - 50px);
    max-height: calc(100vh - 50px);
    padding: 0.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    overflow: hidden;
}

.multi-stream-modal.modal.active {
    align-items: stretch;
    justify-content: stretch;
}

.multi-stream-controls {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0;
    font-weight: 600;
    color: #f4e8ff;
}

.multi-stream-controls label {
    font-size: 0.95rem;
}

.multi-stream-controls select {
    background: #0b0616;
    color: #dcb7ff;
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    padding: 0.55rem 0.85rem;
    font-weight: 600;
    outline: none;
    box-shadow: 0 0 0 2px rgba(255,0,255,0.15);
}

.multi-stream-controls select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(255,0,255,0.35);
}

.multi-stream-controls select option {
    background: #0b0616;
    color: #dcb7ff;
}

.multi-stream-subtitle {
    color: #f4e8ff;
    margin: 0;
    text-align: left;
    font-weight: 500;
    font-size: 0.75rem;
    letter-spacing: 0.1px;
}

.multi-stream-grid {
    display: grid;
    gap: 4px;
    height: 100%;
    width: 100%;
    overflow: hidden;
}

/* 2 players: single row side-by-side */
.multi-stream-grid[data-count="2"] {
    grid-template-rows: 1fr;
}

/* 4 players: main on top (55%), 3 subs below (45%) */
.multi-stream-grid[data-count="4"] {
    grid-template-rows: 55% 45%;
}

/* 6 players: 3 on top row (55%), 3 on bottom row (45%) */
.multi-stream-grid[data-count="6"] {
    grid-template-rows: 55% 45%;
}

/* Top row for 6 players: side-main-side layout */
.multi-top-row {
    display: grid;
    grid-template-columns: 1fr 1.5fr 1fr;
    gap: 4px;
    height: 100%;
    max-height: 100%;
    overflow: hidden;
}

/* All slots in top row take their natural grid position */
.multi-top-row .multi-stream-slot {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 100%;
    min-height: 0;
}

.multi-main-container {
    display: flex;
    justify-content: center;
    align-items: stretch;
    width: 100%;
    height: 100%;
    max-height: 100%;
    min-height: 0;
    overflow: hidden;
}

.multi-main-container .multi-stream-slot {
    width: 50%;
    max-width: 600px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.multi-secondary-container {
    display: grid;
    gap: 4px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    align-items: stretch;
    height: 100%;
    max-height: 100%;
    min-height: 0;
    overflow: hidden;
}

.multi-secondary-container .multi-stream-slot {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 100%;
    min-height: 0;
}

/* Header layout adjustments for controls + subtitle */
.multi-header {
    align-items: flex-start;
    gap: 0.5rem;
    flex-wrap: wrap;
    width: 100%;
}

.multi-header-top {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    flex: 1;
    min-width: 0;
}

.multi-header-controls {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: nowrap;
}

.multi-header .multi-stream-controls {
    width: 100%;
    justify-content: flex-start;
}

.multi-header .close-btn {
    margin-left: auto;
}

/* Player sizing */
.multi-stream-slot {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
}

.multi-stream-slot .slot-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.55rem 0.75rem;
    border: 0;
    background: rgba(255, 0, 255, 0.08);
    color: var(--text-light);
    font-weight: 700;
    letter-spacing: 0.3px;
    flex: 0 0 auto;
}

.multi-stream-slot .slot-body {
    position: relative;
    width: 100%;
    background: #000;
    overflow: hidden;
    border-radius: 10px;
    padding: 0;
    box-sizing: border-box;
    flex: 1;
    min-height: 0;
}

.slot-actions {
    display: flex;
    gap: 0.5rem;
}

.slot-promote-btn {
    background: linear-gradient(135deg, #9b59ff, #d43aff);
    color: #0b0616;
    border: none;
    border-radius: 10px;
    padding: 0.35rem 0.7rem;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(255, 0, 255, 0.25);
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.slot-promote-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(255, 0, 255, 0.35);
}

.slot-promote-btn:disabled {
    opacity: 0.5;
    cursor: default;
    box-shadow: none;
    background: rgba(255, 255, 255, 0.15);
    color: #ccc;
}

.slot-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    color: var(--text-muted);
    text-align: center;
    padding: 1rem;
}

.slot-add-btn {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    border: 2px dashed var(--border-color);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-light);
    font-size: 1.6rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.slot-add-btn:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 12px rgba(255, 0, 255, 0.35);
}

.slot-frame {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    display: none;
    background: #000;
    border-radius: 10px;
}

.multi-stream-slot.active .slot-placeholder {
    display: none;
}

.multi-stream-slot.active .slot-frame {
    display: block;
}

/* iOS Safari-specific tweaks to keep player chrome visible */
@supports (-webkit-touch-callout: none) {
    .multi-stream-slot .slot-body {
        padding-bottom: 12px;
    }
    .multi-stream-slot .slot-frame {
        width: 100%;
        height: 100%;
        left: 0;
        top: 0;
        transform: none;
        transform-origin: center top;
    }
    .slot-clear-btn {
        top: 8px;
        right: 8px;
    }
}

.slot-clear-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(0,0,0,0.55);
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
}

.slot-clear-btn:hover {
    background: rgba(255,0,255,0.75);
    transform: scale(1.05);
}

.slot-meta {
    display: none;
}

/* Multi Event Modal */
.multi-event-content {
    max-width: 1000px;
    width: 95%;
}

.multi-events-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.multi-event-card {
    cursor: pointer;
    border: 1px solid var(--border-color);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.multi-event-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary-color);
    box-shadow: 0 12px 24px rgba(255, 0, 255, 0.18);
}

.sources-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Search Modal Styles */
.search-modal-content {
    max-width: 600px;
    width: 90%;
}

.search-modal-body {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1.5rem;
}

.search-input-container {
    width: 100%;
}

.search-input-field {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-darker);
    color: var(--text-light);
    font-size: 1rem;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.search-input-field:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 0, 255, 0.1);
}

.search-input-field::placeholder {
    color: var(--text-muted);
}

.search-history {
    display: none;
    flex-direction: column;
    gap: 0.5rem;
}

.search-history-title {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.search-history-item {
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-light);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
    text-align: left;
    width: 100%;
}

.search-history-item:hover {
    background: rgba(255, 0, 255, 0.1);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.search-buttons {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.search-btn,
.cancel-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.search-btn {
    background: var(--primary-color);
    color: white;
}

.search-btn:hover {
    background: #ff00cc;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(255, 0, 255, 0.3);
}

.cancel-btn {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    border: 1px solid var(--border-color);
}

.cancel-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary-color);
}

.source-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.source-item:hover {
    background: var(--card-hover);
    border-color: var(--primary-color);
}

.source-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.source-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.source-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.report-down-btn {
    background: rgba(255, 0, 0, 0.2);
    border: 1px solid rgba(255, 0, 0, 0.5);
    color: #ff6b6b;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.report-down-btn:hover {
    background: rgba(255, 0, 0, 0.3);
    border-color: #ff6b6b;
}

.report-down-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.stream-status {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-height: 1.2rem; /* Ensure space is reserved even when empty */
}

.status-down {
    color: #ff6b6b;
    font-weight: 500;
}

.status-working {
    color: #51cf66;
    font-weight: 500;
}

.source-quality {
    color: var(--primary-color);
}

/* VIP Modal Styles */
.vip-modal-content {
    max-width: 450px;
}

.vip-modal-body {
    text-align: center;
    padding: 2rem 1.5rem;
}

.vip-description {
    color: var(--text-light);
    font-size: 1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.vip-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.vip-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-height: 60px;
}

.vip-action-btn .btn-icon {
    font-size: 1.5rem;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.5));
}

.vip-action-btn .btn-text {
    font-size: 1.1rem;
}

.get-vip-btn {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 50%, #ffd700 100%);
    color: #000;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

.get-vip-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.6);
    background: linear-gradient(135deg, #ffed4e 0%, #ffd700 50%, #ffed4e 100%);
}

.get-vip-btn:active {
    transform: translateY(0);
}

.login-vip-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 50%, var(--primary-color) 100%);
    color: var(--text-light);
    box-shadow: 0 4px 15px rgba(255, 0, 255, 0.4);
}

.login-vip-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 0, 255, 0.6);
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 50%, var(--secondary-color) 100%);
}

.login-vip-btn:active {
    transform: translateY(0);
}

/* VIP Login Form Styles */
.vip-login-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

.vip-login-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.vip-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--card-bg);
    color: var(--text-light);
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.vip-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 0, 255, 0.1);
}

.vip-input::placeholder {
    color: var(--text-muted);
}

.vip-error-message {
    padding: 0.75rem;
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid rgba(255, 0, 0, 0.3);
    border-radius: 6px;
    color: #ff6b6b;
    font-size: 0.9rem;
    text-align: center;
}

.vip-login-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.vip-login-buttons .vip-action-btn {
    width: 100%;
}

/* VIP Login Page Styles */
.vip-login-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-darker) 0%, var(--bg-color) 100%);
    padding: 1rem;
    box-sizing: border-box;
}

.vip-login-container {
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
    padding: 0;
}

.vip-login-box {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    width: 100%;
    box-sizing: border-box;
}

.vip-login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.vip-login-logo {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    object-fit: contain;
    margin: 0 auto 1rem;
    display: block;
}

.vip-login-title {
    color: var(--primary-color);
    font-size: 1.75rem;
    font-weight: bold;
    margin: 0 0 0.5rem 0;
}

.vip-login-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 0;
}

.vip-login-form .form-group input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-darker);
    color: var(--text-light);
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.vip-login-form .form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 0, 255, 0.1);
}

.vip-login-form .form-group input::placeholder {
    color: var(--text-muted);
}

.vip-login-form .login-btn {
    width: 100%;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.vip-login-form .login-btn .btn-icon {
    font-size: 1.2rem;
}

.vip-login-form .home-btn {
    width: 100%;
    margin-top: 0.75rem;
    padding: 0.875rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.vip-login-form .home-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-1px);
}

.vip-login-form .home-btn:active {
    transform: translateY(0);
}

.vip-login-form .home-btn .btn-icon {
    font-size: 1.2rem;
}

.vip-login-form .error-message {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid rgba(255, 0, 0, 0.3);
    border-radius: 6px;
    color: #ff6b6b;
    font-size: 0.9rem;
    text-align: center;
}

/* VIP Player Styles - Clean Modern Design (Streamity-inspired) */
.vip-player-section {
    padding: 0;
    height: 100vh;
    max-height: 100vh;
    background: var(--bg-darker);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* VIP Header - Compact and Professional */
.vip-header-main {
    background: rgba(0, 0, 0, 0.6);
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    backdrop-filter: blur(10px);
}

.vip-logo-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.vip-logo {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    object-fit: contain;
}

.vip-title {
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 0 8px rgba(255, 0, 255, 0.4);
}

.vip-header-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.vip-search-toggle,
.vip-logout-btn,
.vip-back-btn,
.vip-home-btn {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-light);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}

.vip-search-toggle:hover,
.vip-logout-btn:hover,
.vip-back-btn:hover,
.vip-home-btn:hover {
    background: rgba(255, 0, 255, 0.2);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(255, 0, 255, 0.3);
}

/* Search Bar */
.vip-search-bar {
    padding: 0.75rem 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.vip-search-bar input {
    flex: 1;
    padding: 0.65rem 0.85rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-light);
    font-size: 0.9rem;
}

.vip-search-bar input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(255, 0, 255, 0.2);
}

.vip-search-clear {
    padding: 0.5rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.1rem;
    transition: color 0.3s;
}

.vip-search-clear:hover {
    color: var(--primary-color);
}

/* Main Container */
.vip-main-container {
    display: flex;
    flex: 1;
    overflow: hidden;
    height: 100%;
    min-height: 0; /* Allow flex child to shrink */
}

/* Sidebar - Compact Design */
.vip-sidebar {
    width: 240px;
    background: rgba(0, 0, 0, 0.5);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 100vh;
    overflow: hidden;
}

.vip-nav {
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    flex-shrink: 0; /* Don't shrink nav items */
}

.vip-nav-item {
    padding: 0.85rem 1rem;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-align: left;
}

.vip-nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-light);
}

.vip-nav-item.active {
    background: linear-gradient(135deg, rgba(255, 0, 255, 0.25) 0%, rgba(139, 0, 255, 0.25) 100%);
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.2);
}

.nav-icon {
    font-size: 1.3rem;
    width: 24px;
    text-align: center;
}

.nav-text {
    font-weight: 600;
}

/* Category Sidebar */
.vip-category-sidebar {
    padding: 0.75rem;
    border-top: 1px solid var(--border-color);
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0; /* Allow flex child to shrink below content size */
    /* Custom scrollbar styling */
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 0, 255, 0.5) rgba(0, 0, 0, 0.3);
}

/* Custom scrollbar for webkit browsers (Chrome, Safari, Edge) */
.vip-category-sidebar::-webkit-scrollbar {
    width: 6px;
}

.vip-category-sidebar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
}

.vip-category-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 0, 255, 0.5);
    border-radius: 3px;
}

.vip-category-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 0, 255, 0.7);
}

.category-sidebar-title {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.75rem;
    padding: 0 0.5rem;
}

.vip-category-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.vip-category-item {
    padding: 0.65rem 0.85rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid transparent;
    border-radius: 6px;
    color: var(--text-light);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s;
}

.vip-category-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-color);
    color: var(--primary-color);
}

.vip-category-item.active {
    background: linear-gradient(135deg, rgba(255, 0, 255, 0.2) 0%, rgba(139, 0, 255, 0.2) 100%);
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 0 10px rgba(255, 0, 255, 0.15);
}

/* Content Main */
.vip-content-main {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
}

.vip-content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.vip-content-header h2 {
    color: var(--primary-color);
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 0 8px rgba(255, 0, 255, 0.3);
}

.content-count {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
}

/* Loading */
.vip-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem;
    color: var(--text-muted);
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Content Grid - Better Spacing */
.vip-content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
}

.vip-content-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.vip-content-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 6px 20px rgba(255, 0, 255, 0.35);
    background: rgba(255, 255, 255, 0.08);
}

.vip-content-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--bg-darker) 0%, var(--bg-dark) 100%);
    display: block;
}

.vip-content-info {
    padding: 0.85rem;
}

.vip-content-info h4 {
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0 0 0.4rem 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.vip-content-info p {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin: 0;
}

/* Tab Content */
.vip-tab-content {
    display: none;
}

.vip-tab-content.active {
    display: block;
}

/* VIP Player Modal */
.vip-player-modal .modal-content {
    max-width: 95%;
    max-height: 95vh;
    width: 100%;
}

.vip-player-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.vip-player-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.vip-player-header-bar h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
}

.vip-player-video-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    min-height: 400px;
}

.vip-video-player {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 80vh;
}

.vip-player-info {
    padding: 1rem;
    background: var(--bg-darker);
    border-top: 1px solid var(--border-color);
}

.vip-episode-card {
    padding: 1rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.3s;
}

.vip-episode-card:hover {
    background: var(--card-hover);
    border-color: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .events-grid,
    .channels-grid,
    .content-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 0.75rem;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }

    .quick-links {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }

    /* VIP Login - Tablet */
    .vip-login-section {
        padding: 1.5rem 1rem;
    }

    .vip-login-box {
        padding: 2rem 1.5rem;
    }

    .vip-login-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 1rem;
    }

    .events-grid,
    .channels-grid,
    .content-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }

    .app-title {
        font-size: 1.25rem;
    }

    /* VIP Login - Mobile */
    .vip-login-section {
        padding: 1rem 0.75rem;
        align-items: center;
        justify-content: center;
    }

    .vip-login-container {
        width: 100%;
        max-width: 100%;
        padding: 0;
    }

    .vip-login-box {
        padding: 1.5rem 1.25rem;
        border-radius: 12px;
        margin: 0 auto;
    }

    .vip-login-header {
        margin-bottom: 1.5rem;
    }

    .vip-login-logo {
        width: 56px;
        height: 56px;
        margin-bottom: 0.75rem;
    }

    .vip-login-title {
        font-size: 1.4rem;
        margin-bottom: 0.5rem;
    }

    .vip-login-subtitle {
        font-size: 0.875rem;
    }

    .vip-login-form .form-group {
        margin-bottom: 0.75rem;
    }

    .vip-login-form .form-group input {
        padding: 0.75rem 0.875rem;
        font-size: 0.95rem;
    }
}

/* Player Page Styles */
.player-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 3000;
    display: flex;
    flex-direction: column;
}

.player-header {
    padding: 1rem;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.player-title {
    color: var(--text-light);
    font-size: 1rem;
    flex: 1;
    margin-right: 1rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.player-close {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

.video-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

#video-player {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
}

/* VIP Series Selection Modal */
.vip-series-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2500;
    backdrop-filter: blur(5px);
}

.vip-series-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.vip-series-container {
    background: var(--bg-darker);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.vip-series-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.vip-series-header h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin: 0;
}

.vip-series-content {
    display: flex;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

.vip-series-left {
    width: 300px;
    padding: 1.5rem;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    flex-shrink: 0;
}

.vip-series-poster {
    width: 100%;
    max-width: 250px;
    border-radius: 8px;
    margin-bottom: 1rem;
    object-fit: cover;
}

.vip-series-seasons-title,
.vip-series-episodes-title {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin: 1rem 0 0.5rem 0;
    font-weight: bold;
}

.vip-series-seasons-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.vip-season-btn {
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-light);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
    text-align: left;
}

.vip-season-btn:hover {
    background: rgba(255, 0, 255, 0.1);
    border-color: var(--primary-color);
}

.vip-season-btn.active {
    background: rgba(255, 0, 255, 0.2);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.vip-series-right {
    flex: 1;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    min-height: 0;
}

.vip-series-info-section {
    margin-bottom: 1.5rem;
    flex-shrink: 0;
}

.vip-series-info-section h4 {
    font-size: 1.3rem;
    color: var(--text-light);
    margin: 0 0 0.75rem 0;
}

.vip-series-plot {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

.vip-series-episodes-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
    overflow-y: auto;
}

.vip-episode-btn {
    padding: 0.875rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-light);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.vip-episode-btn:hover {
    background: rgba(255, 0, 255, 0.1);
    border-color: var(--primary-color);
    transform: translateX(5px);
}

.vip-episode-btn .episode-number {
    font-weight: bold;
    color: var(--primary-color);
    min-width: 50px;
}

.vip-episode-btn .episode-title {
    flex: 1;
}

/* Error Message */
.error-message {
    background: rgba(255, 0, 0, 0.2);
    border: 1px solid rgba(255, 0, 0, 0.5);
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    color: #ff6b6b;
    text-align: center;
}

