:root {
    --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #311042 100%);
    --card-bg: rgba(255, 255, 255, 0.07);
    --card-border: rgba(255, 255, 255, 0.12);
    --accent-blue: #38bdf8;
    --accent-purple: #a855f7;
    --accent-green: #22c55e;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: var(--bg-gradient);
    min-height: 100vh;
    color: var(--text-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 900px;
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

header {
    text-align: center;
    margin-bottom: 35px;
}

header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    background: linear-gradient(to right, var(--accent-blue), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}

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

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-blue);
    box-shadow: 0 12px 30px rgba(56, 189, 248, 0.15);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.card h2 {
    font-size: 1.4rem;
    margin-bottom: 12px;
}

.card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 25px;
    line-height: 1.5;
}

.btn {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-blue), #0284c7);
    color: #fff;
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(56, 189, 248, 0.5);
    transform: scale(1.02);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--accent-purple), #7e22ce);
    color: #fff;
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.3);
}

.btn-secondary:hover {
    box-shadow: 0 6px 20px rgba(168, 85, 247, 0.5);
    transform: scale(1.02);
}

/* Video Receiver Area */
.video-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid var(--card-border);
}

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

.pin-display {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: 8px;
    color: var(--accent-blue);
    margin: 20px 0;
    background: rgba(0,0,0,0.3);
    padding: 15px 30px;
    border-radius: 16px;
    border: 1px dashed var(--accent-blue);
}

.input-pin {
    width: 100%;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid var(--card-border);
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    font-size: 1.5rem;
    text-align: center;
    letter-spacing: 6px;
    margin-bottom: 20px;
    outline: none;
}

.input-pin:focus {
    border-color: var(--accent-purple);
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.3);
}

.status-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.status-waiting {
    background: rgba(234, 179, 8, 0.2);
    color: #fde047;
    border: 1px solid rgba(234, 179, 8, 0.4);
}

.status-connected {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.4);
}
