:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --secondary-color: #8b5cf6;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --bg-color: #0f172a;
    --bg-secondary: #1e293b;
    --card-bg: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --border-color: #334155;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #0f172a;
    color: var(--text-primary);
    min-height: 100vh;
    padding: 1rem;
    -webkit-tap-highlight-color: transparent;
}

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

/* Go Live Button */
.go-live-btn {
    width: 100%;
    padding: 1.5rem 2rem;
    margin-bottom: 1.5rem;
    border: none;
    border-radius: 12px;
    background: linear-gradient(90deg, #10b981 0%, #3b82f6 100%);
    color: white;
    font-size: 1.25rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: all 0.2s ease;
    touch-action: manipulation;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.go-live-btn:active {
    transform: scale(0.98);
}

.go-live-btn.streaming {
    background: #ef4444;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.play-icon {
    font-size: 1.5rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.stop-icon {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    width: 1.5rem;
    height: 1.5rem;
}

.stop-icon::before {
    content: "";
    width: 0.5rem;
    height: 0.5rem;
    background: white;
    border-radius: 1px;
    display: block;
}

.stop-icon::after {
    content: "";
    width: 0;
    height: 0;
    border-left: 0.5rem solid white;
    border-top: 0.375rem solid transparent;
    border-bottom: 0.375rem solid transparent;
    display: block;
}


/* Cards */
.card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.card h2 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
}

/* Setup Steps */
.setup-steps {
    list-style: none;
    counter-reset: step-counter;
}

.setup-steps li {
    counter-increment: step-counter;
    margin-bottom: 2rem;
    padding-left: 3rem;
    position: relative;
}

.setup-steps li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    background: var(--primary-color);
    color: white;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.setup-steps li strong {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.setup-steps li ul {
    margin-top: 0.5rem;
    margin-left: 1rem;
    color: var(--text-secondary);
}

/* URL Display */
.url-display {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    font-family: 'Courier New', monospace;
}

.url-display span {
    flex: 1;
    word-break: break-all;
    color: var(--primary-color);
}

/* Buttons */
.btn {
    padding: 0.875rem 1.25rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.btn-large {
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    min-height: 48px;
}

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

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--border-color);
}

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

.btn-success:hover {
    opacity: 0.9;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    opacity: 0.9;
}

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

.btn-warning:hover {
    opacity: 0.9;
}

.btn-copy {
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

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

/* QR Code Section */
.qr-section {
    text-align: center;
    margin: 2rem 0;
}

.qr-image {
    background: white;
    padding: 1rem;
    border-radius: 12px;
    max-width: 250px;
    height: auto;
}

.app-badges {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.app-badges a {
    transition: transform 0.2s ease;
}

.app-badges a:hover {
    transform: scale(1.05);
}

/* Features List */
.features-list {
    list-style: none;
}

.features-list li {
    padding: 0.75rem 0;
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* Control Panel */
.control-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.status-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.status {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
}

.status.connected {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success-color);
}

.status.disconnected {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger-color);
}

.status.connecting {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning-color);
}

/* Scenes Grid - Simple 2x2 */
.scenes-grid-simple {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.scene-item {
    background: #1e293b;
    border: 2px solid #334155;
    border-radius: 12px;
    padding: 1.5rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    touch-action: manipulation;
    position: relative;
}

.scene-item:active {
    transform: scale(0.96);
}

.scene-item.active {
    border-color: #8b5cf6;
    background: rgba(139, 92, 246, 0.1);
}

.scene-item::before {
    content: "((o))";
    font-size: 1.25rem;
    color: var(--text-secondary);
    opacity: 0.6;
}

.scene-item h3 {
    font-size: 1.1rem;
    margin: 0;
    font-weight: 600;
    color: white;
}

/* Sources List */
.sources-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.source-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.source-info {
    flex: 1;
}

.source-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.source-type {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.source-toggle {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.source-toggle:hover {
    background: var(--primary-hover);
}

.source-toggle.disabled {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
}

/* Control Buttons */
.control-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.control-buttons .btn {
    width: 100%;
    min-height: 48px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.stat-item {
    background: var(--bg-secondary);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    text-align: center;
}

.stat-label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

.stat-value {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Loading */
.loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}


/* Responsive */
@media (max-width: 480px) {
    body {
        padding: 0.75rem;
    }
    
    .go-live-btn {
        padding: 1.25rem 1.5rem;
        font-size: 1.1rem;
    }
    
    .scenes-grid-simple {
        gap: 0.5rem;
    }
    
    .scene-item {
        padding: 1.25rem 0.75rem;
        min-height: 90px;
    }
    
    .scene-item h3 {
        font-size: 1rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeIn 0.5s ease;
}

/* Pulse animation for status */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.status.connecting {
    animation: pulse 2s infinite;
}

/* Notification animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

