/* ========================================================================
   Scriptorium Cloud – Design System
   ========================================================================
   Alle zentralen Design-Werte sind als CSS-Variablen im :root-Block
   definiert. Um das Theme anzupassen, musst du nur die Werte hier ändern.
   ======================================================================== */

:root {
    /* ─── Farben ─────────────────────────────────────────────── */
    --bg-color: #1a1a2e;
    --bg-secondary: #16213e;
    --bg-card: #1e2a4a;
    --bg-input: #0f1a30;
    --text-color: #e0e0e0;
    --text-secondary: #a0a0b0;
    --text-muted: #6b7a8f;
    --accent-color: #0f3460;
    --accent-hover: #1a4a7a;
    --primary-color: #e94560;
    --primary-hover: #ff6b81;
    --success-color: #2ecc71;
    --warning-color: #f39c12;
    --error-color: #e74c3c;
    --border-color: #2a3a5a;

    /* ─── Typografie ──────────────────────────────────────────── */
    --font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.25rem;
    --font-size-xl: 1.5rem;
    --font-size-2xl: 2rem;

    /* ─── Abstände & Radien ──────────────────────────────────── */
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --border-radius-full: 9999px;
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;

    /* ─── Schatten & Übergänge ────────────────────────────────── */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.2);
    --transition: 0.2s ease;
}

/* ========================================================================
   Frutiger Aero Theme
   Überschreibt die :root-Variablen für den nostalgischen Look
   ======================================================================== */

[data-theme="frutiger-aero"] {
    /* ─── Farben ─────────────────────────────────────────────── */
    --bg-color: #e8f5e9;
    --bg-secondary: rgba(255, 255, 255, 0.8);
    --bg-card: rgba(255, 255, 255, 0.65);
    --bg-input: rgba(255, 255, 255, 0.85);
    --text-color: #1a237e;
    --text-secondary: #37474f;
    --text-muted: #78909c;
    --accent-color: #1565c0;
    --accent-hover: #1976d2;
    --primary-color: #2e7d32;
    --primary-hover: #388e3c;
    --success-color: #1b5e20;
    --warning-color: #e65100;
    --error-color: #c62828;
    --border-color: rgba(255, 255, 255, 0.9);

    /* ─── Schatten ───────────────────────────────────────────── */
    --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.08);
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 24px rgba(0, 0, 0, 0.08);
}

[data-theme="frutiger-aero"] body {
    background: linear-gradient(135deg, #87CEEB 0%, #E0F7FA 50%, #C8E6C9 100%);
    background-attachment: fixed;
}

[data-theme="frutiger-aero"] .view,
[data-theme="frutiger-aero"] #login-view-container,
[data-theme="frutiger-aero"] #register-view-container {
    background: linear-gradient(135deg, #87CEEB 0%, #E0F7FA 50%, #C8E6C9 100%);
    background-attachment: fixed;
}

[data-theme="frutiger-aero"] .login-card,
[data-theme="frutiger-aero"] .register-card,
[data-theme="frutiger-aero"] .new-note-card,
[data-theme="frutiger-aero"] .note-card {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

[data-theme="frutiger-aero"] .app-header {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.9);
}

[data-theme="frutiger-aero"] .notes-header {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.9);
}

[data-theme="frutiger-aero"] .download-btn {
    background: linear-gradient(180deg, #1e88e5 0%, #1565c0 100%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 4px rgba(21, 101, 192, 0.3);
    color: #fff;
}

[data-theme="frutiger-aero"] .download-btn:hover {
    background: linear-gradient(180deg, #42a5f5 0%, #1976d2 100%);
    box-shadow: 0 4px 8px rgba(21, 101, 192, 0.4);
}

[data-theme="frutiger-aero"] .user-badge {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.7);
}

[data-theme="frutiger-aero"] .form-group input,
[data-theme="frutiger-aero"] .form-group textarea,
[data-theme="frutiger-aero"] .form-group select {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.9);
    color: var(--text-color);
}

[data-theme="frutiger-aero"] .btn-primary {
    background: linear-gradient(180deg, #43a047 0%, #2e7d32 100%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 4px rgba(46, 125, 50, 0.3);
    color: #fff;
}

[data-theme="frutiger-aero"] .btn-primary:hover {
    background: linear-gradient(180deg, #4caf50 0%, #388e3c 100%);
    box-shadow: 0 4px 8px rgba(46, 125, 50, 0.4);
}

[data-theme="frutiger-aero"] .btn-secondary {
    background: linear-gradient(180deg, #1e88e5 0%, #1565c0 100%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 4px rgba(21, 101, 192, 0.3);
    color: #fff;
}

[data-theme="frutiger-aero"] .btn-secondary:hover {
    background: linear-gradient(180deg, #42a5f5 0%, #1976d2 100%);
    box-shadow: 0 4px 8px rgba(21, 101, 192, 0.4);
}

[data-theme="frutiger-aero"] .btn-danger {
    background: transparent;
    border: 1px solid var(--error-color);
    color: var(--error-color);
}

[data-theme="frutiger-aero"] .btn-danger:hover {
    background: linear-gradient(180deg, #ef5350 0%, #c62828 100%);
    border-color: transparent;
    color: #fff;
}

[data-theme="frutiger-aero"] .logo {
    color: var(--primary-color);
}

/* ========================================================================
   Global Reset & Base Styles
   ======================================================================== */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--primary-hover);
}

/* ========================================================================
   Login-View Container (fullscreen)
   ======================================================================== */

#login-view-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100vw;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    padding: var(--spacing-md);
    padding-top: calc(2.5rem + var(--spacing-md));
}

/* ========================================================================
   Register-View Container (fullscreen immersive)
   ======================================================================== */

#register-view-container {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    overflow: hidden;
}

/* ========================================================================
   Login & Register Cards
   ======================================================================== */

.login-card,
.register-card {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-2xl);
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
    text-align: center;
}

/* ========================================================================
   Register View – Immersive Frutiger Aero + Glassmorphism
   ======================================================================== */

/* ─── Ebene 1: Hintergrund-Slider ───────────────────────────── */

.register-bg-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

.bg-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    opacity: 0;
    transition: opacity 1.5s ease;
    pointer-events: none;
    padding: var(--spacing-2xl);
    padding-left: 5%;
}

.bg-slide.active {
    opacity: 1;
    pointer-events: auto;
}

/* Lebendige Farbverläufe pro Slide */
.bg-slide-1 {
    background: linear-gradient(135deg, #00c6ff 0%, #0072ff 30%, #00d4aa 70%, #a8edea 100%);
}

.bg-slide-2 {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 30%, #4facfe 70%, #00f2fe 100%);
}

.bg-slide-3 {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 30%, #a8edea 70%, #00c6ff 100%);
}

/* Slide-Inhalt (große Texte, links zentriert) */
.bg-slide-content {
    max-width: 45%;
    color: #fff;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

.bg-slide-icon {
    font-size: 5rem;
    margin-bottom: var(--spacing-lg);
    line-height: 1;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
}

.bg-slide-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: var(--spacing-sm);
    letter-spacing: -0.02em;
}

.bg-slide-text {
    font-size: 1.5rem;
    font-weight: 400;
    opacity: 0.9;
}

/* ─── Glowing Orbs (Lichtreflexe) ───────────────────────────── */

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.6;
    pointer-events: none;
    animation: orbFloat 8s ease-in-out infinite;
}

.orb-1 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(0, 255, 200, 0.8), transparent 70%);
    top: 10%;
    right: 15%;
    animation-delay: 0s;
}

.orb-2 {
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(100, 200, 255, 0.7), transparent 70%);
    bottom: 15%;
    left: 10%;
    animation-delay: 2s;
}

.orb-3 {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(200, 255, 150, 0.6), transparent 70%);
    top: 50%;
    left: 40%;
    animation-delay: 4s;
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -20px) scale(1.1); }
    66% { transform: translate(-20px, 30px) scale(0.95); }
}

/* ─── Hintergrund-Slider Dots ───────────────────────────────── */

.bg-slider-dots {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.75rem;
    z-index: 3;
}

.bg-slider-dot {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.bg-slider-dot.active {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 255, 255, 1);
    transform: scale(1.2);
}

.bg-slider-dot:hover {
    background: rgba(255, 255, 255, 0.6);
}

/* ─── Ebene 2: Glas-Formular (Glassmorphism) ────────────────── */

.glass-auth-card {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 420px;
    margin-right: 8%;
    padding: var(--spacing-2xl);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    text-align: center;
    color: #fff;
}

.glass-auth-card h1 {
    font-size: var(--font-size-xl);
    margin-bottom: var(--spacing-xs);
    color: #fff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.glass-auth-card .subtitle {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: var(--spacing-xl);
}

/* Glas-Inputs */
.glass-auth-card .form-group label {
    color: rgba(255, 255, 255, 0.8);
}

