@font-face {
    font-family: 'Nunito-Black';
    src: url('../../assets/fonts/Nunito-Black.ttf') format('truetype');
}

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

/* Suppress browser focus rings — prevents W/key press from outlining UI buttons */
:focus {
    outline: none;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow: hidden;
    background: transparent;
}

/* Prevent text selection and element dragging inside the phone */
#phone, #phone * {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none; /* disable iOS-like callout (safety) */
}

/* Keep text selection and caret usable inside inputs/textareas/contenteditable */
#phone input,
#phone textarea,
#phone [contenteditable="true"] {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

/* Prevent image/link dragging ghost preview inside phone */
#phone img,
#phone a,
#phone [draggable="true"] {
    -webkit-user-drag: none;
}

/* Hide any selection highlight color if a browser still allows selection */
#phone ::selection { background: transparent; color: inherit; }

/* But allow visible selection highlight inside actual input fields */
#phone input::selection,
#phone textarea::selection {
    background: rgba(0, 122, 255, 0.35);
    color: inherit;
}
#phone ::-moz-selection { background: transparent; color: inherit; }

#phone-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
    padding: 0 20px 20px 0;
    pointer-events: none;
    z-index: 9999;
}






.phone {
    position: relative;
    width: 300px;
    height: 650px;
    border-radius: 51px;
    padding: 5px;
    pointer-events: all;
    transition: all 0.15s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    outline: 2px solid #3b354c;
    box-shadow: inset 0 0 0 9px #010101,
                0 0 0 4px #c5bcca;     
    background: transparent;
    /* Immer scharfes Rendering bei jeder Zoom-Stufe */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    image-rendering: high-quality;
    transform: translateZ(0);
}

/* Peek Mode: Phone fast unsichtbar lassen, aber leicht erkennbar */
.phone.peek-transparent {
    opacity: 0.1 !important; /* ~90% unsichtbar, überschreibt Sichtbarkeitsregeln */
}





/* Kamera-Modus: Nur Phone-Frame wird transparent, Phone-Rahmen bleibt schwarz */


.phone-hidden .phone {
    opacity: 0;
    transform: translateY(20px);
}

.phone-visible .phone {
    opacity: 1;
    transform: translateY(0);
}

.phone-frame {
    width: 100%;
    height: 100%;
    /* Hintergrund-Wallpaper liegt jetzt im separaten .phone-bg Element
       (siehe .phone-bg). So kann filter:brightness() gezielt nur das
       Wallpaper abdunkeln ohne den App-Inhalt zu beeinflussen. */
    background: #1a1a1c;
    border-radius: 45px;
    overflow: hidden;
    position: relative;
    clip-path: inset(0 round 45px);
    -webkit-clip-path: inset(0 round 45px);
    transform: translateZ(0);
    isolation: isolate;
}

/* ── Wallpaper-Background-Element ──────────────────────────────────
   Liegt hinter allen Phone-Inhalten (z-index 0), füllt das ganze Frame
   aus und trägt den filter:brightness (0.8) damit nur das Wallpaper
   abgedunkelt wird, nicht die Apps. */
.phone-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #1a1a1c;  /* Fallback solange noch kein Wallpaper geladen */
    filter: brightness(0.7);
    pointer-events: none;
}

