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

:root {
    --primary-color: #1a1a2e;
    --secondary-color: #16213e;
    --accent-color: #0f3460;
    --highlight-color: #e94560;
    --text-color: #ffffff;
    --text-secondary: #b8b8b8;
    --card-bg: #1e1e3f;
    --card-hover: #252550;
    --border-color: #2d2d5a;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--text-color);
    min-height: 100vh;
    line-height: 1.5;
    font-size: 14px;
}

.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 10px;
}

/* Header - Mobile Optimized */
header {
    background: var(--secondary-color);
    padding: 10px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    border-bottom: 2px solid var(--highlight-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.header-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    width: 100%;
}

header h1 {
    font-size: 1.2em;
    margin: 0;
    background: linear-gradient(45deg, var(--highlight-color), #ff6b9d);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
    line-height: 1.2;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 0.75em;
    margin: 0;
    white-space: nowrap;
    line-height: 1.2;
}

/* Navigation - Mobile Optimized */
.categories-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 5px;
}

.search-bar-inline {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    margin-top: 8px;
}

.search-bar-inline input {
    flex: 1;
    padding: 10px 12px;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-color);
    font-size: 0.9em;
    outline: none;
    transition: all 0.3s ease;
    min-width: 0;
}

.search-bar-inline input:focus {
    border-color: var(--highlight-color);
    box-shadow: 0 0 8px rgba(233, 69, 96, 0.3);
}

.search-bar-inline button {
    padding: 10px 15px;
    background: var(--highlight-color);
    border: none;
    border-radius: 20px;
    color: var(--text-color);
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
}

.search-bar-inline button:active {
    background: #ff6b9d;
    transform: scale(0.95);
}

.category-btn {
    background: var(--card-bg);
    color: var(--text-color);
    border: 2px solid var(--border-color);
    padding: 10px 14px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85em;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
    min-height: 44px;
    touch-action: manipulation;
}

.category-btn:active {
    background: var(--card-hover);
    transform: scale(0.95);
}

.category-btn.active {
    background: var(--highlight-color);
    border-color: var(--highlight-color);
    box-shadow: 0 2px 4px rgba(233, 69, 96, 0.3);
}

.category-btn,
a.category-btn {
    text-decoration: none;
    display: inline-block;
}

a.category-btn:active {
    text-decoration: none;
    transform: scale(0.95);
}

/* Main Container */
.main-container {
    padding: 15px 10px;
}

/* Welcome Section - Mobile Optimized */
.welcome-section {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

.welcome-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    border: 2px solid var(--border-color);
    width: 100%;
    max-width: 100%;
}

.welcome-card i {
    font-size: 3em;
    color: var(--highlight-color);
    margin-bottom: 15px;
    display: block;
}

.welcome-card h2 {
    font-size: 1.4em;
    margin-bottom: 10px;
    color: var(--text-color);
}

.welcome-card p {
    font-size: 1em;
    color: var(--text-secondary);
}

/* Channels Section - Mobile Optimized */
.channels-section {
    margin-top: 20px;
}

.channels-section h2 {
    font-size: 1.4em;
    margin-bottom: 15px;
    text-align: center;
    color: var(--highlight-color);
}

.channels-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.channel-card {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
    touch-action: manipulation;
}

.channel-card:active {
    transform: scale(0.98);
    border-color: var(--highlight-color);
    background: var(--card-hover);
}

.channel-card.active {
    border-color: var(--highlight-color);
    background: var(--card-hover);
    box-shadow: 0 0 15px rgba(233, 69, 96, 0.4);
}

