/* =====================================================
   DATEI: /assets/css/login.css
   VERSION: 3.0
   BESCHREIBUNG: Styles für die Login-Seite
   BENUTZT VON: /auth/login.php
   
   AUFBAU:
   1. Grundlagen (Body, Container)
   2. TeamSpeak Info-Box (eingeklappt/ausgeklappt)
   3. 3-Schritte Tutorial
   4. GamerHub Vorschau
   5. Login-Formular
   6. Buttons, Alerts, IP-Info
   7. Handy-Anpassung
   ===================================================== */

/* ─── 1. GRUNDLAGEN ─── */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #0a0a0a;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(0, 255, 136, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 255, 255, 0.1) 0%, transparent 50%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: #fff;
}

.login-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 30px 20px;
    gap: 20px;
    max-width: 520px;
    margin: 0 auto;
    width: 100%;
}

/* ─── 2. TEAMSPEAK INFO-BOX ─── */
/* 
   Die Box ist standardmäßig EINGEKLAPPT.
   Nur die Überschrift + "So geht's" Button sind sichtbar.
   Klick auf den Header → Details einblenden.
*/
.ts-info-box {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.06), rgba(0, 200, 255, 0.06));
    border: 1px solid rgba(0, 255, 136, 0.25);
    border-radius: 16px;
    width: 100%;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* Grüner Streifen oben */
.ts-info-box::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, #00ff88, #00ccff, #00ff88);
}

/* HEADER: Immer sichtbar (klickbar) */
.ts-info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    cursor: pointer;
    transition: background 0.2s;
    gap: 12px;
}

.ts-info-header:hover {
    background: rgba(0, 255, 136, 0.05);
}

.ts-info-title {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #00ff88;
    font-size: 0.95em;
    font-weight: bold;
}

.ts-info-title i {
    font-size: 1.2em;
}

/* "So geht's" Button */
.ts-toggle-btn {
    background: rgba(0, 255, 136, 0.15);
    border: 1px solid rgba(0, 255, 136, 0.3);
    color: #00ff88;
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.8em;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
    white-space: nowrap;
}

.ts-toggle-btn:hover {
    background: rgba(0, 255, 136, 0.25);
}

/* Pfeil-Icon dreht sich beim Aufklappen */
.ts-toggle-icon {
    transition: transform 0.3s ease;
    font-size: 0.85em;
}

/* Wenn Box offen: Pfeil nach oben */
.ts-info-box.open .ts-toggle-icon {
    transform: rotate(180deg);
}

/* DETAILS: Standardmäßig versteckt */
.ts-info-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
    padding: 0 20px;
}

/* ═══════════════════════════════════════════════
   Wenn Box offen: Details einblenden
   max-height: none = KEIN Limit mehr!
   Übergang: erst max-height Animation, dann none
   ═══════════════════════════════════════════════ */
.ts-info-box.open .ts-info-details {
    max-height: 2000px; /* Genug für alles */
    padding: 0 20px 20px;
    overflow-y: visible;
}


.ts-info-desc {
    color: #aaa;
    font-size: 0.88em;
    line-height: 1.6;
    margin-bottom: 15px;
}

/* ─── 3. SCHRITTE-TUTORIAL ─── */
.steps {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    border-left: 3px solid rgba(0, 255, 136, 0.4);
}

.step-number {
    background: rgba(0, 255, 136, 0.2);
    color: #00ff88;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.85em;
    flex-shrink: 0;
}

.step-text {
    color: #ccc;
    font-size: 0.85em;
    line-height: 1.5;
}

