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

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(145deg, #0d1117, #161b22, #1a1a2e);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
    color: #e6edf3;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.intro-content {
    background: linear-gradient(165deg, #1c2128, #0d1117);
    padding: 40px;
    border-radius: 24px;
    max-width: 420px;
    text-align: center;
    border: 1px solid #30363d;
    box-shadow: 0 25px 80px rgba(0, 255, 136, 0.15);
}

.intro-icon {
    font-size: 4rem;
    margin-bottom: 10px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.intro-content h1 {
    color: #00ff88;
    font-size: 1.8rem;
    margin-bottom: 25px;
    text-shadow: 0 0 30px rgba(0, 255, 136, 0.4);
}

.instructions {
    text-align: left;
    margin-bottom: 25px;
}

.instructions h2 {
    color: #8b949e;
    font-size: 0.9rem;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.instructions ul {
    list-style: none;
}

.instructions li {
    color: #c9d1d9;
    padding: 10px 0;
    border-bottom: 1px solid #21262d;
    font-size: 0.95rem;
}

.instructions li strong {
    color: #58a6ff;
}

.tip {
    color: #f0883e;
    font-size: 0.9rem;
    margin-top: 15px;
    padding: 12px;
    background: rgba(240, 136, 62, 0.1);
    border-radius: 8px;
    border-left: 3px solid #f0883e;
}

.start-button {
    background: linear-gradient(135deg, #00ff88, #00cc6a);
    color: #0d1117;
    border: none;
    padding: 16px 50px;
    font-size: 1.1rem;
    font-weight: 800;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 8px 30px rgba(0, 255, 136, 0.4);
}

.start-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0, 255, 136, 0.6);
}

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

.radio-device {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.radio-body {
    width: 320px;
    background: linear-gradient(170deg, #21262d, #0d1117);
    border-radius: 20px;
    padding: 20px;
    border: 1px solid #30363d;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255,255,255,0.05);
}

.display-bezel {
    background: linear-gradient(145deg, #1a1a1a, #0a0a0a);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    border: 2px solid #333;
    box-shadow: inset 0 4px 20px rgba(0,0,0,0.8);
}

.display-screen {
    background: linear-gradient(180deg, #0a1a0a, #051005);
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #1a3a1a;
}

.channel-info {
    text-align: center;
    margin-bottom: 12px;
}

.channel-large {
    display: block;
    font-family: 'Courier New', monospace;
    font-size: 2.2rem;
    font-weight: bold;
    color: #00ff88;
    text-shadow: 0 0 20px #00ff88, 0 0 40px #00ff88;
    letter-spacing: 3px;
}

.channel-label {
    display: block;
    font-size: 0.85rem;
    color: #00cc6a;
    margin-top: 5px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.status-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.led-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ff4444;
    box-shadow: 0 0 10px #ff4444;
    transition: all 0.3s ease;
}

.led-indicator.green {
    background: #00ff88;
    box-shadow: 0 0 15px #00ff88;
}

.led-indicator.yellow {
    background: #ffcc00;
    box-shadow: 0 0 15px #ffcc00;
    animation: blink 0.5s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

#statusText {
    color: #8b949e;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.brand-strip {
    text-align: center;
    padding: 10px 0;
    border-bottom: 1px solid #21262d;
    margin-bottom: 15px;
}

.brand-name {
    display: block;
    font-size: 1rem;
    font-weight: 800;
    color: #c9d1d9;
    letter-spacing: 4px;
}

.model-nr {
    display: block;
    font-size: 0.65rem;
    color: #00ff88;
    letter-spacing: 3px;
    margin-top: 3px;
}

.speaker-area {
    background: linear-gradient(145deg, #151515, #0a0a0a);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 15px;
}

.speaker-mesh {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mesh-line {
    height: 3px;
    background: linear-gradient(90deg, #1a1a1a, #2a2a2a, #1a1a1a);
    border-radius: 2px;
}

.channel-display-area {
    margin-bottom: 15px;
}

.ch-label {
    text-align: center;
    font-size: 0.7rem;
    color: #8b949e;
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.channel-grid {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: 4px;
}

.channel-btn {
    background: linear-gradient(145deg, #21262d, #161b22);
    border: 1px solid #30363d;
    color: #8b949e;
    padding: 10px 4px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.channel-btn:hover {
    background: linear-gradient(145deg, #30363d, #21262d);
    color: #c9d1d9;
}

.channel-btn.active {
    background: linear-gradient(145deg, #00ff88, #00cc6a);
    color: #0d1117;
    border-color: #00ff88;
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.4);
}

.control-area {
    display: flex;
    justify-content: center;
}

.ptt-button-area {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
}

.ptt-big-button {
    flex: 1;
    height: 75px;
    background: linear-gradient(145deg, #da3633, #b62324);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.1s ease;
    box-shadow: 
        0 6px 0 #8b1a1a,
        0 8px 20px rgba(218, 54, 51, 0.3);
}

.ptt-big-button:active,
.ptt-big-button.pressed {
    transform: translateY(4px);
    box-shadow: 
        0 2px 0 #8b1a1a,
        0 4px 10px rgba(218, 54, 51, 0.3);
    background: linear-gradient(145deg, #f85149, #da3633);
}

.ptt-label {
    color: white;
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: 3px;
}

.ptt-hint {
    color: rgba(255,255,255,0.6);
    font-size: 0.6rem;
    letter-spacing: 1px;
}

.tx-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    opacity: 0.3;
    transition: all 0.2s ease;
}

.tx-indicator.active {
    opacity: 1;
}

.tx-light {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #333;
    border: 2px solid #222;
    transition: all 0.2s ease;
}

.tx-indicator.active .tx-light {
    background: #da3633;
    box-shadow: 0 0 20px #da3633;
    animation: pulse-tx 0.4s ease-in-out infinite;
}

@keyframes pulse-tx {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

.tx-indicator span {
    color: #666;
    font-size: 0.7rem;
    font-weight: 700;
}

.tx-indicator.active span {
    color: #da3633;
}

.auth-section {
    background: linear-gradient(165deg, #1c2128, #0d1117);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid #30363d;
}

.auth-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
}

.auth-tab {
    flex: 1;
    padding: 12px;
    background: #161b22;
    border: 1px solid #30363d;
    color: #8b949e;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.auth-tab.active {
    background: linear-gradient(135deg, #00ff88, #00cc6a);
    color: #0d1117;
    border-color: #00ff88;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.auth-form input {
    padding: 14px 16px;
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 8px;
    color: #e6edf3;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s ease;
}

.auth-form input:focus {
    border-color: #00ff88;
}

.auth-form input::placeholder {
    color: #484f58;
}

.auth-button {
    padding: 14px;
    background: linear-gradient(135deg, #238636, #2ea043);
    border: none;
    color: white;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.auth-button:hover {
    background: linear-gradient(135deg, #2ea043, #3fb950);
    transform: translateY(-1px);
}

.user-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: rgba(0, 255, 136, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(0, 255, 136, 0.2);
}

.user-display {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-icon {
    font-size: 1.3rem;
}

.user-name {
    color: #00ff88;
    font-weight: 700;
}

.logout-button {
    padding: 8px 16px;
    background: #da3633;
    border: none;
    color: white;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
}

.users-panel {
    background: linear-gradient(165deg, #1c2128, #0d1117);
    border-radius: 16px;
    padding: 20px;
    width: 260px;
    max-height: 500px;
    border: 1px solid #30363d;
}

.panel-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 15px;
    border-bottom: 1px solid #21262d;
    margin-bottom: 15px;
}

.panel-icon {
    font-size: 1.3rem;
}

.panel-header h3 {
    color: #e6edf3;
    font-size: 1rem;
}

.badge {
    background: #00ff88;
    color: #0d1117;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-left: auto;
}

.users-scroll {
    max-height: 400px;
    overflow-y: auto;
}

.users-scroll::-webkit-scrollbar {
    width: 6px;
}

.users-scroll::-webkit-scrollbar-track {
    background: #161b22;
    border-radius: 3px;
}

.users-scroll::-webkit-scrollbar-thumb {
    background: #30363d;
    border-radius: 3px;
}

.user-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #161b22;
    border-radius: 10px;
    margin-bottom: 8px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.user-item.same-channel {
    border-color: #00ff88;
    background: rgba(0, 255, 136, 0.08);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 800;
    font-size: 0.9rem;
    color: #0d1117;
}

.user-details {
    flex: 1;
}

.user-name-display {
    color: #e6edf3;
    font-weight: 600;
    font-size: 0.9rem;
}

.user-channel-display {
    color: #8b949e;
    font-size: 0.75rem;
    margin-top: 2px;
}

.speaking-icon {
    font-size: 1.1rem;
    animation: speak-pulse 0.6s ease-in-out infinite;
}

@keyframes speak-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.empty-state {
    text-align: center;
    padding: 30px;
    color: #484f58;
    font-size: 0.9rem;
}

@media (max-width: 650px) {
    .container {
        flex-direction: column;
        align-items: center;
    }
    
    .users-panel {
        width: 100%;
        max-width: 320px;
    }
    
    .radio-body {
        width: 100%;
        max-width: 320px;
    }
}
