/* Reset and base styles */
:root {
    --primary-color: #667eea;
    --primary-dark: #5a6fd8;
    --primary-light: #764ba2;
    --secondary-color: #2d3748;
    --accent-color: #f093fb;
    --background-color: #f7fafc;
    --surface-color: #ffffff;
    --text-color: #2d3748;
    --text-light: #718096;
    --text-muted: #a0aec0;
    --border-color: #e2e8f0;
    --border-radius: 12px;
    --border-radius-lg: 16px;
    --box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --box-shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --success-color: #48bb78;
    --warning-color: #ed8936;
    --error-color: #f56565;
    --info-color: #4299e1;
    --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    --gradient-secondary: linear-gradient(135deg, var(--secondary-color), var(--primary-dark));
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Improved focus styles for accessibility */
*:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Skip link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 9999;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 6px;
}

/* Navigation */
nav {
    background-color: var(--surface-color);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--box-shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid var(--border-color);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    text-decoration: none;
}

.logo:hover {
    transform: scale(1.05);
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
    border: none;
    background: none;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.menu-toggle:hover {
    background-color: var(--border-color);
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    margin: 3px 0;
    transition: var(--transition);
    border-radius: 2px;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    nav ul {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--surface-color);
        flex-direction: column;
        padding: 1rem;
        box-shadow: var(--box-shadow);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
        gap: 1rem;
    }

    nav ul.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    nav {
        padding: 1rem;
    }
}

nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    padding: 0.75rem 1.25rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

nav a::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-primary);
    border-radius: var(--border-radius);
    opacity: 0;
    transition: var(--transition);
    z-index: -1;
}

nav a:hover::before {
    opacity: 0.1;
}

nav a.active {
    color: var(--primary-color);
    background-color: rgba(102, 126, 234, 0.1);
}

nav a.active::before {
    opacity: 0.1;
}

/* Hero section */
.hero {
    text-align: center;
    padding: 8rem 2rem 6rem;
    background: var(--gradient-primary);
    color: white;
    position: relative;
    overflow: hidden;
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.1" d="M0,96L48,122.7C96,149,192,203,288,208C384,213,480,171,576,170.7C672,171,768,213,864,213.3C960,213,1056,171,1152,154.7C1248,139,1344,149,1392,154.7L1440,160L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>');
    background-repeat: no-repeat;
    background-position: bottom;
    background-size: cover;
    opacity: 0.1;
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 70%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 70% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.3);
    animation: slideDown 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 700;
    line-height: 1.2;
    z-index: 1;
    position: relative;
}

.hero p {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0;
    animation: fadeIn 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.3s forwards;
    z-index: 1;
    position: relative;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
}

@media (max-width: 768px) {
    .hero {
        padding: 6rem 1rem 4rem;
        min-height: 50vh;
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 0.9;
    }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    gap: 0.75rem;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 160px;
    box-shadow: var(--box-shadow);
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.2) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.btn:hover::before {
    transform: translateX(100%);
}

.btn:active {
    transform: translateY(1px);
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%) scale(0);
    border-radius: 50%;
    transition: transform 0.5s ease;
}

.btn:hover::before {
    transform: translate(-50%, -50%) scale(2);
}

.primary {
    background: var(--gradient-primary);
    color: white;
    border: 2px solid transparent;
}

.primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--box-shadow-lg);
    filter: brightness(1.1);
}

.secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    backdrop-filter: blur(10px);
}

.secondary:hover {
    background: var(--gradient-primary);
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--box-shadow-lg);
}

/* CTA Buttons Container */
.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    z-index: 1;
    position: relative;
}

@media (max-width: 480px) {
    .cta-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .btn {
        width: 100%;
        max-width: 280px;
    }
}

/* Table Styles */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 1rem 0;
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

th {
    background-color: rgba(52, 152, 219, 0.1);
    color: var(--secondary-color);
    font-weight: 600;
    text-align: left;
    padding: 1rem;
    border-bottom: 2px solid rgba(52, 152, 219, 0.1);
}

td {
    padding: 1rem;
    border-bottom: 1px solid #eee;
    transition: var(--transition);
}

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

tr:hover td {
    background-color: rgba(52, 152, 219, 0.05);
}

.live-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: var(--accent-color);
    color: var(--white);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(231, 76, 60, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0);
    }
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Streams Section */
.live-streams {
    padding: 4rem 2rem;
    background: var(--surface-color);
}

