/* ======================================
   SOUNDZ FUSION - MASTER STYLESHEET
   by Cyberghost (c) 2026
   ====================================== */

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

body {
    background: #050505;
    color: #e5e5e5;
    font-family: 'Segoe UI', Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* --------------------------------------
   TYPOGRAPHY & HELPER
   -------------------------------------- */
.text-muted { color: #888; }
.text-success { color: #00ff99; }
.text-danger { color: #ff3b3b; }
.mt-1 { margin-top: 5px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mb-1 { margin-bottom: 5px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }

/* --------------------------------------
   HEADER (Dashboard)
   -------------------------------------- */
.header {
    background: linear-gradient(90deg, #00ff99 0%, #009966 100%);
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    border-bottom: 3px solid #00ff99;
}

.header-title {
    font-size: 24px;
    font-weight: 700;
    color: #000;
}

.header-user {
    font-size: 14px;
    color: #002b1a;
    font-weight: 600;
}

/* --------------------------------------
   QUICK ACTION BAR (immer sichtbar)
   -------------------------------------- */
.quick-actions {
    background: rgba(10, 10, 10, 0.95);
    padding: 10px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    border-bottom: 1px solid #2a2a2a;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.qa-left, .qa-right {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.qa-btn {
    background: #1a1a1a;
    border: none;
    color: #00ff99;
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: 0.2s;
    text-decoration: none;
    display: inline-block;
}

.qa-btn:hover {
    background: #00ff99;
    color: #000;
}

.qa-live {
    background: #ff3b3b;
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 6px;
}

.qa-offline {
    background: #555;
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
}

.qa-bitrate {
    background: #0b0b0b;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    border: 1px solid #2a2a2a;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    animation: pulse 1s infinite;
}

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

/* --------------------------------------
   STATUS BAR
   -------------------------------------- */
.status-bar {
    background: #0a0a0a;
    padding: 10px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    border-bottom: 1px solid #2a2a2a;
}

.status-stats {
    display: flex;
    gap: 20px;
    font-size: 12px;
    color: #888;
}

.status-stats span {
    color: #00ff99;
    font-weight: bold;
}

/* --------------------------------------
   DASHBOARD GRID (Kacheln)
   -------------------------------------- */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 20px;
}

/* Kacheln standard */
.tile {
    background: #0b0b0b;
    border: 1px solid #1a1a1a;
    border-radius: 16px;
    padding: 20px;
    transition: all 0.3s ease;
}

/* Breite Kacheln (2 Spalten) */
.tile-wide {
    grid-column: span 2;
}

/* Volle Breite (3 Spalten) */
.tile-wide-full {
    grid-column: span 3;
}

/* Live-Status Kachel */
.tile-status {
    background: linear-gradient(135deg, #0b0b0b 0%, #0a1a0f 100%);
}

/* Preview Kachel */
.tile-preview {
    grid-column: span 2;
}

/* Verwaltung Kachel */
.tile-actions {
    grid-column: span 1;
}

/* Kachel-Inhalte */
.tile-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.tile-title {
    font-size: 18px;
    font-weight: 600;
    color: #00ff99;
    margin-bottom: 15px;
    border-left: 3px solid #00ff99;
    padding-left: 10px;
}

.tile-code {
    background: #000;
    padding: 12px;
    border-radius: 10px;
    font-family: monospace;
    font-size: 12px;
    color: #00ffcc;
    word-break: break-all;
    margin-bottom: 12px;
}

.tile-qr {
    width: 100px;
    margin-top: 12px;
    display: block;
}

.tile-hint {
    font-size: 11px;
    color: #666;
    margin-top: 10px;
}

/* Live/Offline Badges */
.live-badge {
    background: #ff3b3b;
    color: #fff;
    display: inline-block;
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 15px;
}

.offline-badge {
    background: #555;
    color: #fff;
    display: inline-block;
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 14px;
    margin-bottom: 15px;
}

/* Stats innerhalb der Live-Kachel */
.tile-stats {
    display: flex;
    gap: 20px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: #00ff99;
}

.stat-label {
    font-size: 11px;
    color: #888;
}

/* Preview Container */
.preview-container {
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.preview-video {
    width: 100%;
    max-height: 250px;
    object-fit: contain;
    background: #000;
}

.preview-label {
    font-size: 11px;
    color: #666;
    text-align: center;
    padding: 8px;
    background: transparent;
}

.offline-preview {
    background: #000;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    color: #666;
}

/* Belabox Steps */
.belabox-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.step {
    flex: 1;
    background: #0a0a0a;
    padding: 10px;
    border-radius: 10px;
    font-size: 12px;
}

.step code {
    background: #000;
    padding: 2px 6px;
    border-radius: 5px;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.action-btn {
    padding: 10px 18px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: 0.2s;
}

.action-btn.twitch { background: #9146FF; color: #fff; }
.action-btn.admin { background: #00d07f; color: #000; }
.action-btn.logout { background: #ff3b3b; color: #fff; }
.action-btn:hover { opacity: 0.85; transform: scale(0.98); }

/* Allgemeine Buttons */
.btn-copy {
    background: #00ff99;
    color: #000;
    border: none;
    padding: 6px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 12px;
}

.btn-copy:hover {
    background: #00cc77;
}

/* --------------------------------------
   LOGIN / REGISTER / RESET (Öffentliche Seiten)
   -------------------------------------- */
.hero {
    position: relative;
    width: 100%;
    max-width: 700px;
    height: 240px;
    margin: 0 auto;
    overflow: hidden;
    background: #000;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.72) contrast(1.05);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.15), rgba(0,0,0,0.68));
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
}

.hero-overlay h1 {
    margin: 0;
    font-size: 46px;
    font-weight: 800;
    color: #fff;
}

.hero-overlay p {
    margin-top: 10px;
    color: #d0d0d0;
    font-size: 13px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.main {
    width: 100%;
    max-width: 1050px;
    margin: 28px auto 40px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 22px;
}

.panel {
    background: #0b0b0b;
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 0 18px rgba(0,0,0,0.35);
}

.panel h2 {
    margin-top: 0;
    margin-bottom: 18px;
    font-size: 22px;
    font-weight: 700;
    color: #fff;
}

.panel p {
    color: #c7c7c7;
    line-height: 1.7;
    margin-bottom: 18px;
}

.info-grid {
    margin-top: 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 22px;
}

.info-item {
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.info-item strong {
    display: block;
    margin-bottom: 5px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
}

.info-item span {
    color: #b8b8b8;
    font-size: 13px;
}

.login-title {
    text-align: center;
    margin-bottom: 24px;
}

/* Login Formulare */
input[type=text],
input[type=password],
input[type=email] {
    width: 100%;
    padding: 12px 14px;
    margin-bottom: 14px;
    background: #060606;
    border: 1px solid #1d1d1d;
    border-radius: 10px;
    color: #f2f2f2;
    font-size: 14px;
    outline: none;
    transition: 0.2s ease;
}

input[type=text]:focus,
input[type=password]:focus,
input[type=email]:focus {
    border-color: #00c97b;
}

button[type=submit] {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 10px;
    background: #00d07f;
    color: #000;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s ease;
}

button[type=submit]:hover {
    background: #00eb90;
}

.error {
    color: #ff4d4d;
    text-align: center;
    margin-bottom: 15px;
}

/* Footer */
.footer {
    margin-top: auto;
    background: #090909;
    border-top: 1px solid rgba(255,255,255,0.05);
    padding: 18px 20px;
}

.footer-inner {
    max-width: 1050px;
    margin: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.tech-stack img {
    height: 20px;
    opacity: 0.45;
    filter: grayscale(1) brightness(1.15);
    transition: 0.2s ease;
}

.tech-stack img:hover {
    opacity: 0.9;
    filter: grayscale(0) brightness(1.1);
}

/* --------------------------------------
   COOKIE BANNER
   -------------------------------------- */
#cookieOverlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(4px);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
}

#cookieBox {
    width: 90%;
    max-width: 420px;
    background: #0b0b0b;
    border: 1px solid #00ff99;
    border-radius: 16px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 0 25px rgba(0,255,153,0.25);
}

#cookieBox h2 {
    margin-top: 0;
    color: #00ff99;
    font-size: 22px;
}

#cookieBox p {
    color: #e5e5e5;
    font-size: 14px;
    line-height: 1.6;
}

.cookie-buttons {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 12px;
}

.cookie-buttons button {
    padding: 10px 18px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    font-size: 14px;
}

#cookieAccept {
    background: #00ff99;
    color: #000;
}

#cookieAccept:hover {
    background: #00e68a;
}

#cookieNecessary {
    background: #333;
    color: #fff;
}

#cookieNecessary:hover {
    background: #444;
}

/* --------------------------------------
   RESPONSIVE DESIGN
   -------------------------------------- */

/* Tablet (bis 1200px) */
@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .tile-wide, .tile-preview { grid-column: span 2; }
    .tile-wide-full { grid-column: span 3; }
    .tile-actions { grid-column: span 1; }
}

/* Tablet hochkant (bis 900px) */
@media (max-width: 900px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .tile-wide, .tile-preview, .tile-actions, .tile-wide-full {
        grid-column: span 2;
    }
    .main {
        grid-template-columns: 1fr;
    }
    .hero {
        width: 100%;
        height: 200px;
    }
    .hero-overlay h1 {
        font-size: 32px;
    }
}

/* Handy (bis 600px) */
@media (max-width: 600px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 12px;
    }
    .tile-wide, .tile-preview, .tile-actions, .tile-wide-full {
        grid-column: span 1;
    }
    .tile { padding: 15px; }
    .tile-icon { font-size: 28px; }
    .tile-title { font-size: 16px; }
    .tile-code { font-size: 10px; padding: 8px; }
    .stat-value { font-size: 20px; }
    .belabox-steps { flex-direction: column; }
    .quick-actions { padding: 8px 16px; }
    .qa-btn { padding: 4px 10px; font-size: 10px; }
    .status-bar { flex-direction: column; text-align: center; }
    .status-stats { gap: 12px; justify-content: center; }
    .header { flex-direction: column; text-align: center; padding: 15px; }
    .hero { height: 180px; }
    .hero-overlay h1 { font-size: 28px; }
    .hero-overlay p { font-size: 10px; }
    .main { margin: 20px auto; }
    .panel { padding: 16px; }
    .info-grid { grid-template-columns: 1fr; }
    .footer-inner { flex-direction: column; text-align: center; }
}

/* Kleine Handys (bis 380px) */
@media (max-width: 380px) {
    .dashboard-grid { gap: 10px; padding: 10px; }
    .tile { padding: 12px; }
    .tile-title { font-size: 14px; margin-bottom: 10px; }
    .action-buttons { flex-direction: column; }
    .action-btn { text-align: center; }
    .hero { height: 150px; }
    .hero-overlay h1 { font-size: 24px; }
}

/* --------------------------------------
   HOVER (nur für Maus, nicht für Touch)
   -------------------------------------- */
@media (hover: hover) {
    .tile:hover {
        transform: translateY(-4px);
        border-color: #00ff99;
        box-shadow: 0 10px 30px rgba(0, 255, 153, 0.15);
    }
}