.step-text strong { color: #fff; }

.ts-address {
    background: rgba(0, 255, 136, 0.15);
    padding: 2px 8px;
    border-radius: 4px;
    color: #00ff88;
    font-family: monospace;
}

/* ─── 4. GAMERHUB VORSCHAU ─── */
.gamerhub-preview {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 15px;
    margin-top: 5px;
}

.gamerhub-preview h4 {
    color: #00ccff;
    font-size: 0.85em;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.preview-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.preview-feature {
    background: rgba(0, 255, 136, 0.05);
    border: 1px solid rgba(0, 255, 136, 0.15);
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    font-size: 0.78em;
    color: #aaa;
    transition: all 0.3s;
}

.preview-feature:hover {
    border-color: rgba(0, 255, 136, 0.4);
    transform: translateY(-2px);
}

.preview-feature .emoji { font-size: 1.5em; display: block; margin-bottom: 4px; }
.preview-feature strong { color: #fff; display: block; font-size: 1.05em; }

.preview-example {
    text-align: center;
    margin-top: 12px;
    margin-bottom: 0;
    font-size: 0.8em;
    color: #666;
}

.preview-example a {
    color: #00ccff;
    text-decoration: none;
}

.preview-example a i { font-size: 0.8em; }

/* ─── 5. TRENNLINIE ─── */
.section-divider {
    width: 100%;
    text-align: center;
    color: #555;
    font-size: 0.85em;
    position: relative;
    padding: 5px 0;
}

.section-divider::before,
.section-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 35%;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.section-divider::before { left: 0; }
.section-divider::after { right: 0; }

/* ─── 6. LOGIN-BOX ─── */
.login-box {
    background: rgba(20, 20, 40, 0.95);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 20px;
    padding: 35px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.login-box::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, #00ff88, #00ffff, #00ff88);
}

.login-header { text-align: center; margin-bottom: 25px; }

.login-header .logo-icon {
    width: 70px; height: 70px;
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.2), rgba(0, 255, 255, 0.2));
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 15px;
    font-size: 30px; color: #00ff88;
    border: 2px solid rgba(0, 255, 136, 0.3);
}

.login-header h1 {
    color: #00ff88; font-size: 24px; margin-bottom: 8px;
    background: linear-gradient(45deg, #00ff88, #00ffff);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

.login-header p { color: #888; font-size: 13px; }

/* ─── FORMULAR ─── */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; color: #aaa; margin-bottom: 6px; font-size: 13px; font-weight: 500; }
.form-group label i { margin-right: 6px; color: #00ff88; }

.input-wrapper { position: relative; }

.input-wrapper input {
    width: 100%; padding: 13px 13px 13px 42px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px; color: #fff; font-size: 15px;
    transition: all 0.3s ease;
}

.input-wrapper input:focus {
    outline: none; border-color: #00ff88;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.2);
    background: rgba(0, 255, 136, 0.05);
}

.input-wrapper .input-icon {
    position: absolute; left: 14px; top: 50%;
    transform: translateY(-50%); color: #666;
    font-size: 15px; transition: color 0.3s ease;
}

.input-wrapper input:focus + .input-icon { color: #00ff88; }

.password-toggle {
    position: absolute; right: 14px; top: 50%;
    transform: translateY(-50%); background: none;
    border: none; color: #666; cursor: pointer;
    font-size: 15px; transition: color 0.3s ease;
}

.password-toggle:hover { color: #00ff88; }

/* ─── REMEMBER ME ─── */
.remember-row {
    display: flex; justify-content: space-between;
    align-items: center; margin-bottom: 20px;
    flex-wrap: wrap; gap: 8px;
}

.remember-label {
    display: flex; align-items: center; color: #888;
    cursor: pointer; font-size: 13px; transition: color 0.3s;
}

.remember-label:hover { color: #00ff88; }
.remember-label input[type="checkbox"] { width: 16px; height: 16px; margin-right: 8px; accent-color: #00ff88; cursor: pointer; }

.forgot-link { color: #00ffff; text-decoration: none; font-size: 13px; transition: all 0.3s; }
.forgot-link:hover { color: #00ff88; text-decoration: underline; }

/* ─── BUTTONS ─── */
.btn-login {
    width: 100%; padding: 14px;
    background: linear-gradient(135deg, #00ff88 0%, #00cc6a 100%);
    border: none; border-radius: 10px; color: #000;
    font-size: 15px; font-weight: bold; cursor: pointer;
    transition: all 0.3s; display: flex;
    align-items: center; justify-content: center; gap: 8px;
}

.btn-login:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0, 255, 136, 0.4); }
.btn-login:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* ─── TRENNLINIE "ODER" ─── */
.divider {
    text-align: center; margin: 20px 0; color: #555;
    position: relative; font-size: 13px;
}

.divider::before, .divider::after {
    content: ''; position: absolute; top: 50%;
    width: 40%; height: 1px; background: rgba(255, 255, 255, 0.1);
}

.divider::before { left: 0; }
.divider::after { right: 0; }

/* ─── REGISTER-LINK ─── */
.register-link { text-align: center; color: #888; font-size: 13px; }
.register-link a { color: #00ff88; text-decoration: none; font-weight: bold; transition: all 0.3s; }
.register-link a:hover { color: #00ffff; text-decoration: underline; }

/* ─── ALERTS ─── */
.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 15px; display: flex; align-items: center; gap: 10px; font-size: 13px; }
.alert i { font-size: 16px; }
.alert-error { background: rgba(255, 0, 100, 0.1); border: 1px solid rgba(255, 0, 100, 0.3); color: #ff6699; }
.alert-success { background: rgba(0, 255, 136, 0.1); border: 1px solid rgba(0, 255, 136, 0.3); color: #00ff88; }

/* ─── IP-INFO ─── */
.ip-info {
    background: rgba(0, 168, 255, 0.05); border: 1px solid rgba(0, 168, 255, 0.2);
    border-radius: 10px; padding: 10px 12px; margin-top: 20px;
    text-align: center; color: #666; font-size: 11px;
}

.ip-info i { color: #00a8ff; margin-right: 4px; }

/* ─── SPINNER ─── */
.spinner { display: none; width: 18px; height: 18px; border: 2px solid transparent; border-top-color: #000; border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn-login.loading .spinner { display: block; }
.btn-login.loading .btn-text { display: none; }

/* ─── 7. HANDY-ANPASSUNG ─── */
@media (max-width: 480px) {
    .login-box { padding: 25px 18px; }
    .ts-info-header { padding: 14px 16px; flex-wrap: wrap; }
    .ts-info-title { font-size: 0.85em; }
    .login-header h1 { font-size: 20px; }
    .remember-row { flex-direction: column; align-items: flex-start; }
    .preview-features { grid-template-columns: repeat(2, 1fr); }
    .steps { gap: 8px; }
}

/* ═══════════════════════════════════════════════════════
   NEU: CODE-EINGABE für TeamSpeak Verifizierung
   Wird in der TS-Info-Box angezeigt (nach den 3 Schritten)
   ═══════════════════════════════════════════════════════ */

/* Box um das Code-Feld */
.ts-code-box {
    background: rgba(0, 255, 136, 0.08);
    border: 2px dashed rgba(0, 255, 136, 0.3);
    border-radius: 12px;
    padding: 18px;
    margin: 15px 0;
    text-align: center;
}

/* Überschrift "Code eingeben:" */
.ts-code-title {
    color: #00ff88;
    font-size: 0.95em;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Zeile: Input + Button nebeneinander */
.ts-code-input-row {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

/* Das große Code-Eingabefeld */
.ts-code-input {
    width: 160px;
    padding: 14px;
    font-size: 1.8em;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    text-align: center;
    letter-spacing: 8px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(0, 255, 136, 0.3);
    border-radius: 12px;
    color: #00ff88;
    outline: none;
    transition: all 0.3s;
}

/* Code-Feld wenn angeklickt */
.ts-code-input:focus {
    border-color: #00ff88;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
    background: rgba(0, 255, 136, 0.05);
}

/* Code-Feld Placeholder */
.ts-code-input::placeholder {
    color: rgba(0, 255, 136, 0.2);
    letter-spacing: 8px;
}

/* Bestätigen-Button */
.ts-code-btn {
    padding: 14px 22px;
    background: linear-gradient(135deg, #00ff88, #00cc6a);
    border: none;
    border-radius: 12px;
    color: #000;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ts-code-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 255, 136, 0.4);
}

/* Hinweis "5 Minuten gültig" */
.ts-code-hint {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.78em;
    margin-top: 10px;
    margin-bottom: 0;
}

.ts-code-hint i {
    margin-right: 4px;
}

/* Handy-Anpassung */
@media (max-width: 480px) {
    .ts-code-input {
        width: 140px;
        font-size: 1.5em;
        letter-spacing: 6px;
    }
}

/* ═══════════════════════════════════════════════════════
   "CODE JETZT SENDEN" BUTTON
   Großer grüner Button in der TS-Info-Box
   Ruft per AJAX /api/ts_verify_now.php auf
   ═══════════════════════════════════════════════════════ */

.ts-send-box {
    text-align: center;
    margin: 18px 0;
    padding: 15px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 12px;
    border: 1px dashed rgba(0, 255, 136, 0.2);
}

/* Der große Button */
.ts-send-btn {
    padding: 16px 35px;
    font-size: 1.1em;
    font-weight: bold;
    background: linear-gradient(135deg, #00ff88, #00cc6a);
    color: #000;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 20px rgba(0, 255, 136, 0.3);
}

.ts-send-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 255, 136, 0.5);
}

/* Button deaktiviert (während Laden / Cooldown) */
.ts-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Status-Text unter dem Button */
.ts-send-status {
    margin-top: 10px;
    font-size: 0.85em;
    min-height: 20px;
}

.ts-send-status.success { color: #00ff88; }
.ts-send-status.error   { color: #ff6699; }
.ts-send-status.loading { color: #aaa; }

/* ═══════════════════════════════════════════════
   v4.0: TABS (TeamSpeak | Website)
   ═══════════════════════════════════════════════ */

/* Tab-Buttons oben in der Login-Box */
.login-tabs {
    display: flex;
    border-bottom: 2px solid rgba(255,255,255,0.08);
    margin: -35px -35px 25px -35px;
    padding: 0;
}

.login-tab {
    flex: 1;
    padding: 18px 15px;
    background: transparent;
    border: none;
    color: #666;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
}

.login-tab:hover {
    color: #aaa;
    background: rgba(255,255,255,0.03);
}

/* Aktiver Tab: gruener Unterstrich */
.login-tab.active {
    color: #00ff88;
}

.login-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 10%;
    right: 10%;
    height: 3px;
    background: #00ff88;
    border-radius: 3px 3px 0 0;
}

/* Tab-Inhalt: versteckt wenn nicht aktiv */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Tab Header */
.tab-header {
    text-align: center;
    margin-bottom: 25px;
}

.tab-header h2 {
    color: #00ff88;
    font-size: 1.3em;
    margin-bottom: 6px;
}

.tab-header p {
    color: #888;
    font-size: 0.9em;
}

/* OAuth Buttons (nur Design, noch nicht aktiv) */
.oauth-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.oauth-btn {
    flex: 1;
    padding: 12px;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 10px;
    background: rgba(255,255,255,0.05);
    color: #888;
    font-size: 0.9em;
    font-weight: bold;
    cursor: not-allowed;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.3s;
    opacity: 0.5;
}

.oauth-google { border-color: rgba(234,67,53,0.3); }
.oauth-google i { color: #ea4335; }
.oauth-steam { border-color: rgba(0,114,198,0.3); }
.oauth-steam i { color: #0072c6; }
.oauth-vk { border-color: rgba(0,119,181,0.3); }
.oauth-vk i { color: #0077b5; }

.oauth-hint {
    text-align: center;
    font-size: 0.75em;
    color: #555;
    margin-bottom: 15px;
}

/* GamerHub Mini-Vorschau (unten im TS-Tab) */
.gamerhub-mini-preview {
    text-align: center;
    padding: 12px;
    background: rgba(0,0,0,0.2);
    border-radius: 10px;
    margin-top: 15px;
    font-size: 0.82em;
    color: #666;
}

.gamerhub-mini-preview a {
    color: #00ccff;
    text-decoration: none;
}

.gamerhub-mini-preview a i {
    font-size: 0.8em;
}

/* Handy: Tabs */
@media (max-width: 480px) {
    .login-tabs { margin: -25px -18px 20px -18px; }
    .login-tab { font-size: 0.85em; padding: 14px 10px; }
    .oauth-buttons { flex-direction: column; }
}