.glass-auth-card .form-group input {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 10px;
    color: #fff;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.glass-auth-card .form-group input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.glass-auth-card .form-group input:focus {
    border-color: rgba(255, 255, 255, 0.7);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.15), inset 0 2px 4px rgba(0, 0, 0, 0.05);
    background: rgba(255, 255, 255, 0.25);
}

/* Glänzender Registrieren-Button */
.glass-auth-card .btn-primary {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.3) 100%);
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: #fff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.4);
    font-weight: 700;
    letter-spacing: 0.03em;
    transition: all 0.3s ease;
}

.glass-auth-card .btn-primary:hover {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0.25) 50%, rgba(255, 255, 255, 0.4) 100%);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

.glass-auth-card .error-message {
    color: #fff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.glass-auth-card .register-hint {
    color: rgba(255, 255, 255, 0.7);
}

.glass-auth-card .register-hint a {
    color: #fff;
    text-decoration: underline;
}

.logo {
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
}

.login-card h1,
.register-card h1 {
    font-size: var(--font-size-xl);
    margin-bottom: var(--spacing-xs);
}

.subtitle {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    margin-bottom: var(--spacing-xl);
}

/* ─── Form Elements ────────────────────────────────────── */

.form-group {
    margin-bottom: var(--spacing-md);
    text-align: left;
}

.form-group label {
    display: block;
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xs);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-color);
    font-size: var(--font-size-base);
    font-family: var(--font-family);
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(233, 69, 96, 0.2);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* ─── Buttons ──────────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-sm) var(--spacing-lg);
    border: none;
    border-radius: var(--border-radius);
    font-size: var(--font-size-base);
    font-family: var(--font-family);
    cursor: pointer;
    transition: background-color var(--transition), transform var(--transition);
    width: 100%;
    font-weight: 600;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-secondary {
    background-color: var(--accent-color);
    color: var(--text-color);
    width: auto;
}

.btn-secondary:hover {
    background-color: var(--accent-hover);
}

.btn-icon {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    padding: var(--spacing-xs);
    width: auto;
    line-height: 1;
    transition: transform var(--transition), filter var(--transition);
    filter: grayscale(0.3);
}

.btn-icon:hover {
    transform: scale(1.15);
    filter: grayscale(0);
}

.btn-danger {
    background-color: transparent;
    color: var(--error-color);
    border: 1px solid var(--error-color);
    width: auto;
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: var(--font-size-sm);
}

.btn-danger:hover {
    background-color: var(--error-color);
    color: #fff;
}

/* ─── Error Messages ────────────────────────────────────── */

.error-message {
    color: var(--error-color);
    font-size: var(--font-size-sm);
    margin-top: var(--spacing-sm);
    min-height: 1.2em;
}

/* ─── Hints ──────────────────────────────────────────────── */

.register-hint {
    margin-top: var(--spacing-lg);
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

/* ========================================================================
   Notes View
   ======================================================================== */

.notes-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md) var(--spacing-xl);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 2.5rem;
    left: 0;
    right: 0;
    z-index: 100;
}

.notes-header h1 {
    font-size: var(--font-size-lg);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.user-badge {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    padding: var(--spacing-xs) var(--spacing-sm);
    background: var(--bg-card);
    border-radius: var(--border-radius-full);
}

.notes-container {
    max-width: 800px;
    margin: 80px auto 0;
    padding: var(--spacing-xl);
    width: 100%;
}

/* ─── New Note Card ──────────────────────────────────────── */

.new-note-card {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
    box-shadow: var(--shadow);
}

.new-note-card h2 {
    font-size: var(--font-size-lg);
    margin-bottom: var(--spacing-md);
    color: var(--text-color);
}

/* ─── Notes List Section ──────────────────────────────────── */

.notes-list h2 {
    font-size: var(--font-size-lg);
    margin-bottom: var(--spacing-md);
    color: var(--text-color);
}

/* ─── Category Sections ────────────────────────────────────── */

.category-section {
    margin-bottom: var(--spacing-xl);
}

.category-heading {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: var(--font-size-base);
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: var(--spacing-sm);
    padding-bottom: var(--spacing-xs);
    border-bottom: 2px solid var(--border-color);
}

.category-heading-icon {
    font-size: 1.1rem;
    line-height: 1;
}

.category-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    min-width: 1.5rem;
    height: 1.5rem;
    padding: 0 0.35rem;
    border-radius: var(--border-radius-full);
    background-color: var(--accent-color);
    color: var(--text-color);
    margin-left: auto;
}

.empty-state {
    text-align: center;
    color: var(--text-muted);
    padding: var(--spacing-2xl);
}

