/* ============================================================================
   PROFIL – Stil wie Navigation und Startseite (Kikirika Design-System)
   ============================================================================ */

/* Scroll wieder erlauben (reset.css setzt overflow-y: hidden auf html/body) */
html.profil-page,
body.profil-page {
    overflow-y: auto !important;
    overflow-x: hidden;
}

/* Body: gleicher Hintergrund wie Startseite / Navigation */
body.profil-page {
    font-family: 'JetBrains Mono', monospace;
    background: linear-gradient(135deg, #ffe6f7 0%, #d4f1ff 50%, #dfffe2 100%);
    min-height: 100vh;
    padding-top: 80px; /* Platz für Top-Header (menueband.js) */
    margin: 0;
    color: #2c3e50;
    overflow-y: auto !important; /* Profilseite scrollt (reset.css setzt sonst overflow-y: hidden) */
    overflow-x: hidden;
}

html.dark-mode body.profil-page,
body.dark-mode.profil-page {
    background: #0a0a0a;
    color: #e5e7eb;
}

/* Kompakter Seiten-Header unter dem Menüband (ersetzt großen Purple-Header) */
body.profil-page .header.profil-page-header {
    background: linear-gradient(135deg, rgba(255, 107, 157, 0.9) 0%, rgba(102, 126, 234, 0.9) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 20px 24px;
    margin: 16px 20px 20px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(255, 255, 255, 0.15);
    border: 1.5px solid rgba(255, 255, 255, 0.4);
    text-align: center;
}

html.dark-mode body.profil-page .header.profil-page-header,
body.dark-mode.profil-page .header.profil-page-header {
    background: linear-gradient(135deg, rgba(255, 107, 157, 0.25) 0%, rgba(102, 126, 234, 0.25) 100%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

body.profil-page .header.profil-page-header .main-title {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 4px;
    letter-spacing: 0.02em;
}

body.profil-page .header.profil-page-header .subtitle {
    font-size: 0.95rem;
    opacity: 0.95;
    font-weight: 600;
}

/* Container: Abstand, Breite wie Navigations-Inhalt */
body.profil-page .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 40px;
}

/* Zurück-Button: Stil wie Navigations-Link / Startseite */
body.profil-page .back-button {
    background: linear-gradient(135deg, rgba(255, 107, 157, 0.9) 0%, rgba(102, 126, 234, 0.9) 100%);
    color: #fff;
    border: 1.5px solid rgba(255, 255, 255, 0.75);
    padding: 10px 20px;
    border-radius: 14px;
    font-size: 0.95rem;
    font-weight: 700;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transition: transform 0.16s ease, box-shadow 0.16s ease;
    margin-bottom: 20px;
}

body.profil-page .back-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
}

html.dark-mode body.profil-page .back-button,
body.dark-mode.profil-page .back-button {
    background: linear-gradient(135deg, rgba(255, 107, 157, 0.35) 0%, rgba(102, 126, 234, 0.35) 100%);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Cards: wie Navigations-Panel */
body.profil-page .card {
    background: #ffffff;
    border-radius: 20px;
    padding: 28px;
    margin-bottom: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1.5px solid rgba(0, 0, 0, 0.06);
}

html.dark-mode body.profil-page .card,
body.dark-mode.profil-page .card {
    background: #0a0a0a;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

body.profil-page .card-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #667eea;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

html.dark-mode body.profil-page .card-title,
body.dark-mode.profil-page .card-title {
    color: #93c5fd;
}

/* Section-Titel: wie Navigation Spalten-Überschriften */
body.profil-page .section-title {
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6c757d;
    margin-top: 24px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

html.dark-mode body.profil-page .section-title,
body.dark-mode.profil-page .section-title {
    color: rgba(255, 255, 255, 0.6);
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

/* Kindermodus-Toggle: wie Navigations-Link */
body.profil-page .kids-mode-toggle-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 16px;
}

body.profil-page .kids-mode-toggle {
    width: 100%;
    min-height: 48px;
    background: linear-gradient(135deg, rgba(255, 107, 157, 0.9) 0%, rgba(102, 126, 234, 0.9) 100%);
    color: #fff;
    border: 1.5px solid rgba(255, 255, 255, 0.75);
    padding: 12px 24px;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 700;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transition: transform 0.16s ease, box-shadow 0.16s ease;
}

body.profil-page .kids-mode-toggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
}

body.profil-page .kids-mode-toggle.active {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    border-color: rgba(255, 255, 255, 0.9);
}

html.dark-mode body.profil-page .kids-mode-toggle,
body.dark-mode.profil-page .kids-mode-toggle {
    background: linear-gradient(135deg, rgba(255, 107, 157, 0.3) 0%, rgba(102, 126, 234, 0.3) 100%);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Stat-Cards: Karten-Look wie oben */
body.profil-page .stat-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 22px;
    text-align: center;
    border: 1.5px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    transition: transform 0.16s ease, box-shadow 0.16s ease;
}

body.profil-page .stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

html.dark-mode body.profil-page .stat-card,
body.dark-mode.profil-page .stat-card {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

/* Buttons: Primär wie Startseite / Navigation */
body.profil-page .btn-primary {
    background: linear-gradient(135deg, rgba(255, 107, 157, 0.95) 0%, rgba(102, 126, 234, 0.95) 100%);
    color: #fff;
    border: 1.5px solid rgba(255, 255, 255, 0.75);
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

body.profil-page .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

body.profil-page .btn-secondary {
    background: rgba(108, 117, 125, 0.9);
    color: #fff;
    border-radius: 14px;
}

body.profil-page .btn-danger {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: #fff;
    border-radius: 14px;
}

/* Profile-Header-Section: Karten-Stil */
body.profil-page .profile-header-section {
    border-radius: 20px;
    padding: 24px;
    background: #ffffff;
    border: 1.5px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

html.dark-mode body.profil-page .profile-header-section,
body.dark-mode.profil-page .profile-header-section {
    background: #0a0a0a;
    border-color: rgba(255, 255, 255, 0.12);
}

/* Form-Elemente: abgestimmt auf Karten */
body.profil-page .form-input,
body.profil-page .form-select,
body.profil-page .form-textarea {
    border-radius: 12px;
    border: 1.5px solid rgba(0, 0, 0, 0.12);
}

html.dark-mode body.profil-page .form-input,
html.dark-mode body.profil-page .form-select,
html.dark-mode body.profil-page .form-textarea,
body.dark-mode.profil-page .form-input,
body.dark-mode.profil-page .form-select,
body.dark-mode.profil-page .form-textarea {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.2);
    color: #e5e7eb;
}

/* Modals: Panel-Stil */
body.profil-page .password-modal-content,
body.profil-page .kids-mode-info-content {
    border-radius: 20px;
    box-shadow: 0 14px 42px rgba(0, 0, 0, 0.3);
}

html.dark-mode body.profil-page .password-modal-content,
body.dark-mode.profil-page .password-modal-content {
    background: #0a0a0a !important;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

/* Treasure-Collection-Card: einheitlicher Karten-Look */
body.profil-page .treasure-collection-card {
    border-radius: 16px;
    border: 1.5px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

/* Hellmodus: Schatz-Sammlung mit hellem Layout (Türkis-Hell wie Schatzinsel) */
html:not(.dark-mode) body.profil-page .treasure-collection-card,
body.profil-page:not(.dark-mode) .treasure-collection-card {
    background: linear-gradient(135deg, #e8f4f4 0%, #d4e8e8 50%, #c8e0e0 100%) !important;
    border-color: rgba(13, 79, 79, 0.2) !important;
    box-shadow: 0 4px 16px rgba(13, 79, 79, 0.1) !important;
}

html:not(.dark-mode) body.profil-page .treasure-collection-title,
body.profil-page:not(.dark-mode) .treasure-collection-title {
    color: #0d4f4f !important;
}

html:not(.dark-mode) body.profil-page .treasure-collection-link,
body.profil-page:not(.dark-mode) .treasure-collection-link {
    color: #1a6b6b !important;
}

html:not(.dark-mode) body.profil-page .treasure-collection-link:hover,
body.profil-page:not(.dark-mode) .treasure-collection-link:hover {
    color: #0d4f4f !important;
}

html:not(.dark-mode) body.profil-page .treasure-item,
body.profil-page:not(.dark-mode) .treasure-item {
    background: rgba(255, 255, 255, 0.8) !important;
    border-color: rgba(13, 79, 79, 0.25) !important;
}

html:not(.dark-mode) body.profil-page .treasure-item:hover,
body.profil-page:not(.dark-mode) .treasure-item:hover {
    background: rgba(255, 255, 255, 0.95) !important;
    border-color: rgba(212, 168, 75, 0.5) !important;
}

html:not(.dark-mode) body.profil-page .treasure-item-count,
body.profil-page:not(.dark-mode) .treasure-item-count {
    color: #1a2e2e !important;
}

html:not(.dark-mode) body.profil-page .treasure-item-name,
body.profil-page:not(.dark-mode) .treasure-item-name {
    color: #4a6b6b !important;
}

html.dark-mode body.profil-page .treasure-collection-card,
body.dark-mode.profil-page .treasure-collection-card {
    border-color: rgba(255, 255, 255, 0.12);
}

/* Mobile: weniger Padding oben für Header */
@media (max-width: 768px) {
    body.profil-page {
        padding-top: 70px;
    }
    body.profil-page .header.profil-page-header {
        margin: 12px 14px 16px;
        padding: 16px 18px;
    }
    body.profil-page .header.profil-page-header .main-title {
        font-size: 1.4rem;
    }
}
