:root {
    --bg-color: #0f172a;
    --surface-color: rgba(30, 41, 59, 0.7);
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --danger-color: #ef4444;
    --text-color: #f8fafc;
    --glass-border: 1px solid rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle at top right, #1e293b, #0f172a);
}

/* Landing Screen */
#landing {
    background: var(--surface-color);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 2.5rem;
    border-radius: 1.5rem;
    border: var(--glass-border);
    box-shadow: var(--glass-shadow);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
    max-width: 400px;
    z-index: 10;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#landing.hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.95);
    display: none;
}

h1 {
    font-size: 1.8rem;
    font-weight: 700;
    text-align: center;
    background: linear-gradient(to right, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

label {
    font-size: 0.875rem;
    color: #94a3b8;
}

input[type="text"] {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    color: white;
    font-size: 1rem;
    outline: none;
    transition: all 0.2s;
}

input[type="text"]:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.btn-container {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

button {
    flex: 1;
    padding: 0.75rem;
    border-radius: 0.75rem;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.95rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

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

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Call Screen */
#call-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    flex-direction: column;
}

#call-screen.active {
    display: flex;
}

#videos {
    flex: 1;
    position: relative;
    width: 100%;
    height: 100%;
    background: black;
}

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

#remoteVideo {
    width: 100%;
    height: 100%;
}

#localVideo {
    position: absolute;
    bottom: 100px;
    right: 20px;
    width: 200px;
    height: 150px;
    background: #1e293b;
    border-radius: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    object-fit: cover;
    transition: all 0.3s ease;
    z-index: 5;
}

#localVideo:hover {
    transform: scale(1.05);
}

/* Controls */
#controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    padding: 1rem 1.5rem;
    border-radius: 2rem;
    display: flex;
    gap: 1.5rem;
    border: var(--glass-border);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.control-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s;
    font-size: 1.2rem;
}

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

.control-btn.active {
    background: var(--danger-color); /* Red for muted/off */
    color: white;
}

.control-btn#hangupBtn {
    background: var(--danger-color);
}

.control-btn#hangupBtn:hover {
    background: #dc2626;
}

/* Room Info Overlay */
#room-info {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

#room-info:hover {
    background: rgba(0, 0, 0, 0.7);
}

@media (max-width: 600px) {
    #localVideo {
        width: 120px;
        height: 90px;
        bottom: 90px;
    }
    
    #controls {
        padding: 0.8rem 1rem;
        gap: 1rem;
    }
}