/* ─── Individual Note Card ────────────────────────────────── */

.note-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition);
}

.note-card:hover {
    box-shadow: var(--shadow);
}

.note-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: var(--spacing-sm);
}

.note-card-title {
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--text-color);
    word-break: break-word;
    flex: 1;
    margin-right: var(--spacing-sm);
}

.note-card-meta {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    flex-shrink: 0;
}

.note-category-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: var(--border-radius-full);
    background-color: var(--accent-color);
    color: var(--text-color);
    white-space: nowrap;
    line-height: 1.4;
}

.note-card-date {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    white-space: nowrap;
}

.note-card-content {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    line-height: 1.5;
    word-break: break-word;
    margin-bottom: var(--spacing-sm);
    white-space: pre-wrap;
}

.note-card-actions {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: flex-end;
}

/* ========================================================================
   App Header (global, above login & notes)
   ======================================================================== */

.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1.25rem;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.app-header-title {
    font-size: var(--font-size-base);
    font-weight: 700;
    color: var(--text-color);
    letter-spacing: 0.02em;
}

.app-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.85rem;
    border-radius: var(--border-radius);
    background: var(--accent-color);
    color: var(--text-color);
    font-size: var(--font-size-sm);
    font-weight: 600;
    text-decoration: none;
    transition: background-color var(--transition), transform var(--transition);
    white-space: nowrap;
}

.download-btn:hover {
    background: var(--accent-hover);
    color: var(--text-color);
    transform: translateY(-1px);
}

.download-btn:active {
    transform: scale(0.97);
}

/* ========================================================================
   Global Theme Toggle
   Always visible, fixed to top-right of the viewport
   ======================================================================== */

.theme-toggle-global {
    position: fixed;
    top: 0.6rem;
    right: 0.75rem;
    z-index: 10000;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.4rem;
    line-height: 1;
    border-radius: var(--border-radius);
    transition: transform 0.2s ease, filter 0.2s ease, background-color 0.3s ease;
    filter: grayscale(0.3);
}

/* When app-header is present, shift theme toggle down */
body:has(.app-header) .theme-toggle-global {
    top: calc(0.6rem + 2.5rem);
}

.theme-toggle-global:hover {
    transform: scale(1.15);
    filter: grayscale(0);
}

/* ========================================================================
   Responsive
   ======================================================================== */

/* Register Overlay – Responsive */
@media (max-width: 768px) {
    #register-view-container {
        justify-content: center;
        flex-direction: column;
    }

    .glass-auth-card {
        margin-right: 0;
        max-width: 90%;
    }

    .bg-slide-content {
        max-width: 60%;
    }

    .bg-slide-icon {
        font-size: 3.5rem;
    }

    .bg-slide-title {
        font-size: 2rem;
    }

    .bg-slide-text {
        font-size: 1.1rem;
    }

    .orb-1 { width: 200px; height: 200px; }
    .orb-2 { width: 180px; height: 180px; }
    .orb-3 { width: 150px; height: 150px; }
}

@media (max-width: 600px) {
    .app-header {
        padding: 0.4rem 0.75rem;
    }

    .app-header-title {
        font-size: var(--font-size-sm);
    }

    .download-btn {
        padding: 0.25rem 0.6rem;
        font-size: 0.75rem;
    }

    .login-card,
    .register-card {
        padding: var(--spacing-lg);
    }

    .glass-auth-card {
        padding: var(--spacing-lg);
        max-width: 92%;
    }

    .bg-slide-content {
        max-width: 75%;
    }

    .bg-slide-icon {
        font-size: 2.5rem;
        margin-bottom: var(--spacing-md);
    }

    .bg-slide-title {
        font-size: 1.5rem;
    }

    .bg-slide-text {
        font-size: 1rem;
    }

    .notes-header {
        padding: var(--spacing-sm) var(--spacing-md);
        top: 2rem;
    }

    .notes-header h1 {
        font-size: var(--font-size-base);
    }

    .notes-container {
        padding: var(--spacing-md);
        margin-top: 60px;
    }

    body:has(.app-header) .theme-toggle-global {
        top: calc(0.6rem + 2rem);
    }
}

@media (max-width: 480px) {
    .bg-slide-content {
        max-width: 85%;
    }

    .bg-slide-icon {
        font-size: 2rem;
    }

    .bg-slide-title {
        font-size: 1.25rem;
    }

    .bg-slide-text {
        font-size: 0.875rem;
    }

    .glass-auth-card {
        padding: var(--spacing-md);
        max-width: 95%;
    }
}
