/* --- 1. VARIABLEN & RESET --- */
:root {
    --bg: #0b0e14;
    --card: #161920;
    --accent: #00f2ff;
    --accent-dim: rgba(0, 242, 255, 0.15);
    --text-main: #ffffff;
    --text-dim: #94a3b8;
    --border: rgba(255, 255, 255, 0.08);
    --card-hover: rgba(255, 255, 255, 0.05);
    --danger: #ef4444;
    --success: #10b981;
    --header-height: 70px;
    --radius-lg: 28px;
    --radius-md: 16px;
    --shadow: 0 20px 60px rgba(0,0,0,0.5);
}

* { 
    box-sizing: border-box; 
    -webkit-tap-highlight-color: transparent; 
}

body {
    background-color: var(--bg);
    color: var(--text-main);
    font-family: 'Inter', -apple-system, sans-serif;
    margin: 0;
    line-height: 1.5;
    overflow-x: hidden;
}

/* --- 2. GLOBAL LAYOUT --- */
.app-container, .dashboard-wrapper {
    width: 100%;
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
}

.card-panel {
    background: var(--card);
    border-radius: var(--radius-lg);
    padding: 40px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

/* --- 3. MAIN HEADER & NAVIGATION --- */
.main-header {
    background: rgba(13, 17, 23, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--header-height);
    display: flex;
    align-items: center;
}

.header-content {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
    font-weight: 900;
    color: #fff;
    text-decoration: none;
    z-index: 1100;
    letter-spacing: -0.5px;
}

.logo span { color: var(--accent); }
.logo-icon { font-size: 1.5rem; }

/* Desktop Navigation */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-links {
    display: flex;
    gap: 24px;
}

.nav-links a, .nav-link {
    color: var(--text-dim);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: 0.3s;
}

.nav-links a:hover, .nav-links a.active, .nav-link:hover {
    color: var(--accent);
}

.nav-auth {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* User Profile in Nav */
.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 35px;
    height: 35px;
    background: var(--accent);
    color: #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.9rem;
    box-shadow: 0 0 15px var(--accent-dim);
}

.btn-logout {
    font-size: 0.85rem;
    color: var(--danger);
    text-decoration: none;
    opacity: 0.8;
    font-weight: 600;
}

.btn-logout:hover { opacity: 1; }

/* --- 4. BUTTONS (Zentralisiert) --- */
.btn-base, .btn-play {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    border: none;
    gap: 8px;
    font-size: 0.95rem;
}

.btn-primary, .btn-play { 
    background: var(--accent); 
    color: #000; 
}

.btn-primary:hover, .btn-play:hover { 
    transform: translateY(-2px); 
    box-shadow: 0 8px 25px var(--accent-dim); 
    filter: brightness(1.1);
}

.btn-outline { 
    background: transparent; 
    border: 1px solid var(--border); 
    color: var(--text-dim); 
}

.btn-outline:hover { 
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--text-main); 
    color: var(--text-main); 
}

/* --- 5. MODALS (Global & Premium) --- */
.hub-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: none; 
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.hub-modal.show {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: #161920;
    border: 1px solid var(--border);
    border-radius: 28px;
    padding: 35px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
}

.modal-icon {
    font-size: 3.5rem;
    display: block;
    margin-bottom: 20px;
}

.modal-title { 
    margin: 0 0 10px 0; 
    font-size: 1.6rem; 
    font-weight: 800;
    color: #fff;
}

.modal-text { 
    color: var(--text-dim); 
    margin-bottom: 30px; 
    line-height: 1.5;
}

.modal-footer {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hub-modal-btn {
    width: 100%;
    padding: 14px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.hub-modal-btn.confirm {
    background: var(--accent);
    color: #000;
}

.hub-modal-btn.cancel {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border-color: var(--border);
    margin-top: 10px;
}

/* --- 6. MOBILE BURGER & RESPONSIVE --- */
.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 1100;
}

.mobile-nav-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background: #fff;
    margin: 6px 0;
    transition: 0.3s;
}

@media (max-width: 768px) {
    .app-container { margin: 20px auto; }
    .card-panel { padding: 30px 20px; border-radius: 20px; }

    .mobile-nav-toggle { display: block; }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: #0d1117;
        flex-direction: column;
        justify-content: flex-start;
        padding: 100px 30px;
        transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        border-left: 1px solid var(--border);
        box-shadow: -10px 0 30px rgba(0,0,0,0.5);
        gap: 40px;
    }

    .nav-menu.active { right: 0; }

    .nav-links, .nav-auth, .user-info {
        flex-direction: column;
        width: 100%;
        align-items: flex-start;
        gap: 25px;
    }

    /* Burger Animation */
    .mobile-nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
    .mobile-nav-toggle.active span:nth-child(2) { opacity: 0; }
    .mobile-nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }
}

/* --- 7. ANIMATIONS --- */
@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* --- 8. HELPER --- */
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.text-truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }