/* ===============================
   RESET & BASIS
================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Inter", "Segoe UI", "Ubuntu", sans-serif;
    background: radial-gradient(circle at top, #0f2c55, #040b16 70%);
    color: #e6f2ff;
    line-height: 1.6;
}

/* ===============================
   FARBVARIABLEN
================================ */
:root {
    --bg-main: #040b16;
    --bg-panel: rgba(12, 32, 60, 0.55);

    --blue-main: #1fa2ff;
    --blue-soft: #4fc3ff;
    --blue-dark: #0a1e3a;

    --border-glass: rgba(79, 195, 255, 0.25);
    --text-muted: #9bb6d3;
}

/* ===============================
   HEADER / HERO
================================ */
header {
    position: relative;
    height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    text-align: center;
    background:
        linear-gradient(135deg, #08172e, #0e3b6f, #08172e);
}

header::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at center, rgba(79,195,255,0.3), transparent 65%),
        repeating-linear-gradient(
            120deg,
            rgba(79,195,255,0.06),
            rgba(79,195,255,0.06) 1px,
            transparent 1px,
            transparent 7px
        );
}

/* ===============================
   TITEL MIT SPIEGELUNG
================================ */
.hero-title {
    position: relative;
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-shadow:
        0 0 12px rgba(79,195,255,0.7),
        0 0 40px rgba(31,162,255,0.4);
}

.hero-title::after {
    content: attr(data-text);
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    transform: scaleY(-1);
    opacity: 0.18;
    filter: blur(2px);
    background: linear-gradient(to bottom, rgba(255,255,255,0.4), transparent);
    -webkit-background-clip: text;
    color: transparent;
}

.hero-subtitle {
    margin-top: 25px;
    font-size: 1.2rem;
    color: var(--text-muted);
}

/* ===============================
   SECTIONS
================================ */
section {
    padding: 90px 8%;
}

.section-title {
    font-size: 2.2rem;
    margin-bottom: 40px;
    color: var(--blue-soft);
}

/* ===============================
   GLASS PANELS
================================ */
.panel {
    background: var(--bg-panel);
    border: 1px solid var(--border-glass);
    border-radius: 18px;
    backdrop-filter: blur(14px);
    box-shadow:
        inset 0 0 25px rgba(79,195,255,0.1),
        0 0 50px rgba(0,0,0,0.6);
    padding: 30px;
}

/* ===============================
   GRID FEATURES
================================ */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
}

.feature h3 {
    color: var(--blue-main);
    margin-bottom: 10px;
}

.feature p {
    color: var(--text-muted);
}

/* ===============================
   BUTTONS
================================ */
.button {
    display: inline-block;
    margin-top: 30px;
    padding: 14px 34px;
    border-radius: 30px;
    color: #fff;
    text-decoration: none;
    border: 1px solid var(--border-glass);
    background: linear-gradient(135deg, #1fa2ff, #1476c8);
    box-shadow: 0 0 20px rgba(31,162,255,0.5);
    transition: 0.3s ease;
}

.button:hover {
    box-shadow: 0 0 40px rgba(79,195,255,0.8);
    transform: translateY(-2px);
}

#elenataTalkStartBtn.running {
    background: linear-gradient(135deg, #2bff88, #18b764);
    box-shadow: 0 0 22px rgba(43, 255, 136, 0.55);
    border-color: rgba(43, 255, 136, 0.45);
}

/* ===============================
   FOOTER
================================ */
footer {
    background: #030914;
    padding: 40px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ===============================
   RESPONSIVE
================================ */
@media (max-width: 768px) {
    header {
        height: 75vh;
    }
}
/* ================= HERO CONTENT ================= */
.hero-content {
    position: relative;
    z-index: 2;
}

/* ================= TECH GRID ================= */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
}

.tech-grid h4 {
    color: var(--blue-main);
    margin-bottom: 10px;
}

.tech-grid ul {
    list-style: none;
    padding-left: 0;
}

.tech-grid li {
    margin-bottom: 8px;
    color: var(--text-muted);
}

/* ================= STATUS ================= */
.status {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.status-item {
    font-family: "JetBrains Mono", monospace;
}

.dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 8px;
}

.dot.online {
    background: #2bff88;
    box-shadow: 0 0 10px #2bff88;
}

.dot.warning {
    background: #ffcc00;
    box-shadow: 0 0 10px #ffcc00;
}

/* ================= CTA ================= */
.cta {
    text-align: center;
}

.cta h2 {
    margin-bottom: 10px;
}
#network {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}
nav {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    padding: 14px 6%;
    background: rgba(5,15,30,0.7);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(79,195,255,0.2);
}

.nav a {
    color: #cfe9ff;
    margin-left: 20px;
    text-decoration: none;
}

.nav button {
    background: none;
    border: none;
    color: #4fc3ff;
    cursor: pointer;
    font-size: 1rem;
}
body.light {
    --bg-main: #f4f8ff;
    --bg-panel: rgba(255,255,255,0.7);
    --text-muted: #4a5d75;
    background: #eef3fa;
    color: #0a1e3a;
}
/* ================= DASHBOARD ================= */
.dashboard {
    position: fixed;
    inset: 0;
    display: grid;
    grid-template-columns: 260px 1fr;
    background: var(--bg-main);
    z-index: 20;
}

.hidden {
    display: none;
}

/* SIDEBAR */
.sidebar {
    background: #050f1e;
    padding: 30px;
    border-right: 1px solid rgba(79,195,255,0.2);
}

.sidebar h2 {
    color: var(--blue-soft);
    margin-bottom: 30px;
}

.sidebar a {
    display: block;
    margin-bottom: 14px;
    color: #cfe9ff;
    text-decoration: none;
}

/* MAIN */
.dash-main {
    padding: 30px;
    overflow-y: auto;
}

.dash-top {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
}

.online {
    color: #2bff88;
}

/* METRICS */
.metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px,1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.metric span {
    font-size: 2rem;
    color: var(--blue-soft);
}

/* LOG */
.log {
    height: 260px;
    overflow: auto;
}

.log pre {
    font-family: "JetBrains Mono", monospace;
    font-size: 0.85rem;
    color: #9bb6d3;
}

/* ================= ADMIN CONTROL ================= */
.admin-control {
    grid-column: 1 / -1;
    margin-top: 20px;
}

.admin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.admin-section {
    padding: 15px;
    background: rgba(10, 20, 35, 0.5);
    border-radius: 10px;
    border: 1px solid rgba(79, 195, 255, 0.15);
}

.admin-section label {
    display: block;
    margin-top: 10px;
    margin-bottom: 6px;
    color: #4fc3ff;
    font-size: 0.85rem;
    font-weight: 600;
}

.admin-section input {
    width: 100%;
    padding: 8px 12px;
    margin-bottom: 10px;
    border: 1px solid rgba(79, 195, 255, 0.2);
    background: rgba(5, 15, 30, 0.6);
    color: #e6f2ff;
    border-radius: 6px;
    font-size: 0.9rem;
}

.admin-section select {
    width: 100%;
    padding: 8px 12px;
    margin-bottom: 10px;
    border: 1px solid rgba(79, 195, 255, 0.2);
    background: rgba(5, 15, 30, 0.6);
    color: #e6f2ff;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
}

.admin-section input:focus,
.admin-section select:focus {
    outline: none;
    box-shadow: 0 0 10px rgba(79, 195, 255, 0.4);
    border-color: rgba(79, 195, 255, 0.5);
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.admin-btn {
    padding: 8px 10px;
    background: linear-gradient(135deg, #1fa2ff, #1476c8);
    color: #fff;
    border: 1px solid rgba(79, 195, 255, 0.3);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    transition: 0.2s ease;
}

.admin-btn:hover {
    box-shadow: 0 0 12px rgba(31, 162, 255, 0.6);
    transform: translateY(-1px);
}

.admin-status {
    margin-top: 12px;
    padding: 10px;
    border-radius: 6px;
    background: rgba(43, 255, 136, 0.1);
    border: 1px solid rgba(43, 255, 136, 0.3);
    color: #2bff88;
    font-size: 0.85rem;
    min-height: 20px;
}

/* SERVERCONFIG */
.server-config {
    margin-top: 20px;
}

.serverconfig-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.serverconfig-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.serverconfig-status {
    font-size: 0.9rem;
    min-width: 140px;
}

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

.serverconfig-card {
    background: rgba(5, 15, 30, 0.5);
    border: 1px solid rgba(79, 195, 255, 0.2);
    border-radius: 10px;
    padding: 16px;
}

.serverconfig-lock {
    background: rgba(5, 15, 30, 0.6);
    border: 1px dashed rgba(79, 195, 255, 0.3);
    border-radius: 10px;
    padding: 18px;
    margin-bottom: 14px;
}

.lock-card {
    display: grid;
    gap: 10px;
}

.lock-title {
    font-weight: 700;
    color: #ffb347;
}

.lock-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: center;
}

.lock-row input {
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid rgba(79, 195, 255, 0.25);
    background: rgba(5, 15, 30, 0.65);
    color: #e6f2ff;
}

.lock-status {
    font-size: 0.9rem;
    color: #ff6b6b;
}

.serverconfig-card h5 {
    margin-bottom: 10px;
    color: #4fc3ff;
}

.serverconfig-card .button {
    margin-top: 12px;
    width: 100%;
    text-align: center;
}

.serverconfig-card label {
    display: block;
    margin-top: 8px;
    margin-bottom: 6px;
    font-size: 0.85rem;
    color: #4fc3ff;
}

.serverconfig-card input {
    width: 100%;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid rgba(79, 195, 255, 0.25);
    background: rgba(5, 15, 30, 0.65);
    color: #e6f2ff;
}

.token-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: center;
}

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

.serverconfig-row {
    display: grid;
    grid-template-columns: 1.1fr 1.6fr 1.1fr 0.8fr;
    gap: 8px;
    align-items: center;
    padding: 10px;
    background: rgba(4, 12, 25, 0.6);
    border: 1px solid rgba(79, 195, 255, 0.1);
    border-radius: 8px;
}

.serverconfig-row input {
    width: 100%;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid rgba(79, 195, 255, 0.25);
    background: rgba(5, 15, 30, 0.65);
    color: #e6f2ff;
}

.sc-name {
    font-weight: 700;
    color: #4fc3ff;
}

.button-small {
    padding: 8px 14px;
    font-size: 0.85rem;
    margin-top: 0;
}

.button-ghost {
    padding: 8px 12px;
    margin-top: 0;
    background: transparent;
    border: 1px dashed rgba(79, 195, 255, 0.4);
    box-shadow: none;
}

.button-ghost:hover {
    background: rgba(79, 195, 255, 0.08);
    box-shadow: 0 0 10px rgba(79, 195, 255, 0.4);
}

.clients-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 600px;
    overflow-y: auto;
}