/* Power Button - rechte Seite */
.phone-power-btn {
    position: absolute;
    top: 210px;
    right: -7px;
    width: 5px;
    height: 50px;
    background: linear-gradient(135deg, #000000, #000000);
    border-radius: 4px 0 0 4px;
    cursor: pointer;
    z-index: 10000;
    transition: all 0.2s ease;
    border: 1px solid #2a2536;
    border-right: none;
    transform: rotate(180deg);
}

/* Action Button - linke Seite (drückbar, keine Funktion) */
.phone-action-btn {
    position: absolute;
    top: 140px;
    left: -7px;
    width: 5px;
    height: 35px;
    background: linear-gradient(135deg, #000000, #000000);
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    z-index: 10000;
    transition: all 0.2s ease;
    border: 1px solid #2a2536;
    border-left: none;
    transform: rotate(180deg);
}

.phone-action-btn:hover {
    background: linear-gradient(135deg, #fcab09, #efa208);
    transform: rotate(180deg);
}

.phone-action-btn:active {
    background: linear-gradient(135deg, #3a3448, #2b2538);
    transform: rotate(180deg) translateX(-1px);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Volume Buttons (unter dem Power Button) */
.phone-volume-btn {
    position: absolute;
    left: -7px;
    width: 5px;
    height: 40px;
    background: linear-gradient(135deg, #000000, #000000);
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    z-index: 9999;
    transition: all 0.2s ease;
    border: 1px solid #2a2536;
    border-left: none;
    transform: rotate(180deg);
}

.phone-volume-btn:hover {
    background: linear-gradient(135deg, #5a5468, #4b4558);
    transform: rotate(180deg);
}

.phone-volume-btn:active {
    background: linear-gradient(135deg, #3a3448, #2b2538);
    transform: translateX(-1px) rotate(180deg);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.volume-up-btn { top: 200px; }
.volume-down-btn { top: 255px; }

/* ── Volume HUD (iPhone-style pill) ── */
.volume-indicator {
    position: absolute;
    top: 190px;
    left: 8px;
    width: 28px;
    height: 100px;
    pointer-events: none;
    z-index: 2200;
    border-radius: 14px;
    background: rgba(187, 187, 188, 0.14);
    backdrop-filter: blur(3px) saturate(160%);
    -webkit-backdrop-filter: blur(3px) saturate(160%);
    box-shadow:
        inset 0 0 0 1px          rgba(255, 255, 255, 0.12),
        inset 1.8px 2px 0 -2px   rgba(255, 255, 255, 0.45),
        inset -2px -2px 0 -2px   rgba(255, 255, 255, 0.16),
        inset -3px -8px 1px -6px rgba(255, 255, 255, 0.12),
        inset -0.3px -1px 4px 0  rgba(0, 0, 0, 0.12),
        inset -1.5px 2.5px 0 -2px rgba(0, 0, 0, 0.20),
        inset 0 3px 4px -2px     rgba(0, 0, 0, 0.20),
        inset 2px -6.5px 1px -4px rgba(0, 0, 0, 0.10),
        0 1px 5px 0              rgba(0, 0, 0, 0.10),
        0 6px 24px 0             rgba(0, 0, 0, 0.18),
        0 2px 12px 2px           rgba(0, 0, 0, 0.22);
    overflow: hidden;
    transform: translateX(calc(-100% - 18px));
    transition: transform 0.38s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.volume-indicator.show {
    transform: translateX(0);
}

.volume-fill {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 0%;
    background: rgba(230, 230, 232, 0.94);
    border-radius: 0 0 14px 14px;
    transition: height 0.22s ease;
}

.volume-icon-wrap {
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.volume-icon-svg {
    width: 16px;
    height: 16px;
    transition: stroke 0.15s ease;
}

.phone-power-btn:hover {
    background: linear-gradient(135deg, #5a5468, #4b4558);
    transform: rotate(180deg);
}

.phone-power-btn:active {
    background: linear-gradient(135deg, #3a3448, #2b2538);
    transform: rotate(180deg) translateX(-1px);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Kamera-Modus: Phone-Frame transparent */
.phone-frame.camera-mode {
    background: transparent !important;
}

/* Kamera-Modus: Power Button anpassen */
.phone.camera-mode .phone-power-btn {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.4));
    border-color: rgba(255, 255, 255, 0.2);
}

.phone.camera-mode .phone-action-btn {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.4));
    border-color: rgba(255, 255, 255, 0.2);
}

/* Status Bar */
.status-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 44px; /* 28 px */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    /* Über App-UI und Call-Overlays (2000), aber UNTER dem Face-ID-Scan-
       Overlay (2000 → explizit 1990 in dieser Datei, siehe .face-id-overlay).
       Hintergrund: Während des Face-ID-Scans soll der Status-Bar NICHT
       durchscheinen oder den Scan-Bereich oben verdecken. Daher wird er
       bei aktivem Face-ID-Scan via JS versteckt (siehe lockscreen.js). */
    z-index: 2100;
    /* pointer-events: none;  */
}

.status-center {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(69px, 270%);
    pointer-events: all; /* Brightness Button ist anklickbar */
}

/* Brightness Control Button */
.brightness-control-btn {
    width: 46px;
    height: 3px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.brightness-control-btn:hover {
    background: rgba(255, 255, 255, 0.9);

}




.brightness-menu {
    position: absolute;
    top: -8px; /* 15px weiter nach oben verschoben */
    left: 50%;
    transform: translateX(-50%) scale(0.8);
    width: 100px; /* Auf 150px begrenzt */
    height: 64px;
    background: transparent;
    border-radius: 16px;
    padding: 0;
    z-index: 3100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: none;
    border: none;
}








.brightness-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) scale(1);
}

.brightness-slider-container {
    display: flex;
    align-items: center;
    gap: 0;
    width: 100%;
    height: 100%;
    position: relative;
}

.brightness-icon {
    display: none;
}

.brightness-slider {
    flex: 1;
    width: 10px;
    height: 30px;
    border-radius: 16px;
    background: linear-gradient(to right, #ececec 0%, #ececec var(--brightness-percent, 100%), #5e5e5ebd var(--brightness-percent, 100%), #5e5e5ebd 100%);
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    position: relative;
    overflow: hidden;
}

.brightness-slider::-webkit-slider-track {
    background: transparent;
    height: 50px;
    border-radius: 16px;
}

.brightness-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 0px;
    height: 0px;
    background: transparent;
    cursor: pointer;
    border: none;
    box-shadow: none;
}

.brightness-slider::-webkit-slider-thumb:hover {
    background: transparent;
    box-shadow: none;
}

.brightness-slider::-moz-range-thumb {
    width: 0px;
    height: 0px;
    background: transparent;
    cursor: pointer;
    border: none;
    box-shadow: none;
}

.brightness-slider::-moz-range-thumb:hover {
    background: transparent;
    box-shadow: none;
}

.brightness-slider::-moz-range-track {
    background: transparent;
    height: 50px;
    border-radius: 16px;
    border: none;
}

/* Brightness Overlay - für die Abdunkelung */
.brightness-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0);
    pointer-events: none;
    z-index: 1900; /* Unter Status Bar aber über allem anderen */
    transition: background-color 0.3s ease;
    border-radius: 25px;
}

/* Kamera Modus Anpassungen */
.statusbar-white .brightness-control-btn {
    background: rgba(255, 255, 255, 0.6);
}

.statusbar-white .brightness-control-btn:hover {
    background: rgba(255, 255, 255, 0.9);
}

.statusbar-black .brightness-control-btn {
    background: rgba(0, 0, 0, 0.6);
}

.statusbar-black .brightness-control-btn:hover {
    background: rgba(0, 0, 0, 0.9);
}

.status-bar.camera-mode .brightness-control-btn {
    background: rgba(255, 255, 255, 0.6);
}

.status-bar.camera-mode .brightness-control-btn:hover {
    background: rgba(255, 255, 255, 0.9);
}



/* Kamera-Modus: Status Bar komplett transparent */
.status-bar.camera-mode {
    background: transparent !important;
}

.status-bar.camera-mode .status-left,
.status-bar.camera-mode .status-right {
    color: white !important;
}

.status-bar.camera-mode .bar {
    background: white !important;
}

.status-bar.camera-mode .airplane-icon {
    fill: white !important;
}

.status-bar.camera-mode .battery-background {
    background: white !important;
}

.status-bar.camera-mode .battery-outline {
    border-color: white !important;
}

.status-bar.camera-mode .battery-outline::after {
    background: white !important;
}

.status-left {
    color: white;
    font-size: 15px;
    font-weight: 600;
    margin-left: 12px;
    position: relative;
    top: 3px;
    /* text-shadow: 0 1px 4px rgba(0, 0, 0, 0.55), 0 0px 2px rgba(0, 0, 0, 0.35); */
}

#statusbar-carrier {
    position: relative;
    left: -3px;
}

/* Homescreen: sbfcom + silent-icon 10px nach links */
.status-left.silent-mode-visible {
    transform: translateX(-10px);
}

/* Lockscreen: flex-Layout (eliminiert Whitespace-Gap), 10px links + 2px hoch, 1px Abstand zum Icon */
.status-left.silent-mode-lockscreen {
    display: flex;
    align-items: center;
    transform: translateX(-10px) translateY(-2px);
}
.status-left.silent-mode-lockscreen #silent-mode-indicator {
    margin-left: 1px;
}

.status-right {
    display: flex;
    align-items: center;
    gap: 3px;
    color: white;
    font-size: 14px;
    margin-right: 10px;
}

.signal-bars {
    display: flex;
    gap: 2px;
    align-items: flex-end;
}

.bar {
    width: 3px;
    background: white;
    border-radius: 1px;
}

.bar:nth-child(1) { height: 4px; }
.bar:nth-child(2) { height: 6px; }
.bar:nth-child(3) { height: 8px; }
.bar:nth-child(4) { height: 10px; }

/* Inaktiver Signalbalken (zu wenig Empfang für diese Stufe) */
.bar.bar--inactive {
    opacity: 0.25;
}

.wifi-icon {
    font-size: 12px;
}

/* Airplane Mode Icon */
.airplane-icon {
    margin-right: 3px;
    flex-shrink: 0;
}

/* Airplane Mode aktiv: Signal-Bars ausblenden */
.status-right.airplane-mode-active .signal-bars {
    display: none;
}

/* Airplane Mode aktiv: Flugzeug anzeigen, 15% kleiner und 2px weiter rechts */
.status-right.airplane-mode-active .airplane-icon {
    display: block !important;
    width: 13.6px;
    height: 13.6px;
    margin-left: 2px;
}

/* Statusbar Farb-Themes */
/* Weiße Statusbar (Standard für Home Screen) */
.statusbar-white .status-left,
.statusbar-white .status-right {
    color: white !important;
}

.statusbar-white .bar {
    background: white !important;
}

.statusbar-white .airplane-icon {
    fill: #FF8C00 !important;
}

.statusbar-white .battery-background {
    background: white !important;
}

.statusbar-white .battery-outline {
    border-color: white !important;
}

.statusbar-white .battery-outline::after {
    background: white !important;
}

/* Schwarze Statusbar (für Apps mit hellem Hintergrund) */
.statusbar-black .status-left,
.statusbar-black .status-right {
    color: black !important;
}

.statusbar-black .bar {
    background: black !important;
}

.statusbar-black .airplane-icon {
    fill: #FF8C00 !important;
}

.statusbar-black .battery-background {
    background: black !important;
}

.statusbar-black .battery-outline {
    border-color: black !important;
}

.statusbar-black .battery-outline::after {
    background: black !important;
}



/* Lock Screen */
.lock-screen {
    position: absolute;
    top: 5px;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    text-align: center;
    transition: transform 0.42s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 1100;
    opacity: 1;
    visibility: visible;
    will-change: transform;
    overflow: hidden;
}

/* Abgerundeter Unterrand + Liquid-Glass-Schimmer während des Hochschiebes */
.lock-screen.swipe-up {
    transform: translateY(-105%);
    border-bottom-left-radius: 52px;
    border-bottom-right-radius: 52px;
}

/* Liquid-Glass-Kante unten — sichtbar während der Slide-Animation */
.lock-screen.swipe-up::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    pointer-events: none;
    border-radius: 0 0 52px 52px;
    background: linear-gradient(
        to top,
        rgba(255, 255, 255, 0.16) 0%,
        rgba(255, 255, 255, 0.06) 55%,
        transparent 100%
    );
    box-shadow:
        inset 0 -2px 0 0 rgba(255, 255, 255, 0.28),
        inset  1px 0 0 0 rgba(255, 255, 255, 0.08),
        inset -1px 0 0 0 rgba(255, 255, 255, 0.08);
}

.lock-screen.hidden {
    display: none !important;
    visibility: hidden;
    opacity: 0;
}

.time-display {
    margin-bottom: auto;
    margin-top: 60px;
}

.main-time {
    font-family: 'Nunito-Black', sans-serif;
    font-size: 60px;
    font-weight: 900;
    line-height: 1;

    /* ── Liquid-Glass-Effekt (CSS-Äquivalent zur Canvas-Technik) ───────────
       Parameter: rl:0.14  rr:0.61  hg:1.00  rw:0.67                       */
    color: transparent;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 1.00)  0%,
        rgba(255, 255, 255, 0.17) 25%,
        rgba(255, 255, 255, 0.00) 55%,
        rgba(255, 255, 255, 0.00) 80%,
        rgba(255, 255, 255, 0.17) 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.67);
    text-shadow:
        /* Top-links-Reflex  (rl) */  1.5px -3px   0 rgba(255, 255, 255, 0.14),
        /* Bottom-rechts-Reflex (rr) */ -1px  1.5px 0 rgba(255, 255, 255, 0.61);
}

.main-date {
    font-size: 13px;
    font-weight: 500;
    opacity: 0.9;
    text-shadow: 0 1px 2px rgb(0 0 0 / 25%), 0 0px 2px rgb(0 0 0 / 30%);
}

/* Bottom Icons */
.bottom-icons {
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding: 0 0px;
    margin-bottom: 20px;
}

.bottom-icon {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.bottom-icon:hover {
    transform: scale(1.1);
}

/* Im Lockscreen kein Zoom-Effekt auf den Bottom-Icons */
.lock-screen .bottom-icon:hover {
    transform: none;
}

.icon-circle {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    position: relative;
    -webkit-tap-highlight-color: transparent;
    transition: box-shadow 0.18s ease, background-color 0.18s ease, transform 0.12s ease;
    background-color: rgba(187, 187, 188, 0.16);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    box-shadow:
        inset 0 0 0 1px        rgba(255, 255, 255, 0.14),
        inset 1px 2px 0 -1px   rgba(255, 255, 255, 0.60),
        0 3px 8px 0            rgba(0, 0, 0, 0.15);
    color: #ffffff;
}

/* Nudge left icon a bit inward */
.bottom-icon.flashlight .icon-circle {
    left: 20px;
}

/* Nudge right icon a bit inward */
.bottom-icon.camera .icon-circle {
    right: 20px;
}

.icon-circle:hover {
    background-color: rgba(187, 187, 188, 0.26);
    box-shadow:
        inset 0 0 0 1px        rgba(255, 255, 255, 0.18),
        inset 1px 2px 0 -1px   rgba(255, 255, 255, 0.70),
        0 3px 12px 0           rgba(0, 0, 0, 0.12);
}

.icon-circle.active {
    background-color: rgba(255, 255, 255, 0.82) !important;
    color: #000;
    box-shadow:
        inset 0 0 0 1px        rgba(255, 255, 255, 0.30),
        inset 1px 2px 0 -1px   rgba(255, 255, 255, 0.85),
        0 3px 10px 0           rgba(0, 0, 0, 0.18);
}

.icon-circle.active:hover {
    background-color: rgba(255, 255, 255, 0.90) !important;
}

/* Position: left = flashlight, right = camera */
.bottom-icon.flashlight { align-self: flex-start; }
.bottom-icon.camera { margin-left: auto; margin-right: 0px; }

/* Hide lock screen UI when camera opened from lock */
.lock-screen.camera-active .time-display,
.lock-screen.camera-active .bottom-icons,
.lock-screen.camera-active .home-indicator {
    opacity: 0;
    visibility: hidden;
}

/* Hide swipe hint when camera opened from lock */
.lock-screen.camera-active .swipe-hint {
    opacity: 0;
    visibility: hidden;
}

/* Face Lock Overlay (fullscreen blur + centered label) */
.face-id-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background: rgba(0, 0, 0, 0.15); /* subtle darken */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    /* Über Status-Bar (2100) und allen anderen UI-Elementen, damit der
       Face-ID-Scan-Bereich oben nicht durch den Status-Bar verdeckt wird.
       Dynamic Island (2500) bleibt darüber (während Scan ist sie irrelevant). */
    z-index: 2400;
}

.face-id-overlay.show {
    opacity: 1;
}

.face-id-label {
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.35);
    opacity: 0.95;
    animation: facelockFade 1.2s ease-in-out infinite;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

@keyframes facelockFade {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}




/* Home Indicator - bleibt immer sichtbar */
.home-indicator {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 5px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 1400; /* Über Home Screen aber unter Status Bar */
}

.home-indicator:hover {
    background: rgb(255, 255, 255);
}

.home-indicator:active {
    transform: translateX(-50%) scale(0.95);
}

/* Light Mode: dunkler Home-Indicator auf hellem Hintergrund */
.phone-frame.theme-light .home-indicator,
.theme-light .home-indicator,
body.theme-light .home-indicator {
    background: rgba(0, 0, 0, 0.45);
}
.phone-frame.theme-light .home-indicator:hover,
.theme-light .home-indicator:hover,
body.theme-light .home-indicator:hover {
    background: rgb(0, 0, 0);
}

/* Swipe Hint (small and subtle above home bar) */
.swipe-hint {
    position: absolute;
    bottom: 20px; /* slightly above home indicator */
    left: 0;
    right: 0;
    width: 100%;
    color: rgba(255, 255, 255, 0.9);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.2px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.25);
    display: block;
    text-align: center;
    white-space: nowrap;
    z-index: 1401; /* slightly above home indicator */
    opacity: 0.95;
    animation: swipeHintPulse 1.8s ease-in-out infinite;
    pointer-events: none; /* don’t block clicks on home bar */
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    filter: none;
}

