/**
 * IndieStream Live - Sjednocený design s index.php
 * Používá stejné barevné schéma jako hlavní stránka
 */

/* ============================================
   IMPORT FONTS
============================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ============================================
   ROOT VARIABLES - SJEDNOCENO S INDEX.PHP
============================================ */
:root {
    /* Hlavní barvy z index.php */
    --primary-color: #2E86AB;
    --primary-dark: #1E5F7A;
    --secondary-color: #A23B72;
    --accent-color: #F18F01;
    
    /* Pozadí */
    --background-primary: #0F1419;
    --background-secondary: #1A2332;
    --background-card: #243447;
    --background-modal: #2D4356;
    
    /* Text */
    --text-primary: #F5F7FA;
    --text-secondary: #B8C5D1;
    --text-muted: #7A8FA3;
    
    /* Další */
    --border-color: #3A4D63;
    --success-color: #46d369;
    --warning-color: #F18F01;
    --error-color: #E74C3C;
    --gold-color: #F39C12;
    
    /* Stíny */
    --shadow-light: 0 2px 8px rgba(15, 20, 25, 0.2);
    --shadow-medium: 0 4px 16px rgba(15, 20, 25, 0.3);
    --shadow-heavy: 0 8px 32px rgba(15, 20, 25, 0.5);
    --shadow-glow: 0 0 20px rgba(46, 134, 171, 0.4);
    
    /* Gradienty */
    --gradient-primary: linear-gradient(135deg, #2E86AB 0%, #A23B72 100%);
    --gradient-secondary: linear-gradient(135deg, #243447 0%, #2D4356 100%);
    --gradient-hero: linear-gradient(135deg, rgba(46, 134, 171, 0.15) 0%, rgba(162, 59, 114, 0.1) 100%);
    --gradient-background: linear-gradient(180deg, #2E5984 0%, #1B3B5C 25%, #0F2A42 50%, #0A1D2E 75%, #05111A 100%);
    
    /* Border radius */
    --border-radius-sm: 6px;
    --border-radius-md: 12px;
    --border-radius-lg: 20px;
    
    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   GLOBAL RESET & BASE
============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--gradient-background);
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(46, 134, 171, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(162, 59, 114, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(46, 134, 171, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* ============================================
   NAVIGATION - SJEDNOCENO S INDEX.PHP
============================================ */
.stream-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    width: 100%;
    background: rgba(26, 35, 50, 0.95);
    backdrop-filter: blur(20px);
    padding: 0.75rem 0 1.5rem 0;
    animation: slideDown 0.6s ease-out;
    box-shadow: 0 2px 20px rgba(15, 20, 25, 0.3);
    border-radius: 0 0 50% 50% / 0 0 30px 30px;
}

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

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0;
    font-size: 1.62rem;
    font-weight: 800;
    text-decoration: none;
    letter-spacing: -0.02em;
    transition: var(--transition-normal);
}

.logo-indie {
    color: #0b79bc;
    font-size: 1.62rem;
    font-weight: 800;
}

.logo-stream {
    color: #c7c7c7;
    font-size: 1.62rem;
    font-weight: 800;
}

.logo-cz {
    font-size: 0.81rem;
    font-weight: 800;
    line-height: 1.1;
    color: #c7c7c7;
}

.logo-prefix {
    font-size: 0.81rem;
    font-weight: 800;
    line-height: 1.1;
    color: #E74C3C;
    margin-right: 1px;
}

.nav-logo:hover .logo-indie {
    color: var(--primary-color);
    text-shadow: 0 0 30px var(--shadow-glow);
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-sm);
    transition: var(--transition-normal);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 80%;
    height: 2px;
    background: var(--gradient-primary);
    transition: transform var(--transition-normal);
    border-radius: 2px;
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(46, 134, 171, 0.15);
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: translateX(-50%) scaleX(1);
}

.nav-link.active {
    color: var(--primary-color);
    background: rgba(46, 134, 171, 0.15);
}

/* ============================================
   HERO SECTION
============================================ */
.hero-section {
    padding: 6rem 2rem 4rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-top: 60px; /* Kompenzace fixed navigace */
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(46, 134, 171, 0.15) 0%, rgba(162, 59, 114, 0.08) 50%, transparent 70%);
    pointer-events: none;
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.8; transform: translate(-50%, -50%) scale(1.1); }
}

.hero-container {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    box-shadow: var(--shadow-glow);
    animation: glow 2s ease-in-out infinite;
    margin-bottom: 1.5rem;
}

@keyframes glow {
    0%, 100% { box-shadow: var(--shadow-glow); }
    50% { box-shadow: 0 0 40px rgba(46, 134, 171, 0.5), 0 0 60px rgba(162, 59, 114, 0.3); }
}

.hero-title {
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--text-primary), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    font-weight: 400;
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================
   SECTIONS
============================================ */
.active-streams-section,
.scheduled-streams-section {
    padding: 3rem 2rem;
}

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

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-primary);
}