.live-streams h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
}

.live-streams h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.streams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem;
}

@media (max-width: 1200px) {
    .streams-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .streams-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0.5rem;
    }
}

.stream-card {
    background: var(--surface-color);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    border: 1px solid var(--border-color);
    isolation: isolate;
}

.stream-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: var(--transition);
    z-index: -1;
}

.stream-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--box-shadow-lg);
    border-color: var(--primary-color);
}

.stream-card:hover::before {
    opacity: 0.05;
}

.stream-thumbnail {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--border-color), var(--background-color));
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.stream-thumbnail::before {
    content: '🎥';
    font-size: 3rem;
    opacity: 0.3;
    position: absolute;
}

.live-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--error-color);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    animation: pulse 2s infinite;
    box-shadow: 0 2px 8px rgba(245, 101, 101, 0.4);
}

.stream-info {
    padding: 1.5rem;
}

.stream-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-color);
    line-height: 1.4;
    display: -webkit-box;
    display: box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    box-orient: vertical;
    overflow: hidden;
}

.stream-description {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.5;
    display: -webkit-box;
    display: box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    box-orient: vertical;
    overflow: hidden;
}

/* Forms */
.stream-form {
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.stream-form:hover {
    box-shadow: 0 5px 25px rgba(0,0,0,0.1);
}

.stream-form {
    background-color: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    max-width: 800px;
    margin: 2rem auto;
}

.stream-form h2 {
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.stream-form h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 3px;
}

.form-group {
    position: relative;
    margin-bottom: 2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.75rem;
    color: var(--text-color);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.025em;
}

.form-group label.required::after {
    content: ' *';
    color: var(--error-color);
}

.form-input {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
    background-color: var(--surface-color);
    font-family: inherit;
    line-height: 1.5;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background-color: white;
}

.form-input:invalid {
    border-color: var(--error-color);
}

.form-input:invalid:focus {
    box-shadow: 0 0 0 3px rgba(245, 101, 101, 0.1);
}

.form-input::placeholder {
    color: var(--text-muted);
    opacity: 1;
}

textarea.form-input {
    resize: vertical;
    min-height: 120px;
    max-height: 300px;
}

/* Input Groups */
.input-group {
    display: flex;
    align-items: stretch;
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 2px solid var(--border-color);
    transition: var(--transition);
}

.input-group:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-group .form-input {
    border: none;
    border-radius: 0;
    box-shadow: none;
}

.input-group-prepend,
.input-group-append {
    background: var(--background-color);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    white-space: nowrap;
    color: var(--text-light);
    font-weight: 500;
    font-size: 0.9rem;
}

/* Form Validation */
.form-error {
    color: var(--error-color);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-error::before {
    content: '⚠️';
    font-size: 0.75rem;
}

.form-success {
    color: var(--success-color);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-success::before {
    content: '✅';
    font-size: 0.75rem;
}

.form-hint {
    color: var(--text-light);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    line-height: 1.4;
}

/* Copy to Clipboard Button */
.copy-btn {
    background: var(--surface-color);
    border: 2px solid var(--border-color);
    color: var(--text-color);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.875rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.copy-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.copy-btn.copied {
    background: var(--success-color);
    color: white;
    border-color: var(--success-color);
}

/* Stream Settings Card */
.settings-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    margin: 1rem 0;
    box-shadow: var(--box-shadow);
}

.settings-card h3 {
    margin: 0 0 1rem 0;
    color: var(--text-color);
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.setting-item:last-child {
    border-bottom: none;
}

.setting-label {
    font-weight: 500;
    color: var(--text-color);
}

.setting-value {
    font-family: 'Courier New', monospace;
    background: var(--background-color);
    padding: 0.5rem 0.75rem;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .setting-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .setting-value {
        max-width: 100%;
        width: 100%;
    }
}

/* Enhanced Form Styles */
.form-group {
    position: relative;
    margin-bottom: 2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.75rem;
    color: var(--text-color);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.025em;
}

.form-group label.required::after {
    content: ' *';
    color: var(--error-color);
}

.form-input {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
    background-color: var(--surface-color);
    font-family: inherit;
    line-height: 1.5;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background-color: white;
}

.form-input:invalid {
    border-color: var(--error-color);
}

.form-input:invalid:focus {
    box-shadow: 0 0 0 3px rgba(245, 101, 101, 0.1);
}

.form-input::placeholder {
    color: var(--text-muted);
    opacity: 1;
}

textarea.form-input {
    resize: vertical;
    min-height: 120px;
    max-height: 300px;
}

/* Input Groups */
.input-group {
    display: flex;
    align-items: stretch;
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 2px solid var(--border-color);
    transition: var(--transition);
}

.input-group:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-group .form-input {
    border: none;
    border-radius: 0;
    box-shadow: none;
}

.input-group-prepend,
.input-group-append {
    background: var(--background-color);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    white-space: nowrap;
    color: var(--text-light);
    font-weight: 500;
    font-size: 0.9rem;
}

/* Form Validation */
.form-error {
    color: var(--error-color);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-error::before {
    content: '⚠️';
    font-size: 0.75rem;
}

.form-success {
    color: var(--success-color);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-success::before {
    content: '✅';
    font-size: 0.75rem;
}

.form-hint {
    color: var(--text-light);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    line-height: 1.4;
}

/* Copy to Clipboard Button */
.copy-btn {
    background: var(--surface-color);
    border: 2px solid var(--border-color);
    color: var(--text-color);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.875rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.copy-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.copy-btn.copied {
    background: var(--success-color);
    color: white;
    border-color: var(--success-color);
}

/* Stream Settings Card */
.settings-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    margin: 1rem 0;
    box-shadow: var(--box-shadow);
}

.settings-card h3 {
    margin: 0 0 1rem 0;
    color: var(--text-color);
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.setting-item:last-child {
    border-bottom: none;
}

.setting-label {
    font-weight: 500;
    color: var(--text-color);
}

.setting-value {
    font-family: 'Courier New', monospace;
    background: var(--background-color);
    padding: 0.5rem 0.75rem;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .setting-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .setting-value {
        max-width: 100%;
        width: 100%;
    }
}

/* Viewer-specific styles */
.viewer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1rem;
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
    min-height: 80vh;
}

.video-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.video-player-wrapper {
    background: var(--surface-color);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--box-shadow-lg);
}

.video-container {
    position: relative;
    background: #000;
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
    overflow: hidden;
    aspect-ratio: 16/9;
}

.video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 10;
}

.video-loading {
    color: white;
    text-align: center;
}

.video-loading .loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

.video-error {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 15;
}

.error-content {
    color: white;
    text-align: center;
    padding: 2rem;
}

.error-content h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.video-controls-overlay {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(0, 0, 0, 0.7);
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    opacity: 0;
    transition: var(--transition);
    z-index: 5;
}

.video-container:hover .video-controls-overlay {
    opacity: 1;
}

.control-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

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

.volume-control {
    flex: 1;
    max-width: 100px;
}

.volume-control input[type="range"] {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.volume-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
}

.volume-control input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.stream-info {
    padding: 1.5rem;
    background: var(--surface-color);
    border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
}

.stream-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.stream-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
}

.stream-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-shrink: 0;
}

.viewer-count {
    color: var(--text-light);
    font-size: 0.9rem;
}

.live-indicator {
    background: var(--error-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius);
    font-size: 0.8rem;
    font-weight: 600;
    animation: pulse 2s infinite;
}

.stream-description {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.stream-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.chat-section {
    background: var(--surface-color);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow);
    height: 400px;
    display: flex;
    flex-direction: column;
}

.chat-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.chat-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    max-height: 280px;
}

.chat-message {
    margin-bottom: 0.75rem;
    padding: 0.5rem;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
}

.chat-message.system {
    background: var(--info-color);
    color: white;
}

.chat-message.own {
    background: var(--primary-color);
    color: white;
    margin-left: 2rem;
}

.chat-message .username {
    font-weight: 600;
    margin-right: 0.5rem;
}

.chat-message .timestamp {
    font-size: 0.8rem;
    opacity: 0.7;
    margin-left: 0.5rem;
}

.chat-input {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 0.75rem;
}

.chat-input input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition);
}