.swipe-hint::before {
    content: none;
}

@keyframes swipeHintPulse {
    0% { transform: translateY(0); opacity: 0.6; }
    30% { transform: translateY(-6px); opacity: 0.95; }
    60% { transform: translateY(0); opacity: 0.85; }
    100% { transform: translateY(0); opacity: 0.6; }
}

/* Battery Indicator */
.battery-container {
    position: relative;
    width: 20px;
    height: 10px;
}

.battery-background {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 6px;
    background: #ffffff;
    border-radius: 2px;
}
    


.battery-outline {
    position: absolute;
    top: 0;
    left: 0;
    width: 20px;
    height: 10px;
    border: 1px solid white;
    border-radius: 3px;
}

.battery-outline::after {
    content: '';
    position: absolute;
    top: 2px;
    right: -4px;
    width: 2px;
    height: 4px;
    background: white;
    border-radius: 0 2px 2px 0;
}

/* Animations */
@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideOutDown {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(100%);
        opacity: 0;
    }
}

.phone.slide-in {
    animation: slideInUp 0.1s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.phone.slide-out {
    animation: slideOutDown 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* App Notifications */
.app-notifications-container {
    position: absolute; /* inside phone */
    top: 20px;
    right: 20px;
    z-index: 1600; /* above content, below status bar (2000) */
    pointer-events: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 350px;
}

.app-notification {
    background: rgba(28, 28, 30, 0.92); /* dark default */
    border-radius: 12px;
    padding: 16px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    pointer-events: auto;
    /* no backdrop blur */
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.app-notification-show {
    opacity: 1;
    transform: translateX(0);
}

.app-notification-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.app-notification-icon {
    font-size: 16px;
    font-weight: bold;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.app-notification-message {
    flex: 1;
    line-height: 1.4;
}

/* Notification types */
/* Tone down colors; keep subtle badges */
.app-notification-success { border-color: rgba(52, 199, 89, 0.25); }
.app-notification-error { border-color: rgba(255, 59, 48, 0.25); }
.app-notification-warning { border-color: rgba(255, 149, 0, 0.25); }
.app-notification-info { border-color: rgba(0, 122, 255, 0.25); }

.theme-light .app-notification {
    background: rgba(255, 255, 255, 0.92);
    color: #111;
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.theme-dark .app-notification {
    background: rgba(28, 28, 30, 0.92);
    color: #fff;
}

/* Phone Size Scaling - Scharfe Text-Darstellung */
#phone-container.scaled {
    /* Verbesserte Rendering-Performance für skalierte Inhalte */
    transform-style: preserve-3d;
    
    /* Schärfere Texte bei verschiedenen Skalierungen */
    filter: contrast(1.01);
}

/* Zoom-basierte Skalierung (schärfer als transform) */
#phone-container[style*="zoom"] {
    /* Reset transform properties when using zoom */
    transform: none !important;
    transform-origin: initial !important;
}

#phone-container.scaled * {
    /* Verhindere Unschärfe bei transformierten Elementen */
    text-rendering: geometricPrecision;
    -webkit-font-smoothing: subpixel-antialiased;
    -moz-osx-font-smoothing: auto;
    
    /* Verbesserte Klarheit für alle Elemente */
    backface-visibility: hidden;
    transform-style: preserve-3d;
}

/* Spezielle Optimierungen für Text-Elemente */
#phone-container.scaled .home-time,
#phone-container.scaled .app-name,
#phone-container.scaled .status-text,
#phone-container.scaled h1, #phone-container.scaled h2, #phone-container.scaled h3,
#phone-container.scaled p, #phone-container.scaled span, #phone-container.scaled div {
    /* Scharfe Textdarstellung forcieren */
    font-kerning: auto;
    text-rendering: optimizeLegibility;
    -webkit-font-feature-settings: "kern" 1;
    font-feature-settings: "kern" 1;
}

/* Alarm Ring Modal - Global styles for overlay with Face Lock blur effect */
.alarm-ring-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background: rgba(0, 0, 0, 0.15);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1199;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 35px;
    margin-top: 4px;
    margin-bottom: 4px;
    margin-left: 4px;
    margin-right: 4px;
}

.alarm-ring-modal.show {
    display: flex;
    opacity: 1;
}

.alarm-ring-content {
    text-align: center;
    padding: 40px;
    max-width: 90%;
}

.alarm-ring-time {
    font-size: 70px;
    font-weight: 900;
    color: white;
    letter-spacing: -2px;
    margin-bottom: 16px;
    font-family: 'Nunito-Black', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.alarm-ring-label {
    font-size: 28px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 60px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.alarm-ring-controls {
    display: flex;
    justify-content: center;
}

.alarm-ring-stop {
    width: 120px;
    height: 40px;
    border-radius: 100px;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ff3b30;
    color: white;
    box-shadow: 0 4px 12px rgba(255, 59, 48, 0.4);
}

.alarm-ring-stop:hover {
    background: #e6342a;
    transform: scale(1.05);
}

.alarm-ring-stop:active {
    transform: scale(0.95);
}

.alarm-ring-stop span {
    font-size: 14px;
    font-weight: 600;
}