.live-pulse {
    color: var(--primary-color);
    animation: pulse-dot 1.5s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.2); }
}

/* ============================================
   STREAM CARDS GRID
============================================ */
.streams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.stream-card {
    background: rgba(36, 52, 71, 0.8);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
    position: relative;
}

.stream-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(46, 134, 171, 0.1) 0%, 
        rgba(162, 59, 114, 0.05) 100%
    );
    opacity: 0;
    transition: opacity var(--transition-normal);
    pointer-events: none;
}

.stream-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-heavy), var(--shadow-glow);
    border-color: var(--primary-color);
    background: rgba(36, 52, 71, 0.95);
}

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

/* Thumbnail */
.stream-thumbnail {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    overflow: hidden;
    background: var(--background-primary);
}

.stream-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

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

/* Live Badge Overlay */
.live-badge-overlay {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--gradient-primary);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    box-shadow: var(--shadow-glow);
    animation: badge-glow 2s ease-in-out infinite;
}

@keyframes badge-glow {
    0%, 100% { box-shadow: var(--shadow-glow); }
    50% { box-shadow: 0 0 25px rgba(46, 134, 171, 0.6); }
}

.pulse-dot {
    animation: pulse-dot 1.5s ease-in-out infinite;
    margin-right: 0.25rem;
}

/* Scheduled Badge */
.scheduled-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: linear-gradient(135deg, #F18F01 0%, #F39C12 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(241, 143, 1, 0.4);
    z-index: 10;
}

/* Viewer Count */
.viewer-count {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background: rgba(15, 20, 25, 0.9);
    color: var(--text-primary);
    padding: 0.4rem 0.75rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    backdrop-filter: blur(10px);
}

/* Stream Info */
.stream-info {
    padding: 1.5rem;
}

