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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a3e 50%, #0d1b2a 100%);
    color: white;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    text-align: center;
    padding: 20px;
    width: 100%;
    max-width: 1000px;
}

h1 {
    margin-bottom: 40px;
    font-size: 2.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #00d4ff, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 60px rgba(0, 212, 255, 0.3);
}

.panel {
    margin-bottom: 30px;
}

.hidden {
    display: none !important;
}

#userName {
    display: block;
    margin: 0 auto 20px auto;
    font-size: 1.1rem;
    padding: 16px 24px;
    text-align: center;
    width: 300px;
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(10px);
    color: white;
    outline: none;
    transition: all 0.3s ease;
}

#userName:focus {
    border-color: #a855f7;
    background: rgba(255,255,255,0.08);
    box-shadow: 0 0 30px rgba(168, 85, 247, 0.2);
}

#userName::placeholder {
    color: rgba(255,255,255,0.4);
}

#roomCode {
    display: block;
    margin: 0 auto;
    font-size: 2.5rem;
    font-weight: 700;
    padding: 24px 32px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.4em;
    width: 300px;
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(10px);
    color: white;
    outline: none;
    transition: all 0.3s ease;
}

#roomCode:focus {
    border-color: #00d4ff;
    background: rgba(255,255,255,0.08);
    box-shadow: 0 0 40px rgba(0, 212, 255, 0.2);
}

#roomCode::placeholder {
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: normal;
    color: rgba(255,255,255,0.4);
}

.buttons {
    margin-top: 24px;
    display: flex;
    gap: 16px;
    justify-content: center;
}

button {
    font-size: 1rem;
    font-weight: 600;
    padding: 16px 32px;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.4);
}

button:active {
    transform: translateY(0);
}

#joinBtn {
    background: linear-gradient(135deg, #00d4ff, #0099cc);
    color: white;
}

#joinBtn:hover {
    box-shadow: 0 8px 30px rgba(0, 212, 255, 0.4);
}

#createBtn {
    background: linear-gradient(135deg, #4ade80, #22c55e);
    color: white;
}

#createBtn:hover {
    box-shadow: 0 8px 30px rgba(74, 222, 128, 0.4);
}

#hangupBtn {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

#hangupBtn:hover {
    box-shadow: 0 8px 30px rgba(239, 68, 68, 0.4);
}

#copyLinkBtn {
    background: linear-gradient(135deg, #a855f7, #7c3aed);
    color: white;
    margin-bottom: 20px;
}

#copyLinkBtn:hover {
    box-shadow: 0 8px 30px rgba(168, 85, 247, 0.4);
}

.controls {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 20px;
}

.control-btn {
    background: rgba(255,255,255,0.1);
    color: white;
    padding: 14px 24px;
}

.control-btn:hover {
    background: rgba(255,255,255,0.15);
}

.control-btn.off {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.control-btn.off:hover {
    box-shadow: 0 8px 30px rgba(239, 68, 68, 0.4);
}

#callInfo {
    background: rgba(255,255,255,0.03);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 30px;
    border: 1px solid rgba(255,255,255,0.1);
}

#callInfo p {
    margin: 12px 0;
    font-size: 1.1rem;
}

#myCode {
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    background: linear-gradient(135deg, #00d4ff, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

#status {
    color: rgba(255,255,255,0.5);
    font-size: 0.95rem;
}

.videos {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 30px;
}

video {
    width: 320px;
    height: 240px;
    background: linear-gradient(135deg, #1a1a2e, #0f0f1a);
    border-radius: 20px;
    object-fit: cover;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

#localVideo {
    transform: scaleX(-1);
}

.video-wrapper {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    border: 2px solid rgba(255,255,255,0.1);
    transition: all 0.3s ease;
}

.video-wrapper:hover {
    border-color: rgba(255,255,255,0.2);
    transform: scale(1.02);
}

.video-wrapper video {
    box-shadow: none;
    border-radius: 0;
}

.video-label {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(10px);
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid rgba(255,255,255,0.1);
}

@media (max-width: 600px) {
    h1 {
        font-size: 2rem;
    }
    
    #roomCode {
        font-size: 1.8rem;
        width: 240px;
        padding: 20px 24px;
    }
    
    #userName {
        width: 240px;
    }
    
    video {
        width: 100%;
        height: 200px;
    }
    
    .buttons {
        flex-direction: column;
        padding: 0 20px;
    }
    
    button {
        width: 100%;
    }
}