.chat-input input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.live-streams-section {
    background: var(--surface-color);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

.section-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-header h2 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.streams-filter {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.streams-filter input,
.streams-filter select {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition);
}

.streams-filter input:focus,
.streams-filter select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.streams-grid {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 600px;
    overflow-y: auto;
}

.stream-card {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    background: var(--surface-color);
}

.stream-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--box-shadow);
    border-color: var(--primary-color);
}

.stream-card:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.stream-thumbnail {
    position: relative;
    aspect-ratio: 16/9;
    background: var(--border-color);
    overflow: hidden;
}

.stream-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.stream-card:hover .stream-thumbnail img {
    transform: scale(1.05);
}

.live-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background: var(--error-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius);
    font-size: 0.75rem;
    font-weight: 600;
    animation: pulse 2s infinite;
}

.offline-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background: var(--text-muted);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius);
    font-size: 0.75rem;
    font-weight: 600;
}

.stream-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.stream-card:hover .stream-overlay {
    opacity: 1;
}

.play-button {
    font-size: 2rem;
    color: white;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem;
    border-radius: 50%;
    backdrop-filter: blur(10px);
}

.stream-content {
    padding: 1rem;
}

.stream-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
}

.stream-content .stream-description {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
}

.stream-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-light);
}

.category {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius);
    font-size: 0.7rem;
}