.channel-logo {
    margin-bottom: 8px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.channel-logo-img {
    max-width: 100%;
    max-height: 60px;
    object-fit: contain;
    border-radius: 6px;
}

.channel-logo-icon,
.channel-logo-fallback {
    font-size: 2em;
    color: var(--highlight-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.channel-name {
    font-size: 0.9em;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-color);
    line-height: 1.3;
}

.channel-category {
    font-size: 0.7em;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.channel-card.hidden {
    display: none;
}

/* Footer - Mobile Optimized */
footer {
    background: var(--secondary-color);
    padding: 20px 0;
    margin-top: 30px;
    text-align: center;
    border-top: 2px solid var(--border-color);
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.85em;
    padding: 5px 10px;
    min-height: 44px;
    display: flex;
    align-items: center;
}

.footer-links a:active {
    color: var(--highlight-color);
    transform: scale(0.95);
}

footer p {
    color: var(--text-secondary);
    margin: 5px 0;
    font-size: 0.85em;
}

footer p a {
    color: var(--highlight-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

footer p a:active {
    color: #ff6b9d;
    text-decoration: underline;
}

.disclaimer {
    font-size: 0.8em;
    color: var(--text-secondary);
    opacity: 0.7;
}

.disclaimer a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.disclaimer a:active {
    color: var(--highlight-color);
    opacity: 1;
}

/* Legal Pages Styles - Mobile Optimized */
.legal-content {
    background: var(--card-bg);
    padding: 20px 15px;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    border: 2px solid var(--border-color);
    width: 100%;
    margin: 0 auto;
}

.legal-content h1 {
    color: var(--highlight-color);
    margin-bottom: 20px;
    font-size: 1.4em;
}

.legal-content h2 {
    color: var(--text-color);
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.legal-content p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 12px;
    font-size: 0.9em;
}

.contact-content {
    background: var(--card-bg);
    padding: 20px 15px;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    border: 2px solid var(--border-color);
    width: 100%;
    margin: 0 auto;
}

.contact-content h1 {
    color: var(--highlight-color);
    margin-bottom: 20px;
    font-size: 1.4em;
}

.contact-content p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 15px;
    font-size: 0.9em;
}

.contact-info {
    margin-top: 20px;
}

.contact-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding: 15px;
    background: var(--accent-color);
    border-radius: 10px;
    text-align: center;
}

.contact-item i {
    font-size: 1.5em;
    color: var(--highlight-color);
}

.contact-item div {
    flex: 1;
}

.contact-item strong {
    color: var(--text-color);
    display: block;
    margin-bottom: 5px;
    font-size: 0.95em;
}

.contact-item span {
    color: var(--text-secondary);
    font-size: 0.85em;
}

/* Watch Page Styles - Mobile Optimized */
.watch-header-bar {
    margin-bottom: 15px;
    padding: 10px 0;
}

.channel-title-info {
    text-align: center;
}

.channel-title-info h2 {
    margin: 0;
    color: var(--highlight-color);
    font-size: 1.3em;
}

.channel-title-info p {
    margin: 5px 0 0 0;
    color: var(--text-secondary);
    font-size: 0.85em;
}

.channel-description {
    padding: 15px;
    background: var(--accent-color);
    border-top: 2px solid var(--border-color);
}

.channel-description h3 {
    color: var(--highlight-color);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 1.1em;
}

.channel-description p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
    font-size: 0.9em;
}

.spinner {
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--highlight-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

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

#videoPlayer {
    width: 100%;
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

#videoPlayer iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

#videoPlayer .placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    flex-direction: column;
    gap: 10px;
    padding: 20px;
}

#videoPlayer .placeholder i {
    font-size: 2.5em;
    color: var(--text-secondary);
}

#videoPlayer .placeholder p {
    font-size: 1em;
    color: var(--text-secondary);
    text-align: center;
}

#videoPlayer .loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

/* Loading Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Landscape orientation optimization */
@media (orientation: landscape) and (max-height: 500px) {
    header {
        padding: 5px 0;
    }
    
    .welcome-section {
        min-height: 100px;
    }
    
    .welcome-card {
        padding: 15px;
    }
    
    .welcome-card i {
        font-size: 2em;
    }
    
    .welcome-card h2 {
        font-size: 1.1em;
    }
    
    .welcome-card p {
        font-size: 0.85em;
    }
}

/* Larger mobile devices */
@media (min-width: 480px) {
    .channels-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
    
    .channel-card {
        padding: 15px;
    }
    
    .channel-logo {
        height: 70px;
    }
    
    .channel-logo-icon,
    .channel-logo-fallback {
        font-size: 2.5em;
    }
}

