/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

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

/* Header Styles */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.header h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

.header h1 i {
    margin-right: 0.5rem;
}

/* Button Styles */
.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-primary {
    background-color: #4CAF50;
    color: white;
}

.btn-primary:hover {
    background-color: #45a049;
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
    transform: translateY(-1px);
}

.btn-streamer {
    background-color: white;
    color: #333;
    border: 2px solid #e0e0e0;
    width: 100%;
    padding: 1rem;
    text-align: left;
    justify-content: space-between;
}

.btn-streamer:hover {
    border-color: #667eea;
    background-color: #f8f9ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

/* Main Content */
.main-content {
    padding: 2rem 0;
    min-height: calc(100vh - 80px);
}

/* Streamers Section */
.streamers-section h2 {
    margin-bottom: 1.5rem;
    color: #333;
    font-size: 1.8rem;
}

.streamers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.streamer-card {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.streamer-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.streamer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.streamer-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
}

.streamer-status {
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-recording {
    background-color: #ffebee;
    color: #c62828;
}

.status-idle {
    background-color: #e8f5e8;
    color: #2e7d32;
}

.streamer-info {
    color: #666;
    font-size: 0.9rem;
}

.streamer-info p {
    margin: 0.25rem 0;
}

/* Video Section */
.video-section {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.video-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.video-header h2 {
    color: #333;
    font-size: 1.5rem;
}

.video-container {
    position: relative;
    width: 100%;
    margin-bottom: 1rem;
}

.video-container video {
    width: 100%;
    height: auto;
    border-radius: 8px;
    background-color: #000;
}

.video-info {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
}

.video-details h3 {
    color: #333;
    margin-bottom: 0.5rem;
}

.video-details p {
    color: #666;
    margin: 0.25rem 0;
}

/* Sessions Section */
.sessions-section {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.sessions-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.sessions-header h2 {
    color: #333;
    font-size: 1.5rem;
}

.sessions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.session-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.session-card:hover {
    background-color: #e9ecef;
    border-color: #667eea;
    transform: translateY(-2px);
}

.session-date {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.session-info {
    color: #666;
    font-size: 0.9rem;
}

/* Loading Spinner */
.loading-spinner {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 1000;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

/* Error Message */
.error-message {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #f8d7da;
    color: #721c24;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #f5c6cb;
    z-index: 1000;
    max-width: 300px;
}

.error-message i {
    margin-right: 0.5rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 10px;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .header h1 {
        font-size: 1.3rem;
    }
    
    .streamers-grid {
        grid-template-columns: 1fr;
    }
    
    .sessions-grid {
        grid-template-columns: 1fr;
    }
    
    .video-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .sessions-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .main-content {
        padding: 1rem 0;
    }
    
    .streamer-card {
        padding: 0.75rem;
    }
    
    .video-section,
    .sessions-section {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.1rem;
    }
    
    .btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .streamer-name {
        font-size: 1.1rem;
    }
    
    .video-header h2,
    .sessions-header h2 {
        font-size: 1.3rem;
    }
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }

/* Ad Container Styles */
.ad-container {
    margin: 1rem 0;
    text-align: center;
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 0.5rem;
    border: 1px solid #e9ecef;
}

.ad-container > div,
.ad-container ins {
    margin: 0 auto;
}

/* Banner Ad Styles */
.banner-ad-ins {
    display: block;
    width: 100%;
    min-height: 90px;
    background-color: #ffffff;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Mobile Banner Ad Styles */
.mobile-banner-ad-ins {
    display: none;
    width: 100%;
    min-height: 90px;
    background-color: #ffffff;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.ad-header {
    margin-top: 0.5rem;
    margin-bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    border: none;
    padding: 0.25rem;
}

.ad-between-sections {
    margin: 2rem 0;
    background-color: #ffffff;
    border: 1px solid #dee2e6;
}

.ad-sidebar {
    margin-top: 1rem;
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    max-width: 300px;
}

/* Responsive ad styles */
@media (max-width: 768px) {
    .ad-container {
        margin: 0.5rem 0;
        padding: 0.25rem;
    }
    
    .ad-header {
        margin-top: 0.25rem;
        margin-bottom: 0;
    }
    
    .ad-between-sections {
        margin: 1rem 0;
    }
    
    .ad-sidebar {
        max-width: 100%;
        margin-top: 0.5rem;
    }
    
    /* Show mobile banner ad on mobile devices */
    .banner-ad-ins {
        display: none;
    }
    
    .mobile-banner-ad-ins {
        display: block;
    }
}