/* Vicinity Voice Client - Vercel Version */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.container {
    width: 100%;
    max-width: 400px;
    margin: 20px;
}

.screen {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    display: none;
}

.screen.active {
    display: block;
}

/* Connection Screen */
.logo {
    text-align: center;
    margin-bottom: 30px;
}

.logo h1 {
    font-size: 2.5em;
    font-weight: 700;
    margin-bottom: 10px;
    background: linear-gradient(45deg, #00ff88, #00ffff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    font-size: 0.9em;
    opacity: 0.8;
    display: block;
    margin-top: 5px;
}

.connect-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

input {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    padding: 15px;
    color: white;
    font-size: 16px;
    transition: all 0.3s ease;
}

input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

input:focus {
    outline: none;
    border-color: #00ff88;
    background: rgba(255, 255, 255, 0.15);
}

button {
    background: linear-gradient(45deg, #00ff88, #00ffff);
    border: none;
    border-radius: 10px;
    padding: 15px 30px;
    color: #000;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 255, 136, 0.4);
}

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

.primary {
    background: linear-gradient(45deg, #00ff88, #00ffff);
}

.hint {
    text-align: center;
    font-size: 0.85em;
    opacity: 0.7;
    margin-top: 15px;
    line-height: 1.4;
}

code {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
}

/* Voice Screen */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.header h2 {
    font-size: 1.8em;
    font-weight: 600;
}

.status {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 500;
}

.status.connected {
    background: rgba(0, 255, 136, 0.2);
    color: #00ff88;
}

.status.connecting {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
}

.status.disconnected {
    background: rgba(255, 59, 48, 0.2);
    color: #ff3b30;
}

.nearby-section {
    margin-bottom: 25px;
}

.nearby-section h3 {
    margin-bottom: 15px;
    font-size: 1.2em;
    font-weight: 500;
}

.player-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.player-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.player-item:hover {
    background: rgba(255, 255, 255, 0.15);
}

.player-name {
    font-weight: 500;
}

.player-distance {
    font-size: 0.85em;
    opacity: 0.7;
}

.controls-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 25px;
}

.volume-control {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.volume-control label {
    font-weight: 500;
    margin-bottom: 5px;
}

input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.2);
    outline: none;
    -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(45deg, #00ff88, #00ffff);
    cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(45deg, #00ff88, #00ffff);
    cursor: pointer;
    border: none;
}

.mic-control {
    display: flex;
    align-items: center;
    gap: 15px;
}

.icon-button {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    padding: 10px 15px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.icon-button:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: #00ff88;
}

.icon-button.active {
    background: rgba(0, 255, 136, 0.2);
    border-color: #00ff88;
}

.mute-control h4 {
    margin-bottom: 10px;
    font-size: 1em;
    font-weight: 500;
}

.muted-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.muted-player {
    background: rgba(255, 59, 48, 0.1);
    border-radius: 8px;
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9em;
}

.unmute-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    padding: 4px 8px;
    color: white;
    font-size: 0.8em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.unmute-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.info-section {
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.server-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.85em;
    opacity: 0.7;
}

/* Error Screen */
.error-container {
    text-align: center;
}

.error-container h2 {
    color: #ff3b30;
    margin-bottom: 15px;
}

.error-container p {
    margin-bottom: 20px;
    opacity: 0.8;
    line-height: 1.4;
}

/* Responsive Design */
@media (max-width: 480px) {
    .container {
        margin: 10px;
    }
    
    .screen {
        padding: 30px 20px;
    }
    
    .logo h1 {
        font-size: 2em;
    }
    
    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .controls-section {
        gap: 15px;
    }
}

/* Loading Animation */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.loading {
    animation: pulse 1.5s infinite;
}
