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

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

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

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






.tablet {
    position: relative;
    width: 1090px;
    height: 790px;
    border-radius: 30px;
    padding: 8px;
    pointer-events: all;
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 1px solid #39334d;       /* normale Border */
    outline: 2px solid #3b354c;      /* äußere Outline */
    opacity: 1;
    box-shadow: inset 0 0 0 10px #010101, /* innere "Linie" */
                0 0 0 4px #c5bcca;        /* äußere Schattenlinie */
    background: transparent;              /* Hintergrund entfernt */
}





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


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

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

.tablet-frame {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 25px;
    overflow: hidden;
    position: relative;
}

/* Power Button - iPad-Style (länglicher Button an der linken Seite) */
.tablet-power-btn {
    position: absolute;
    top: 30px;
    left: -11px;
    width: 6px;
    height: 50px;
    background: linear-gradient(135deg, #4a4458, #3b354c);
    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);
}

.tablet-power-btn:hover {
    background: linear-gradient(135deg, #5a5468, #4b4558);
    transform: translateX(1px);
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.2),
                0 3px 6px rgba(0, 0, 0, 0.4);
                transform: rotate(180deg);
}

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

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

/* Kamera-Modus: Power Button anpassen */
.tablet.camera-mode .tablet-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);
}

/* Status Bar */
.status-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 38px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 26px;
    z-index: 2000; /* Über allen Apps */
    pointer-events: none; /* Macht die Status Bar nicht anklickbar */
}

.status-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 50%;
    transform: translate(-50%, -50%);
    pointer-events: all; /* Brightness Button ist anklickbar */
    z-index: 2001; /* Über status-right, damit Button nicht überlappt wird */
}

/* Brightness Control Button */
.brightness-control-btn {
    width: 50px;
    height: 3px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    transform: translate(488px, 12px);
    z-index: 2002; /* Click always on top */
}

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

}




.brightness-menu {
    position: absolute;
    top: 44px; /* direkt unter der Status-Bar (38px hoch) */
    left: 50%;
    transform: translateX(-50%) translateY(-20px) scale(0.9);
    width: 300px;
    height: 50px;
    background: transparent;
    border-radius: 16px;
    padding: 0;
    z-index: 3000; /* über allem in der Status-Bar */
    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;
    pointer-events: none; /* nur wenn sichtbar klickbar */
}








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

.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: 100%;
    height: 20px;
    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: 1800; /* Unter Status Bar und Brightness-Menü */
    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 .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: 14px;
    font-weight: 600;
}

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

.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; }

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

/* 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 .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 .battery-background {
    background: black !important;
}

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

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



/* Setup Screen */
.setup-screen {
    position: absolute;
    top: 0px;
    left: 0;
    right: 0;
    bottom: 0;
    background: #ffffff;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1200;
}

.setup-screen.active {
    display: flex;
}

.setup-content {
    text-align: center;
    color: #333;
}


.sbf-logo {
    width: 250px;
    height: 250px;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.setup-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #333;
}

.setup-subtitle {
    font-size: 16px;
    color: #666;
    margin-bottom: 40px;
}

.language-options {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.language-btn {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    min-width: 120px;
}

.language-btn:hover {
    border-color: #007bff;
    background: #e7f3ff;
    transform: translateY(-2px);
}

.language-btn .flag {
    font-size: 32px;
}

.language-btn .lang-text {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.continue-section {
    margin-top: 40px;
    height: 80px; /* Feste Höhe für den Button-Bereich */
    display: flex;
    align-items: center;
    justify-content: center;
}

.continue-btn {
    background: #007AFF;
    border: none;
    border-radius: 33px;
    padding: 16px 32px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 160px;
    font-size: 17px;
    font-weight: 600;
    color: white;
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.3);
    transform: translateY(0);
}

.continue-btn:hover {
    background: #0056CC;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.4);
}

.continue-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(0, 122, 255, 0.3);
}

/* .continue-btn.show {
    animation: slideInFromBottom 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
} */

@keyframes slideInFromBottom {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.language-btn.selected {
    border-color: #007AFF;
    background: #E3F2FD;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.2);
}

/* Theme Selection Screen */
.theme-screen {
    position: absolute;
    top: 0px;
    left: 0;
    right: 0;
    bottom: 0;
    background: #ffffff;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1200;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.theme-screen.active {
    display: flex;
}

/* .theme-screen.slide-in {
    animation: slideInFromRight 0.1s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
} */

.theme-screen.slide-out {
    animation: slideOutToLeft 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.theme-content {
    text-align: center;
    color: #333;
}

.theme-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #333;
}

.theme-subtitle {
    font-size: 16px;
    color: #666;
    margin-bottom: 40px;
}

.theme-options {
    display: flex;
    gap: 30px;
    justify-content: center;
    margin-bottom: 40px;
}

.theme-btn {
    background: #f8f9fa;
    border: 3px solid #e9ecef;
    border-radius: 16px;
    padding: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    min-width: 150px;
    position: relative;
}

.theme-btn:hover {
    border-color: #007bff;
    background: #e7f3ff;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 122, 255, 0.2);
}

.theme-btn.selected {
    border-color: #007AFF;
    background: #E3F2FD;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 122, 255, 0.3);
}

.theme-preview {
    width: 80px;
    height: 120px;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.theme-btn:hover .theme-preview {
    transform: scale(1.05);
}

.dark-preview {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

.light-preview {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.preview-screen {
    width: 100%;
    height: 85%;
    position: relative;
}

.dark-preview .preview-screen {
    background: linear-gradient(135deg, #0f3460 0%, #0e6ba8 100%);
}

.light-preview .preview-screen {
    background: linear-gradient(135deg, #ffffff 0%, #f1f3f4 100%);
}

.preview-dots {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 4px;
}

.preview-dots span {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    display: block;
}

.dark-preview .preview-dots span {
    background: rgba(255, 255, 255, 0.6);
}

.light-preview .preview-dots span {
    background: rgba(0, 0, 0, 0.4);
}

.theme-text {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.finish-section {
    margin-top: 20px;
    height: 80px; /* Feste Höhe für den Button-Bereich */
    display: flex;
    align-items: center;
    justify-content: center;
}



.finish-btn {
    background: #007AFF;
    border: none;
    border-radius: 33px;
    padding: 16px 32px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 200px;
    font-size: 17px;
    font-weight: 600;
    color: white;
    box-shadow: 0 2px 8px rgba(52, 199, 89, 0.3);
    transform: translateY(0);
}

.finish-btn:hover {
    background: #007bff;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.4);
    transform: translateY(-1px);
}

.finish-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(52, 199, 89, 0.3);
}

/* .finish-btn.show {
    animation: slideInFromBottom 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
} */

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

@keyframes slideOutToLeft {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-100%);
    }
}

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

.lock-screen.swipe-up {
    transform: translateY(-100%);
    opacity: 0;
}

.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: 100px;
    font-weight: 900;
    line-height: 1;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.main-date {
    font-size: 18px;
    font-weight: 500;
    opacity: 0.9;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
}

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

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

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

.icon-circle {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    left: 20px;
}

.icon-circle:hover {
    background: rgba(255, 255, 255, 0.3);
}

.icon-circle.active {
    background: rgba(255, 255, 255, 0.8) !important;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.6);
    transform: scale(1.05);
}

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



/* Home Indicator - bleibt immer sichtbar */
.home-indicator {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    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);
}

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

.battery-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 18px;
    height: 10px;
    background: #ffffff;
    border-radius: 3px;
}
    


.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;
    }
}

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

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

/* App Notifications */
.app-notifications-container {
    position: absolute; /* inside tablet */
    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;
}



