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

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #1a1a2e;
    color: #e0e0e0;
}

#app {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.panel {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.hidden {
    display: none !important;
}

#login-panel {
    max-width: 400px;
    padding: 40px 30px;
}

.panel-header {
    text-align: center;
    margin-bottom: 30px;
}

.panel-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: #00d4ff;
    margin-bottom: 6px;
}

.panel-header p {
    font-size: 14px;
    color: #888;
}

.form-group {
    width: 100%;
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    color: #aaa;
    margin-bottom: 6px;
}

.form-group input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #333;
    border-radius: 8px;
    background: #16213e;
    color: #e0e0e0;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.form-group input:focus {
    border-color: #00d4ff;
}

.btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

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

.btn-primary {
    background: #00d4ff;
    color: #1a1a2e;
}

.btn-primary:hover {
    background: #00b8d4;
}

.btn-primary:disabled {
    background: #555;
    color: #888;
    cursor: not-allowed;
}

.status-text {
    margin-top: 12px;
    font-size: 13px;
    text-align: center;
    min-height: 20px;
}

.status-text.error {
    color: #ff6b6b;
}

.status-text.success {
    color: #51cf66;
}

.status-text.info {
    color: #74c0fc;
}

#call-panel {
    position: relative;
}

#video-container {
    width: 100%;
    height: 100%;
    position: relative;
    background: #000;
}

#remote-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

#local-video {
    position: absolute;
    bottom: 90px;
    right: 20px;
    width: 200px;
    height: 150px;
    border-radius: 10px;
    object-fit: cover;
    border: 2px solid rgba(0, 212, 255, 0.5);
    z-index: 10;
    background: #111;
}

#video-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #555;
    z-index: 5;
}

#video-placeholder.hidden {
    display: none;
}

.placeholder-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

#call-info {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 12px 20px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.7), transparent);
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    z-index: 20;
}

#room-info {
    color: #00d4ff;
    font-weight: 600;
}

#peer-info {
    color: #aaa;
}

#call-timer {
    margin-left: auto;
    color: #51cf66;
    font-variant-numeric: tabular-nums;
}

#call-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px 20px 24px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    z-index: 20;
}

.btn-control {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.1s;
    backdrop-filter: blur(4px);
}

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

.btn-control:active {
    transform: scale(0.92);
}

.btn-control.active {
    background: rgba(255, 107, 107, 0.6);
}

.btn-hangup {
    background: #ff4444;
    width: 60px;
    height: 60px;
}

.btn-hangup:hover {
    background: #ff6666;
}

@media (max-width: 600px) {
    #login-panel {
        padding: 20px;
    }

    #local-video {
        width: 120px;
        height: 90px;
        bottom: 80px;
        right: 10px;
    }

    .btn-control {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }

    .btn-hangup {
        width: 52px;
        height: 52px;
    }
}
