/* =====================================================================
   PorkLand Voice Chat — Dark Green Gradient Theme
   Версия: адаптирована под PorkLand (февраль 2026)
   ===================================================================== */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #0f1c0f 0%, #142814 50%, #0f1c0f 100%);
    color: #d0e8d0;
    min-height: 100vh;
}

.hidden {
    display: none !important;
}

/* ────────────────────────────────────────────────
   Login Screen
───────────────────────────────────────────────── */

.login-screen {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, #0d170d, #132013);
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-box {
    background: rgba(20, 40, 20, 0.92);
    backdrop-filter: blur(6px);
    padding: 32px;
    border-radius: 12px;
    width: 340px;
    border: 1px solid #2e5c2e;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}

.login-box h2 {
    text-align: center;
    color: #a8e0a8;
    margin-bottom: 4px;
    font-size: 22px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.7);
}

.login-box .subtitle {
    text-align: center;
    color: #6b8c6b;
    margin-bottom: 24px;
    font-size: 13px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: #8aa88a;
    font-size: 12px;
    font-weight: 500;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid #2e5c2e;
    border-radius: 6px;
    background: #142814;
    color: #e0f0e0;
    font-size: 14px;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #4caf50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.18);
}

.code-box {
    background: #0f1c0f;
    border: 2px solid #4caf50;
    border-radius: 8px;
    padding: 14px 18px;
    font-family: 'Courier New', monospace;
    font-size: 19px;
    font-weight: bold;
    color: #81c784;
    text-align: center;
    letter-spacing: 3px;
    cursor: pointer;
    transition: all 0.25s;
    user-select: all;
}

.code-box:hover {
    border-color: #66bb6a;
    background: #142814;
}

.code-box.copied {
    border-color: #a5d6a7;
    color: #a5d6a7;
    background: rgba(165, 214, 167, 0.08);
}

.btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 6px;
    background: linear-gradient(90deg, #2e7d32, #4caf50);
    color: white;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn:hover:not(:disabled) {
    background: linear-gradient(90deg, #388e3c, #66bb6a);
    transform: translateY(-1px);
}

.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    background: #2a4a2a;
}

.status-text {
    text-align: center;
    font-size: 12px;
    padding: 8px;
    border-radius: 6px;
    margin-bottom: 16px;
}

.status-text.connected { background: rgba(102,187,106,0.12); color: #81c784; }
.status-text.disconnected { background: rgba(161,68,68,0.12); color: #ff8a80; }
.status-text.error       { background: rgba(244,67,54,0.12); color: #ef5350; }

/* ────────────────────────────────────────────────
   Main Interface
───────────────────────────────────────────────── */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #2e5c2e;
}

.header h1 {
    font-size: 20px;
    color: #b2e0b2;
    font-weight: 600;
}

.status {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #8aa88a;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #a94444;
    transition: all 0.2s;
}

.status-dot.connected {
    background: #66bb6a;
    box-shadow: 0 0 8px rgba(102, 187, 106, 0.6);
}

.ping {
    color: #6b8c6b;
    font-size: 12px;
}

.main {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 16px;
}

@media (max-width: 800px) {
    .main {
        grid-template-columns: 1fr;
    }
}

/* Panels & Sidebar */
.panel {
    background: rgba(20, 40, 20, 0.88);
    border-radius: 10px;
    padding: 18px;
    border: 1px solid #2e5c2e;
    backdrop-filter: blur(4px);
}

.panel h2 {
    font-size: 13px;
    color: #8aa88a;
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-weight: 600;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Users List */
.users-list {
    max-height: 400px;
    overflow-y: auto;
}

.empty-state {
    color: #5a7a5a;
    text-align: center;
    font-size: 13px;
    padding: 20px;
}

.user-item {
    display: flex;
    align-items: center;
    padding: 12px;
    margin-bottom: 8px;
    background: #142814;
    border-radius: 8px;
    border: 1px solid #2e5c2e;
    transition: all 0.15s;
}

.user-item.speaking {
    border-color: #66bb6a;
    background: rgba(102, 187, 106, 0.12);
    box-shadow: 0 0 12px rgba(102, 187, 106, 0.3);
}

.user-item.self {
    background: #1a2f1a;
}

.user-name {
    flex: 1;
    font-size: 14px;
    color: #d0e8d0;
}

.user-name .tag {
    color: #6b8c6b;
    font-size: 12px;
}

/* Audio Controls */
.controls {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.control-group label {
    display: block;
    font-size: 12px;
    color: #8aa88a;
    margin-bottom: 6px;
}

.slider-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.slider-row input[type="range"] {
    flex: 1;
}

.slider-row span {
    font-size: 12px;
    color: #6b8c6b;
    min-width: 40px;
    text-align: right;
}

/* Volume Meter */
.meter {
    height: 8px;
    background: #0f1f0f;
    border-radius: 4px;
    margin-top: 8px;
    overflow: hidden;
    position: relative;
}

.meter-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: linear-gradient(90deg, #4caf50, #81c784);
    border-radius: 4px;
    transition: width 0.06s;
    width: 0%;
}

.meter-threshold {
    position: absolute;
    top: 0;
    width: 2px;
    height: 100%;
    background: #ff7043;
    left: 5%;
}

/* Toggle Buttons */
.button-row {
    display: flex;
    gap: 8px;
}

.btn-toggle {
    flex: 1;
    padding: 10px;
    border: 1px solid #2e5c2e;
    border-radius: 6px;
    background: #142814;
    color: #b2e0b2;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-toggle:hover {
    background: #1e3a1e;
    color: #e0f0e0;
}

.btn-toggle.active {
    background: linear-gradient(90deg, #2e7d32, #4caf50);
    border-color: #4caf50;
    color: white;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.4);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #0f1c0f;
}

::-webkit-scrollbar-thumb {
    background: #2e5c2e;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4caf50;
}

/* Range Slider Styling */
input[type="range"] {
    -webkit-appearance: none;
    height: 6px;
    background: #1e3a1e;
    border-radius: 3px;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: #66bb6a;
    border: 2px solid #142814;
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(102, 187, 106, 0.5);
    cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb:hover {
    background: #81c784;
}

/* Footer */
.footer {
    text-align: center;
    padding: 20px;
    color: #6b8c6b;
    font-size: 12px;
    border-top: 1px solid #2e5c2e;
    margin-top: 24px;
}

.footer p {
    margin: 0;
}

/* Verification status helpers */
.verification-success {
    color: #a5d6a7 !important;
}

.verification-pending {
    color: #fdd835 !important;
}