/* Global Styles & Variables */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #121212;
    color: #e0e0e0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header / Navbar */
.navbar {
    height: 70px;
    background-color: #1e1e1e;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    min-width: 0;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
}

/* Burger-Menü Button & Animation */
.burger-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    padding: 0;
    flex-shrink: 0;
    z-index: 1100;
}

.burger-btn .bar {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #ffffff;
    border-radius: 2px;
    transition: all 0.3s ease-in-out;
}

.burger-btn.active .bar:nth-child(1) {
    transform: translateY(8.5px) rotate(45deg);
}

.burger-btn.active .bar:nth-child(2) {
    opacity: 0;
}

.burger-btn.active .bar:nth-child(3) {
    transform: translateY(-8.5px) rotate(-45deg);
}

/* Header Profilbild & Buttons */
.header-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #3b82f6;
    flex-shrink: 0;
}

.btn-action {
    background-color: #ef4444;
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    white-space: nowrap;
}

.btn-action.login-mode {
    background-color: #3b82f6;
}

.btn-action.login-mode:hover {
    background-color: #2563eb;
}

.btn-action:hover {
    background-color: #dc2626;
}

.status-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    user-select: none;
    white-space: nowrap;
}

.status-badge.logged-in {
    background-color: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid #10b981;
}

.status-badge.logged-out {
    background-color: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid #ef4444;
}

/* Sidebar (Links ausklappbar) */
.sidebar {
    position: fixed;
    top: 70px;
    left: -260px;
    width: 260px;
    max-width: 85vw;
    height: calc(100vh - 70px);
    background-color: #18181b;
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.4);
    transition: left 0.3s ease-in-out;
    z-index: 999;
    padding-top: 1.5rem;
}

.sidebar.open {
    left: 0;
}

.sidebar ul {
    list-style: none;
}

.sidebar ul li a {
    display: block;
    padding: 1rem 1.5rem;
    color: #a1a1aa;
    text-decoration: none;
    font-weight: 500;
    border-left: 4px solid transparent;
    transition: all 0.2s;
}

.sidebar ul li a:hover,
.sidebar ul li a.active {
    color: #ffffff;
    background-color: #27272a;
    border-left-color: #3b82f6;
}

/* Overlay für Sidebar */
.sidebar-overlay {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    height: calc(100vh - 70px);
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 998;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Hauptinhalt */
.main-content {
    margin-top: 70px;
    padding: 3rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-grow: 1;
}

.main-content h1 {
    font-size: 2.2rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1.5rem;
    text-align: center;
}

.logged-out-banner {
    background-color: rgba(239, 68, 68, 0.15);
    border: 1px solid #ef4444;
    color: #fca5a5;
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    width: 100%;
    max-width: 800px;
    text-align: center;
    font-weight: 600;
}

.content-card {
    background-color: #1e1e1e;
    width: 100%;
    max-width: 800px;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.section-content h2 {
    margin-bottom: 1rem;
    color: #ffffff;
}

.section-content p {
    color: #9ca3af;
    margin-bottom: 1.5rem;
}

/* Profilbild Upload styling */
.avatar-upload-container {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
    background: #262626;
    padding: 15px;
    border-radius: 10px;
}

.avatar-preview {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #3b82f6;
    flex-shrink: 0;
}

.avatar-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hidden-input {
    display: none;
}

.custom-file-label {
    display: inline-block;
    background: #3f3f46;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    text-align: center;
    transition: background 0.2s;
}

.custom-file-label:hover {
    background: #52525b;
}

.help-text {
    color: #71717a;
    font-size: 0.8rem;
}

.cooldown-info {
    font-size: 0.8rem;
    color: #9ca3af;
    font-weight: normal;
    margin-left: 6px;
}

.hidden {
    display: none !important;
}

/* Formularelemente */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #d1d5db;
}

.form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: #2a2a2a;
    border: 1px solid #3f3f46;
    border-radius: 6px;
    color: #ffffff;
    font-size: 1rem;
}

.form-group input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.form-group input:focus {
    outline: none;
    border-color: #3b82f6;
}

.button.primary {
    background-color: #3b82f6;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.button.primary:hover {
    background-color: #2563eb;
}

.button.primary:disabled {
    background-color: #4b5563;
    cursor: not-allowed;
}

/* ==========================================
   RESPONSIVE MEDIA QUERIES
   ========================================== */
@media (max-width: 768px) {
    .navbar {
        padding: 0 1rem;
    }

    .nav-left {
        gap: 0.85rem;
    }

    .nav-right {
        gap: 8px;
    }

    .logo-text {
        font-size: 1.05rem;
    }

    .header-avatar {
        width: 34px;
        height: 34px;
    }

    .status-badge {
        padding: 0.35rem 0.7rem;
        font-size: 0.75rem;
    }

    .btn-action {
        padding: 0.5rem 0.85rem;
        font-size: 0.85rem;
    }

    .main-content {
        padding: 1.75rem 1rem;
    }

    .main-content h1 {
        font-size: 1.65rem;
        margin-bottom: 1.15rem;
    }

    .content-card {
        padding: 1.5rem;
        border-radius: 10px;
    }
}

@media (max-width: 600px) {
    .avatar-upload-container {
        flex-direction: column;
        text-align: center;
        gap: 14px;
    }

    .avatar-controls {
        align-items: center;
    }
}

@media (max-width: 480px) {
    .navbar {
        padding: 0 0.75rem;
    }

    .nav-left {
        gap: 0.65rem;
    }

    .nav-right {
        gap: 6px;
    }

    .logo-text {
        font-size: 0.95rem;
    }

    .status-badge {
        display: none;
    }

    .btn-action {
        padding: 0.45rem 0.7rem;
        font-size: 0.8rem;
    }

    .main-content {
        padding: 1.25rem 0.75rem;
    }

    .main-content h1 {
        font-size: 1.45rem;
    }

    .content-card {
        padding: 1.15rem;
    }

    .button.primary {
        width: 100%;
    }
}