:root {
    --bg-primary: #0a0b10;
    --bg-surface: rgba(20, 22, 32, 0.7);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --primary: #6366f1;
    --primary-glow: rgba(99, 102, 241, 0.4);
    --success: #10b981;
    --success-glow: rgba(16, 185, 129, 0.3);
    --warning: #f59e0b;
    --danger: #ef4444;
}

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

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Background animated glow */
.glass-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    background: radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 40%),
                radial-gradient(circle at 90% 80%, rgba(139, 92, 246, 0.15) 0%, transparent 40%),
                radial-gradient(circle at 50% 50%, rgba(16, 185, 129, 0.05) 0%, transparent 50%);
    filter: blur(40px);
}

.container {
    width: 100%;
    max-width: 1100px;
    padding: 2.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

header {
    text-align: center;
    margin-bottom: 0.5rem;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.logo-icon {
    font-size: 2.5rem;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff 0%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.025em;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.125rem;
    font-weight: 300;
}

.grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 1.75rem;
}

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

.panel {
    background: var(--bg-surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 1rem;
}

.panel-header h2 {
    font-size: 1.35rem;
    font-weight: 600;
    color: #fff;
}

.badge {
    padding: 0.35rem 0.8rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.badge::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.status-inactive {
    background: rgba(156, 163, 175, 0.1);
    color: var(--text-secondary);
}
.status-inactive::before { background: var(--text-secondary); }

.status-waiting {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
    animation: pulse 2s infinite;
}
.status-waiting::before { background: var(--warning); }

.status-active {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
}
.status-active::before { background: var(--success); }

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

.step {
    display: flex;
    gap: 1.25rem;
}

.step-num {
    background: linear-gradient(135deg, var(--primary) 0%, #4f46e5 100%);
    color: #fff;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 600;
    flex-shrink: 0;
    box-shadow: 0 0 15px var(--primary-glow);
}

.step-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-grow: 1;
}

.step-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
}

.step-content p {
    font-size: 0.925rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.link-group {
    display: flex;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    overflow: hidden;
    margin-top: 0.25rem;
}

.link-group input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    padding: 0.65rem 0.85rem;
    font-family: monospace;
    font-size: 0.85rem;
    flex-grow: 1;
}

.btn-icon {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 1rem;
    border-left: 1px solid rgba(255, 255, 255, 0.05);
}

.btn-icon:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.actions {
    margin-top: 0.5rem;
}

.btn {
    width: 100%;
    padding: 0.85rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    border: none;
    outline: none;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #4f46e5 100%);
    color: white;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.qr-panel {
    align-items: center;
    text-align: center;
}

.qr-container {
    width: 180px;
    height: 180px;
    background: white;
    padding: 10px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

#qrcode {
    width: 100% !important;
    height: 100% !important;
    display: none;
}

.qr-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    color: #0a0b10;
}

.qr-placeholder p {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(99, 102, 241, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.preview-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.preview-title {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.video-wrapper {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
}

video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.video-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 300;
}

footer {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-top: 1rem;
}

footer strong {
    color: var(--text-primary);
}

/* Animations */
@keyframes spin {
    to { transform: rotate(360deg); }
}

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

/* Tooltip style classes for copied action */
.copied::after {
    content: 'Kopiert!';
    position: absolute;
    background: var(--success);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    transform: translateY(-24px);
    animation: fadeOut 1.5s forwards;
    z-index: 10;
}

@keyframes fadeOut {
    0% { opacity: 1; }
    80% { opacity: 1; }
    100% { opacity: 0; }
}