.no-streams {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-light);
}

.no-streams h3 {
    margin-bottom: 1rem;
    color: var(--text-color);
}

.loading-placeholder {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.loading-skeleton {
    height: 120px;
    background: linear-gradient(90deg, var(--border-color) 25%, #f0f0f0 50%, var(--border-color) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: var(--border-radius);
}

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

.video-container.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    border-radius: 0;
}

.notification-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.notification {
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    color: white;
    font-weight: 500;
    max-width: 300px;
    animation: slideIn 0.3s ease-out;
    box-shadow: var(--box-shadow-lg);
}

.notification.info {
    background: var(--info-color);
}

.notification.success {
    background: var(--success-color);
}

.notification.warning {
    background: var(--warning-color);
}

.notification.error {
    background: var(--error-color);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

/* Responsive design for viewer */
@media (max-width: 1024px) {
    .viewer-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .sidebar {
        order: -1;
    }
    
    .video-controls-overlay {
        bottom: 0.5rem;
        left: 0.5rem;
        right: 0.5rem;
        padding: 0.5rem;
    }
    
    .control-btn {
        font-size: 1rem;
        padding: 0.4rem;
    }
}

@media (max-width: 768px) {
    .viewer-container {
        padding: 1rem;
        gap: 1rem;
    }
    
    .video-container {
        aspect-ratio: 16/9;
    }
    
    .stream-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .stream-meta {
        gap: 0.75rem;
    }
    
    .stream-actions {
        gap: 0.75rem;
    }
    
    .stream-actions .btn {
        font-size: 0.9rem;
        padding: 0.6rem 1rem;
    }
    
    .chat-section {
        height: 300px;
    }
    
    .streams-filter {
        gap: 0.5rem;
    }
    
    .streams-grid {
        max-height: 400px;
    }
}

@media (max-width: 480px) {
    .viewer-container {
        padding: 0.5rem;
    }
    
    .video-player-wrapper {
        border-radius: var(--border-radius);
    }
    
    .video-container {
        border-radius: var(--border-radius) var(--border-radius) 0 0;
    }
    
    .stream-info {
        padding: 1rem;
        border-radius: 0 0 var(--border-radius) var(--border-radius);
    }
    
    .stream-header h2 {
        font-size: 1.3rem;
    }
    
    .stream-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .stream-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    .video-controls-overlay {
        bottom: 0.25rem;
        left: 0.25rem;
        right: 0.25rem;
        padding: 0.4rem 0.75rem;
        gap: 0.5rem;
    }
    
    .control-btn {
        font-size: 0.9rem;
        padding: 0.3rem;
    }
    
    .volume-control {
        max-width: 80px;
    }
    
    .chat-input {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .notification {
        max-width: calc(100vw - 2rem);
        font-size: 0.9rem;
    }
}

/* Print Styles */
@media print {
    nav, footer, .cta-buttons, .btn {
        display: none !important;
    }
    
    .hero {
        background: none !important;
        color: black !important;
        padding: 1rem 0 !important;
    }
    
    .stream-card {
        break-inside: avoid;
        border: 1px solid #ccc;
        margin-bottom: 1rem;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #0066cc;
        --secondary-color: #000000;
        --text-color: #000000;
        --background-color: #ffffff;
        --border-color: #000000;
    }
    
    .btn {
        border: 2px solid currentColor;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .spinner {
        animation: none;
        border: 2px solid var(--primary-color);
        border-radius: 50%;
    }
}