.client-item {
    padding: 10px;
    background: rgba(5, 15, 30, 0.5);
    border: 1px solid rgba(79, 195, 255, 0.15);
    border-radius: 6px;
    font-size: 0.85rem;
}

.client-item.sending {
    animation: clientGlow 0.6s ease-out;
    border-color: rgba(255, 220, 100, 0.8);
    box-shadow: 
        0 0 15px rgba(255, 220, 100, 0.6),
        0 0 30px rgba(255, 220, 100, 0.3),
        inset 0 0 25px rgba(255, 220, 100, 0.1);
}

/* Client Header */
.client-header {
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(79, 195, 255, 0.2);
}

.client-status {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.client-arrow {
    font-size: 0.9rem;
    opacity: 0.7;
}

.status-icon {
    font-size: 1rem;
}

.client-name {
    font-weight: 600;
    color: #4fc3ff;
    flex: 1;
    min-width: 150px;
    transition: all 0.3s ease;
}

.client-type {
    color: #b5c7d3;
    font-size: 0.78rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.client-version {
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 600;
    color: #bfe8ff;
    border: 1px solid rgba(79, 195, 255, 0.4);
    background: rgba(79, 195, 255, 0.12);
}

.client-name.sending-voice {
    color: #ffc800;
    text-shadow: 
        0 0 10px rgba(255, 200, 0, 0.8),
        0 0 20px rgba(255, 200, 0, 0.5);
    font-weight: 700;
}

.status-badges {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.status-badges span {
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 600;
}

.badge-active {
    background: rgba(43, 255, 136, 0.2);
    border: 1px solid rgba(43, 255, 136, 0.4);
    color: #9bf3cd;
}

.badge-inactive {
    background: rgba(255, 138, 61, 0.15);
    border: 1px solid rgba(255, 138, 61, 0.3);
    color: #ffd1b0;
}

.badge-tx {
    background: rgba(255, 220, 100, 0.2);
    border: 1px solid rgba(255, 220, 100, 0.5);
    color: #ffe680;
    animation: pulse 1s ease-in-out infinite;
}

.badge-blocked {
    background: rgba(255, 107, 107, 0.2);
    border: 1px solid rgba(255, 107, 107, 0.5);
    color: #ff9999;
}

.badge-busy {
    background: rgba(255, 79, 79, 0.2);
    border: 1px solid rgba(255, 79, 79, 0.5);
    color: #ffb3b3;
}

@keyframes pulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

/* Client Details */
.client-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 500px;
    opacity: 1;
    transition: all 0.3s ease;
    overflow: hidden;
}

.client-details.collapsed {
    max-height: 0;
    opacity: 0;
    transition: all 0.3s ease;
    overflow: hidden;
}

.detail-row {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px;
    align-items: center;
    font-size: 0.8rem;
}

.detail-row .full-width {
    grid-column: 1 / -1;
}

.detail-label {
    color: #9bb6d3;
    font-weight: 600;
    min-width: 80px;
}

.detail-value {
    color: #e6f2ff;
    font-family: "JetBrains Mono", monospace;
    word-break: break-word;
}

/* Queue Bar */
.queue-bar {
    height: 6px;
    background: rgba(5, 15, 30, 0.6);
    border: 1px solid rgba(79, 195, 255, 0.2);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 4px;
}

.queue-fill {
    height: 100%;
    background: linear-gradient(90deg, #4fc3ff, #1fa2ff);
    transition: width 0.3s ease;
}

/* ================= GLOW EFFECT FOR SENDING ================= */
.client-item.sending {
    animation: clientGlow 0.6s ease-out;
    border-color: rgba(255, 220, 100, 0.8);
    box-shadow: 
        0 0 15px rgba(255, 220, 100, 0.6),
        0 0 30px rgba(255, 220, 100, 0.3),
        inset 0 0 25px rgba(255, 220, 100, 0.1);
}

@keyframes clientGlow {
    0% {
        box-shadow: 
            0 0 0 rgba(255, 220, 100, 0),
            0 0 0 rgba(255, 220, 100, 0),
            inset 0 0 25px rgba(255, 220, 100, 0.1);
        border-color: rgba(79, 195, 255, 0.15);
    }
    40% {
        box-shadow: 
            0 0 15px rgba(255, 220, 100, 0.9),
            0 0 30px rgba(255, 220, 100, 0.6),
            inset 0 0 25px rgba(255, 220, 100, 0.2);
        border-color: rgba(255, 220, 100, 0.9);
    }
    100% {
        box-shadow: 
            0 0 0 rgba(255, 220, 100, 0),
            0 0 0 rgba(255, 220, 100, 0),
            inset 0 0 25px rgba(255, 220, 100, 0.1);
        border-color: rgba(79, 195, 255, 0.15);
    }
}

/* Continuous glow for active transmission */
.client-item.tx-active {
    border-color: rgba(255, 200, 70, 0.8);
    box-shadow: 
        0 0 20px rgba(255, 200, 70, 0.8),
        0 0 40px rgba(255, 200, 70, 0.4);
}

/* Blocked client - red transparent background */
.client-item.blocked {
    background: rgba(255, 107, 107, 0.2);
    border-color: rgba(255, 107, 107, 0.6);
    box-shadow: 
        0 0 15px rgba(255, 107, 107, 0.3),
        inset 0 0 10px rgba(255, 107, 107, 0.1);
}

    .client-search-hit {
        box-shadow:
        0 0 0 2px rgba(79, 195, 255, 0.9),
        0 0 18px rgba(79, 195, 255, 0.7);
    }

@media (max-width: 1024px) {
    .admin-grid {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        grid-template-columns: repeat(3, 1fr);
    }
}
/* ================= LOGIN ================= */
.login {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(5,15,30,0.85);
    backdrop-filter: blur(6px);
}

.login:not(.hidden) {
    display: flex;
}

.login-box {
    width: 320px;
    text-align: center;
}

.login-box h2 {
    margin-bottom: 20px;
    color: var(--blue-soft);
}

.login-box input {
    width: 100%;
    margin-bottom: 14px;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid rgba(79,195,255,0.3);
    background: rgba(5,15,30,0.6);
    color: #fff;
}

.login-box input:focus {
    outline: none;
    box-shadow: 0 0 10px rgba(79,195,255,0.5);
}

#loginError {
    margin-top: 10px;
    color: #ff6b6b;
    font-size: 0.85rem;
}

/* ===============================
   TOGGLE SWITCH
================================ */
.toggle-switch {
    position: relative;
    display: inline-flex;
    width: 50px;
    height: 28px;
    cursor: pointer;
    user-select: none;
}

.toggle-switch input {
    display: none;
}

.toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(79, 195, 255, 0.3);
    border: 1px solid rgba(79, 195, 255, 0.5);
    border-radius: 14px;
    transition: 0.3s ease;
    display: flex;
    align-items: center;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    left: 3px;
    background-color: #4fc3ff;
    border-radius: 50%;
    transition: 0.3s ease;
    box-shadow: 0 0 8px rgba(79, 195, 255, 0.5);
}

.toggle-switch input:checked + .toggle-slider {
    background-color: rgba(43, 255, 136, 0.3);
    border-color: rgba(43, 255, 136, 0.6);
}

.toggle-switch input:checked + .toggle-slider::before {
    left: 25px;
    background-color: #2bff88;
    box-shadow: 0 0 8px rgba(43, 255, 136, 0.6);
}

/* ===============================
   SMS CONTROL
================================ */
.sms-control {
    margin-top: 16px;
    padding: 12px;
    background: rgba(31, 162, 255, 0.1);
    border: 1px solid rgba(79, 195, 255, 0.3);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sms-header {
    font-size: 12px;
    font-weight: 600;
    color: #4fc3ff;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sms-input {
    font-family: "Inter", "Segoe UI", "Ubuntu", monospace;
    padding: 8px;
    background: rgba(10, 30, 58, 0.7);
    border: 1px solid rgba(79, 195, 255, 0.25);
    border-radius: 6px;
    color: #e6f2ff;
    font-size: 12px;
    resize: vertical;
    min-height: 60px;
    max-height: 100px;
    transition: 0.2s ease;
}

.sms-input:focus {
    outline: none;
    border-color: rgba(79, 195, 255, 0.5);
    background: rgba(10, 30, 58, 0.9);
    box-shadow: 0 0 12px rgba(31, 162, 255, 0.2);
}

.sms-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.char-count {
    font-size: 11px;
    color: #9bb6d3;
}

.sms-send-btn {
    padding: 6px 14px;
    background: linear-gradient(135deg, rgba(43, 255, 136, 0.8), rgba(31, 162, 255, 0.6));
    border: 1px solid rgba(43, 255, 136, 0.4);
    border-radius: 6px;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sms-send-btn:hover {
    background: linear-gradient(135deg, rgba(43, 255, 136, 1), rgba(31, 162, 255, 0.8));
    box-shadow: 0 0 12px rgba(43, 255, 136, 0.4);
}

.sms-send-btn:active {
    transform: scale(0.95);
}

.sms-status {
    font-size: 11px;
    min-height: 16px;
    text-align: right;
    margin-top: 2px;
}