.stream-category {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.stream-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

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

.stream-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.meta-item.price {
    color: var(--accent-color);
    font-weight: 600;
}

.meta-item.free {
    color: var(--success-color);
    font-weight: 600;
}

/* Watch Button */
.watch-button {
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: var(--shadow-light);
}

.watch-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.watch-button:active {
    transform: translateY(0);
}

/* Notify Button */
.notify-button {
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: rgba(58, 77, 99, 0.4);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.notify-button:hover {
    background: rgba(46, 134, 171, 0.2);
    border-color: var(--primary-color);
    color: var(--text-primary);
}

/* ============================================
   EMPTY STATE
============================================ */
.empty-state {
    padding: 6rem 2rem;
    text-align: center;
}

.empty-content {
    max-width: 500px;
    margin: 0 auto;
}

.empty-content svg {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.empty-content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.empty-content p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.back-button {
    display: inline-block;
    padding: 0.875rem 2rem;
    background: var(--gradient-primary);
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    transition: all var(--transition-normal);
}

.back-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

/* ============================================
   MODALS
============================================ */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 20, 25, 0.95);
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease;
}

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

.modal-content {
    background: var(--gradient-secondary);
    margin: 2% auto;
    padding: 0;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    width: 90%;
    max-width: 1200px;
    box-shadow: var(--shadow-heavy);
    animation: slideUp 0.3s ease;
    overflow: hidden;
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Close Button */
.close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 40px;
    height: 40px;
    background: rgba(58, 77, 99, 0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-normal);
    z-index: 10;
    border: 1px solid var(--border-color);
}

.close:hover {
    background: var(--secondary-color);
    transform: rotate(90deg);
    border-color: var(--secondary-color);
}

.close span {
    color: white;
    font-size: 1.5rem;
    line-height: 1;
}

/* ============================================
   LIVE PLAYER MODAL
============================================ */
.player-container {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 0;
    height: 80vh;
}

.player-main {
    background: black;
    display: flex;
    flex-direction: column;
    position: relative;
}

.player-header {
    padding: 1.5rem;
    background: linear-gradient(180deg, rgba(0,0,0,0.9) 0%, transparent 100%);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
}

.player-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.player-stats {
    display: flex;
    gap: 2rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.live-indicator-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    background: var(--gradient-primary);
    border-radius: 50px;
    font-weight: 600;
    animation: glow 2s ease-in-out infinite;
}

#liveVideo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Chat Sidebar */
.chat-sidebar {
    background: var(--background-secondary);
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.chat-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.chat-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
}

#chatMessages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
}

.chat-message {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: rgba(58, 77, 99, 0.3);
    border-radius: var(--border-radius-sm);
    font-size: 0.95rem;
}

.chat-input-area {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
}

#chatInput {
    width: 100%;
    padding: 0.875rem;
    background: rgba(58, 77, 99, 0.3);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-size: 0.95rem;
}

#chatInput:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(58, 77, 99, 0.5);
}

/* ============================================
   PAYMENT MODAL
============================================ */
.payment-modal-content {
    background: var(--gradient-secondary);
    margin: 5% auto;
    padding: 2.5rem;
    width: 90%;
    max-width: 600px;
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-heavy);
}

.payment-header h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.payment-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.payment-step {
    margin-top: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-group input {
    width: 100%;
    padding: 0.875rem 1rem;
    background: rgba(58, 77, 99, 0.3);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all var(--transition-normal);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(58, 77, 99, 0.5);
    box-shadow: 0 0 0 3px rgba(46, 134, 171, 0.2);
}

.payment-methods {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.payment-method-btn {
    padding: 1.5rem;
    background: rgba(58, 77, 99, 0.3);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
    text-align: center;
    color: var(--text-primary);
}

.payment-method-btn:hover {
    background: rgba(46, 134, 171, 0.15);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.btn-primary {
    width: 100%;
    padding: 1rem 2rem;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-light);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

/* ============================================
   RESPONSIVE
============================================ */
@media (max-width: 1024px) {
    .player-container {
        grid-template-columns: 1fr;
    }
    
    .chat-sidebar {
        display: none;
    }
}

@media (max-width: 768px) {
    .stream-nav {
        border-radius: 0 0 30% 30% / 0 0 20px 20px;
        padding: 0.5rem 0 1rem 0;
    }
    
    .hero-section {
        padding: 5rem 1.5rem 3rem 1.5rem;
        margin-top: 50px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .streams-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-container {
        padding: 0 1rem;
    }
    
    .nav-links {
        gap: 0.75rem;
    }
    
    .nav-link {
        font-size: 0.85rem;
        padding: 0.4rem 0.6rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .nav-logo {
        font-size: 1.3rem;
    }
    
    .logo-indie,
    .logo-stream {
        font-size: 1.3rem;
    }
    
    .logo-cz {
        font-size: 0.65rem;
    }
    
    .logo-prefix {
        font-size: 0.65rem;
    }
}

/* ============================================
   SCROLLBAR
============================================ */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--background-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* ============================================
   UTILITIES
============================================ */
.text-center {
    text-align: center;
}

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

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