:root {
    --ios-blue: #2E58FF;
    --ios-gray: #F2F2F7;
    --ios-dark: #1C1C1E;
    --ios-light: #FFFFFF;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* Улучшения для плавного скролла */
html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scroll-padding-top: 20px;
    /* Отступ для фиксированных header */
    
}

body {
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    background: linear-gradient(160deg, #5E5CE6 0%, #64D2FF 100%);
}

/* Плавный скролл для всех скроллящихся элементов */
.scroll-container,
main,
section,
.sidebar,
.modal-content {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    /* Предотвращает скролл родителя */
}

/* Стили для скроллбара (Webkit браузеры) */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Улучшения для touch-устройств */
@media (hover: none) and (pointer: coarse) {
    * {
        -webkit-touch-callout: none;
        -webkit-user-select: none;
    }

    /* Увеличение области клика для touch */
    button,
    a,
    .clickable {
        min-height: 44px;
        min-width: 44px;
        padding: 12px 16px;
    }

    /* Предотвращение масштабирования при двойном тапе */
    * {
        -webkit-tap-highlight-color: rgba(0,0,0,0);
    }
}

/* Индикатор скролла для пользователя */
.scroll-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #007AFF, #5856D6);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
    z-index: 1000;
}

/* Плавные переходы для интерактивных элементов */
a, button, .btn {
    transition: all 0.2s ease-in-out;
    cursor: pointer;
}

a:hover, button:hover, .btn:hover {
    transform: translateY(-1px);
}

/* Улучшения для навигации клавиатурой */
a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 2px solid #007AFF;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Оптимизация производительности анимаций */
.animate-smooth {
    animation-duration: 0.3s;
    animation-fill-mode: both;
    animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Предотвращение сдвига контента при появлении скроллбара */
.no-scroll-shift {
    scrollbar-gutter: stable;
}

/* Мобильная оптимизация */
@media (max-width: 768px) {
    html {
        scroll-padding-top: 60px;
        /* Больший отступ для мобильных header */
    }

    /* Улучшение скролла на iOS */
    .scroll-mobile {
        -webkit-overflow-scrolling: touch;
        overflow-scrolling: touch;
    }

    /* Предотвращение блокировки скролла */
    body {
        position: relative;
        overflow-y: auto;
    }
}

/* Классы для кастомного скролла */
.custom-scroll {
    scrollbar-width: thin;
    scrollbar-color: #c1c1c1 #f1f1f1;
}

.custom-scroll::-webkit-scrollbar {
    width: 6px;
}

.custom-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scroll::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

#pad {
    border: 8px solid var(--ios-blue);
}

/* Анимация появления при скролле */
.fade-in-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.fade-in-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

body {
    height: 100vh;
    overflow: hidden;
    color: white;
    position: relative;
    transition: background 0.5s ease;
    background-size: cover;
    background-position: center;
}

#map {
    height: 500px;
    width: 100%;
}

/* Панель статуса */
#status-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    font-size: 14px;
    font-weight: 600;
    z-index: 200;
    color: white;
    background: rgba(100, 100, 100, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    background-image: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.1),
    rgba(255, 255, 255, 0.05)
    );

    transition: all 0.3s ease;
}

#status-bar > div {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Время - центральный элемент */
#status-bar .time {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-weight: 700;
}

/* Иконки в статус-баре */
#status-bar .icon {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Эффекты при наведении (если нужно) */
#status-bar:hover {
    opacity: 0.9;
    background: rgba(80, 80, 80, 0.7);
}

.status-left {
    display: flex;
    align-items: center;
    gap: 5px;
}

.status-right {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Экран блокировки */
#lock-screen {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 120px 0 100px;
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 100;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.lock-time {
    font-size: 94px;
    font-weight: 300;
    margin-bottom: 0;
    letter-spacing: -4px;
}

.lock-date {
    font-size: 22px;
    font-weight: 400;
    margin-top: -10px;
    opacity: 0.8;
}

/* Клавиатура для пароля */
.pass-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    width: 310px;
}

.pass-btn {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    border: none;
    color: white;
    font-size: 36px;
    font-weight: 300;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.1s;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.pass-btn:active {
    transform: scale(0.92);
    background: rgba(255, 255, 255, 0.2);
}

.pass-btn.empty {
    background: transparent;
    box-shadow: none;
    cursor: default;
}

#pass-display {
    height: 20px;
    margin-bottom: 40px;
    display: flex;
    justify-content: center;
    gap: 16px;
}

.pass-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.2s;
    margin-right: 10px;
}

.pass-dot.filled {
    background: white;
    transform: scale(1.1);
    animation: dotteds 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

/* Рабочий стол */
#desktop {
    display: none;
    height: 100vh;
    position: relative;
    overflow: hidden;
    padding-top: 44px;
    /* Для статус-бара */
}

/* Иконки приложений */
.app-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
    padding: 30px 25px 100px;
}

.app-icon .icon {
    width: 64px;
    height: 64px;
    border-radius: 22.5%; /* Squircle */
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 30px;
    color: white;
    
    /* Эффект жидкого стекла (основа) */
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    
    /* Граница как тончайший срез стекла */
    border: 0.5px solid rgba(255, 255, 255, 0.4);

    /* Сложная "жидкая" оптика */
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),            /* Тень парения */
        inset 0 0 15px rgba(255, 255, 255, 0.2),   /* Внутреннее свечение */
        inset 0 10px 20px rgba(255, 255, 255, 0.4),/* Верхний объемный блик */
        inset 0 -8px 15px rgba(0, 0, 0, 0.1);      /* Глубина у основания */
    
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Эффект "Жидкого глянца" (Блик-линза) */
.app-icon .icon::before {
    content: '';
    position: absolute;
    top: -20%;
    left: -10%;
    width: 120%;
    height: 70%;
    background: linear-gradient(
        180deg, 
        rgba(255, 255, 255, 0.45) 0%, 
        rgba(255, 255, 255, 0.1) 100%
    );
    border-radius: 50% 50% 50% 50% / 80% 80% 30% 30%; /* Форма линзы */
    pointer-events: none;
    filter: blur(1px);
}

/* Нижний "отсвет" внутри иконки (каустика) */
.app-icon .icon::after {
    content: '';
    position: absolute;
    bottom: -15%;
    right: -15%;
    width: 60%;
    height: 60%;
    background: radial-gradient(
        circle, 
        rgba(255, 255, 255, 0.3) 0%, 
        transparent 70%
    );
    filter: blur(8px);
    pointer-events: none;
}

/* Анимация при наведении — иконка "оживает" */
.app-icon:hover .icon {
    transform: translateY(-5px) scale(1.05);
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 30px 60px rgba(0, 0, 0, 0.4),
        inset 0 0 20px rgba(255, 255, 255, 0.3);
}

/* Нажатие — эффект сжатия жидкости */
.app-icon:active .icon {
    transform: scale(0.92);
    backdrop-filter: blur(25px);
}

/* --- Цветовая схема iOS 26 (Нео-Скевоморфизм) --- */
/* Док-бар */
.dock {
    margin-bottom: 50px;
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(25px);
    border-radius: 28px;
    padding: 12px 22px;
    display: flex;
    gap: 22px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dock-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    font-size: 24px;
    color: white;
    backdrop-filter: blur(30px);
}

.dock-icon:active {
    transform: scale(0.88);
}

/* Окна приложений */
.app-window {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--ios-gray);
    z-index: 150;
    border-radius: 0;
    overflow: hidden;
    animation: appOpen 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.app-header {
    height: 64px;
    background: var(--ios-gray);
    display: flex;
    justify-content: center;
    align-items: flex-end;
    position: relative;
    padding-bottom: 12px;
    padding-top: 44px;
    /* Для статус-бара */
}

.app-title {
    font-weight: 600;
    color: #000;
    font-size: 18px;
    font-weight: bold;
}

.close-btn {
    position: absolute;
    left: 18px;
    bottom: 14px;
    background: none;
    border: none;
    font-size: 17px;
    color: var(--ios-blue);
    cursor: pointer;
    font-weight: 500;
}

/* Браузер */
#browser-content {
    height: calc(100% - 64px);
    display: flex;
    flex-direction: column;
    background: white;
}

#browser-url-bar, #browser-req-bar {
    padding: 12px 15px;
    background: var(--ios-gray);
    display: flex;
    gap: 10px;
    align-items: center;
}

.safari-box {
    padding: 12px 15px;
    background: var(--ios-gray);
    display: flex;
    gap: 10px;
    align-items: center;
}

.safari-box div, span {
    margin-left: 15px;

}

#browser-url-input, #browser-req-input {
    flex: 1;
    padding: 10px 16px;
    border-radius: 12px;
    border: 1px solid #D1D1D6;
    font-size: 15px;
    background: white;
    outline: none;
}

#browser-go-btn {
    padding: 10px 16px;
    background: var(--ios-blue);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s;
}

#browser-go-btn:active {
    opacity: 0.8;
    transform: scale(0.96);
}

#browser-iframe {
    flex: 1;
    border: none;
    background: white;
}
#apps {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 20px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.app {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 15px 10px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.1);
}

.app:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}
/* Часы */
.clock-app-content {
    height: calc(100% - 64px);
    overflow-y: auto;
    padding: 25px;
    background: white;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#apps-app-content {
    height: calc(100% - 64px);
    overflow-y: auto;
    padding: 25px;
    background: white;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#clock-face-container {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 20px 0 40px;
}

#clock-face {
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: white;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid #E5E5EA;
}

.clock-number {
    position: absolute;
    font-size: 18px;
    font-weight: 500;
    color: #000;
    transform-origin: 50% 50%;
}

.clock-hand {
    position: absolute;
    left: 50%;
    bottom: 50%;
    transform-origin: 50% 100%;
    background: #000;
    border-radius: 4px;
    z-index: 5;
}

#clock-hour {
    width: 6px;
    height: 70px;
    margin-left: -3px;
    top: 50px;
}

#clock-minute {
    width: 4px;
    height: 100px;
    margin-left: -2px;
    top: 20px;
}
.second-mark {
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 10px;
    background-color: #333;
    transform-origin: bottom center;
    margin-left: -1px;
}

#clock-second {
    width: 2px;
    height: 100px;
    margin-left: -1px;
    background: var(--ios-blue);
    top: 20px;
    z-index: 10;
}

#clock-center {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--ios-blue);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 15;
    border: 2px solid white;
}

#digital-clock-container,.digital-clock-container {
    background: var(--ios-gray);
    border-radius: 16px;
    padding: 20px;
    width: 100%;
    max-width: 300px;
    margin-top: 20px;
    text-align: center;
}

#digital-clock {
    font-size: 48px;
    font-weight: 300;
    letter-spacing: -2px;
    color: #000;
}

#current-date {
    font-size: 18px;
    color: #8E8E93;
    margin-top: 5px;
}

/* Настройки */
.settings-item {
    padding: 16px 20px;
    border-bottom: 1px solid #E5E5EA;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #000;
    font-size: 16px;
    transition: all 0.2s;
}

.settings-item:active {
    background: rgba(0, 0, 0, 0.05);
}

.settings-item:last-child {
    border-bottom: none;
}

.settings-section {
    margin-bottom: 20px;
    background: white;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.settings-section-title {
    padding: 16px 20px;
    font-size: 14px;
    color: #8E8E93;
    background: var(--ios-gray);
    font-weight: 500;
}

#settings-content {
    height: calc(100% - 64px);
    overflow-y: auto;
    padding: 20px;
    background: var(--ios-gray);
}

.settings-select {
    border: none;
    background: none;
    font-size: 16px;
    color: #8E8E93;
    outline: none;
    appearance: none;
    text-align: right;
}

.settings-input {
    border: none;
    background: none;
    font-size: 16px;
    color: #8E8E93;
    outline: none;
    text-align: right;
    width: 60%;
}

.settings-btn {
    background: var(--ios-blue);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 14px 20px;
    margin-top: 15px;
    width: 100%;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 16px;
}

.settings-btn:active {
    opacity: 0.8;
    transform: scale(0.98);
}

/* Обои */
.wallpaper-grid {
    display: flex;                /* Выстраиваем в ряд */
    flex-wrap: nowrap;            /* Запрещаем перенос на новую строку */
    gap: 12px;                    /* Отступ между карточками */
    padding: 15px;
    overflow-x: auto;             /* Включаем горизонтальный скролл */
    scroll-snap-type: x mandatory; /* Эффект "прилипания" при прокрутке */
    -webkit-overflow-scrolling: touch; /* Плавный скролл на iPhone */
}

/* Настройка самих карточек для горизонтального режима */
.wallpaper-item {
    width: 100px;
    aspect-ratio: 9/16;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    border: 2px solid transparent;
    /* Плавность для всех свойств: трансформации, тени и границ */
    transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    flex: 0 0 auto;
    will-change: transform;
}

/* Эффект при наведении (Hover) */
@media (hover: hover) {
    .wallpaper-item:hover {
        transform: translateY(-5px) scale(1.02); /* Карточка чуть всплывает вверх */
        box-shadow: 0 12px 20px rgba(0, 0, 0, 0.3); /* Тень становится глубже */
        border-color: rgba(255, 255, 255, 0.5); /* Появляется легкая рамка */
    }

    /* Зум картинки внутри при наведении */
    .wallpaper-item:hover img {
        transform: scale(1.15); /* Картинка плавно увеличивается */
    }
}

/* Эффект при клике (Active) */
.wallpaper-item:active {
    transform: scale(0.9) translateY(0); /* Карточка сильно сжимается при нажатии */
    transition: transform 0.1s ease; /* Нажатие должно быть мгновенным */
    filter: brightness(0.8);
}

/* Обязательные стили для картинки внутри */
.wallpaper-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); /* Плавный зум */
}

/* Индикатор выбранных обоев (если ты добавляешь класс .active) */
.wallpaper-item.active {
    border-color: #007AFF;
    box-shadow: 0 0 15px rgba(0, 122, 255, 0.5);
}

/* Анимации */
@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    20%, 60% {
        transform: translateX(-10px);
    }
    40%, 80% {
        transform: translateX(10px);
    }
}

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

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

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

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Темная тема */
body.dark-theme {
    color: white;
}

body.dark-theme .app-icon p {
    color: white;
}

body.dark-theme .app-window,
body.dark-theme .app-header,
body.dark-theme #settings-content,
body.dark-theme .settings-section {
    background: #000;
}

body.dark-theme .settings-item,
body.dark-theme .app-title,
body.dark-theme #digital-clock,
body.dark-theme .clock-number {
    color: white;
}

body.dark-theme .settings-section-title {
    background: #1C1C1E;
    color: #8E8E93;
}

body.dark-theme #clock-face {
    background: #2E2E2E;
    border-color: #2C2C2E;
}

body.dark-theme .clock-hand {
    background: white;
}

body.dark-theme #digital-clock-container {
    background: #FFFFFF;
}

body.dark-theme #browser-url-input {
    background: #212121;
    border-color: #0D0D0D;
    color: white;
}

body.dark-theme .settings-item:active {
    background: rgba(255, 255, 255, 0.05);
}

/* Статус бар в приложениях */
.app-window .status-bar {
    color: #000;
    text-shadow: none;
}

body.dark-theme .app-window .status-bar {
    color: white;
}
/* Анимация звезды */
@keyframes pulseSpin {
    0% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
    50% {
        transform: scale(1.2) rotate(180deg);
        opacity: 0.6;
    }
    100% {
        transform: scale(1) rotate(360deg);
        opacity: 1;
    }
}

.star-animate {
    color: gold;
    animation: pulseSpin 2s infinite ease-in-out;
    display: inline-block;
    margin-left: 5px;
}

/* Градиент для текста */
.gradient-text {
    background: linear-gradient(90deg, #ff8a00, #e52e71, #9b00ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: bold;
    font-size: 18px;
}
.fa-map {
    animation: jump 1.0s infinite;
}
@keyframes jump {
    0% {
        transform: rotate(0deg);
    }
    50% {
        transform: rotate(50deg) scale(1.08);
    }
    100% {
        transform: rotate(0deg);
    }
}


#comp {
    position: center;
    display: flex;
}
#avatar {
    border-radius: 50%;
}
#name {
    font-weight: bold;
}
svg {
    border-radius: 20px;
}

.silvuple {
    display: flex;
    justify-content: center;
    /* горизонтальное центрирование */
    align-items: center;
    /* вертикальное центрирование */
}

#gifts {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.gift-item {
    display: flex;
    align-items: center;
    padding: 12px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.3s ease;
}

.gift-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ios-blue);
    color: white;
    border-radius: 50%;
    margin-right: 12px;
}

.gift-icon i {
    font-size: 18px;
}

.gift-info {
    flex: 1;
}

.gift-title {
    font-weight: 500;
    margin-bottom: 2px;
}

.gift-date {
    font-size: 13px;
    color: #8E8E93;
}

.gift-message {
    padding: 10px 16px;
    border-radius: 8px;
    margin-bottom: 8px;
    animation: fadeIn 0.3s ease;
    transition: opacity 0.3s;
}

.gift-message.success {
    background: rgba(52, 199, 89, 0.2);
    color: #34C759;
}

.gift-message.error {
    background: rgba(255, 59, 48, 0.2);
    color: #FF3B30;
}

@keyframes fadeOut {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    70% {
        opacity: 0.3;
        transform: scale(0.9);
    }
    100% {
        opacity: 0;
        transform: scale(0.8);
        display: none;
    }
}

@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Скрываем lock по умолчанию */
#lock {
    display: none;
}
@keyframes dotteds {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-2px);
    }
    100% {
        transform: translateY(0);
    }
}
.color-preview {
    display: flex;
}
#browser-frame-container {
    margin-top: 10px;
    padding: 10px;


}
#browser-frame {
    border-radius: 28px;
    border: var(--ios-gray) solid 40px;
}
.password-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.settings-input {
    padding-right: 40px;
    /* Место для кнопки */
    width: 100%;
    box-sizing: border-box;
}

.password-toggle {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.eye-icon {
    font-size: 16px;
    user-select: none;
}

/* Стили для активного состояния (когда пароль виден) */
.password-toggle.active .eye-icon {
    opacity: 0.7;
}

/* Убедитесь, что поля ввода выглядят правильно */
.settings-input[type="password"],
.settings-input[type="text"] {
    font-family: 'text-security-disc';
    -webkit-text-security: disc;
}

.settings-input[type="text"] {
    font-family: inherit;
    -webkit-text-security: none;
}
#lock {
    display: none;
    font-size: 24px;
    /* Размер иконки */
    color: #ff4444;
    /* Цвет иконки */
}
#wphone_ad {
    position: relative;
    width: 100%;
    height: 35%;
    border-radius: 20px;
    overflow: hidden;
}

/*#img_ad {
    width: 100%;
    height: 100%;
    border-radius: 20px;
    display: block;
    border: var(--ios-blue) solid 10px;
    /*filter: blur(20px); Блюр самого изображения */
/*-webkit-filter: blur(10px);*/

        .img_ad {
            width: 100%;
            height: 30%;
            border-radius: 20px;
            display: flex;
            /* Изменено на flex */
            justify-content: center;
            /* Горизонтальное центрирование */
            align-items: center;
            /* Вертикальное центрирование */
            margin: 0 auto;
            /* Дополнительное горизонтальное центрирование */
            border: var(--ios-blue) solid 10px;
            animation: blueShift 3s ease-in-out infinite;
            transition: 1s;
        }
        .img_ad:hover {
            transform: scale(1.1);
            filter: blur(10px);
            -webkit-filter: blur(10px);
        }

@keyframes blueShift {
    0% {
        border-color: var(--ios-blue);
        box-shadow: 0 0 15px var(--ios-blue);
    }
    33% {
        border-color: #0066ff;
        box-shadow: 0 0 25px #0066ff;
    }
    66% {
        border-color: #00aaff;
        box-shadow: 0 0 20px #00aaff;
    }
    100% {
        border-color: var(--ios-blue);
        box-shadow: 0 0 15px var(--ios-blue);
    }
}

.ads_text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: black;
    font-size: 60px;
    font-weight: bold;
    font-family: Arial, sans-serif;
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.7);
    z-index: 2;
    margin: 0;
    padding: 0;
    display: none;
}

.antiad {
    font-weight: bold;
    background: linear-gradient(45deg, var(--ios-blue), #00A6FF, #00FFFE, #FFFFFF);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: 1s;
}

span:hover {
    color: #A0A0A0;
}
.pseudo {
    width: 100%;
    height: 30%;
    border-radius: 20px;
    display: block;
    border: var(--ios-blue) solid 10px;
    animation: blueShift 3s ease-in-out infinite;
    transition: 1s;
    filter: blur(20px);
    -webkit-filter: blur(10px);
}
#as {
    color: red;
}
#bust {
    font-size: 50px;
}
#awesome {
    font-size: 50px;
    color: var(--ios-blue);
}
.blueText {
    font-size: 40px;
    color: var(--ios-blue);
    font-weight: bold;
}
#identify {
    transition: 1s;
}
#identify:hover {
    color:var(--ios-dark);
}
#identify:active {
    color:var(--ios-dark);
}



.toolbar {
    display: flex;
    padding: 15px;
    background-color: #f5f7ff;
    border-bottom: 1px solid #e0e4f0;
    overflow-x: auto;          /* Включаем горизонтальную прокрутку */
    flex-wrap: nowrap; 
    gap: 10px;
}

.color-picker {
    display: flex;
    gap: 8px;
    align-items: center;
}

.color-option {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.2s;
}

.color-option:hover {
    transform: scale(1.1);
}

.color-option.active {
    border-color: #4a6ee0;
    transform: scale(1.1);
}

.tools {
    display: flex;
    gap: 10px;
    margin-left: auto;
}

.tool-btn {
    background-color: white;
    border: 1px solid #d0d7e8;
    border-radius: 6px;
    padding: 8px 15px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.tool-btn:hover {
    background-color: #f0f3ff;
}

.tool-btn.clear {
    background-color: #ff6b6b;
    color: white;
    border-color: #ff6b6b;
}

.tool-btn.clear:hover {
    background-color: #ff5252;
}

.canvas-container {
    flex-grow: 1;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: auto;
    background-color: #f9fafd;
}

.tool-btn.fill-tool.active {
    background-color: #007AFF;
    color: white;
}




.tool-btn.save {
    background-color: #007AFF;
    color: white;
    border: none;
    /* остальные стили — padding, border-radius, font и т.д. по вашему макету */
}

.tool-btn.save svg {
    color: white; /* или inherit — тоже сработает */
}

.tools {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
}

.brush-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100px;
    height: 24px;
    background: transparent;
    outline: none;
    margin: 0;
}

/* Трек — тонкая линия */
.brush-slider::-webkit-slider-runnable-track {
    height: 4px;
    background: #d1d1d6; /* iOS light gray */
    border-radius: 2px;
    cursor: pointer;
    transition: background 0.2s ease;
}
.brush-slider::-moz-range-track {
    height: 4px;
    background: #d1d1d6;
    border-radius: 2px;
    cursor: pointer;
    transition: background 0.2s ease;
}

/* Ползунок — круглый, с анимацией */
.brush-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #007aff; /* iOS синий */
    cursor: grab;
    margin-top: -8px;
    box-shadow: 0 2px 6px rgba(0, 122, 255, 0.3);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), 
                box-shadow 0.2s ease;
}
.brush-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #007aff;
    cursor: grab;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 122, 255, 0.3);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), 
                box-shadow 0.2s ease;
}

/* Эффект "взятия" — ползунок немного увеличивается */
.brush-slider:active::-webkit-slider-thumb,
.brush-slider:focus::-webkit-slider-thumb {
    transform: scale(1.2);
    box-shadow: 0 4px 10px rgba(0, 122, 255, 0.4);
    cursor: grabbing;
}
.brush-slider:active::-moz-range-thumb,
.brush-slider:focus::-moz-range-thumb {
    transform: scale(1.2);
    box-shadow: 0 4px 10px rgba(0, 122, 255, 0.4);
    cursor: grabbing;
}

/* Опционально: подсветка трека при активности */
.brush-slider:active::-webkit-slider-runnable-track,
.brush-slider:focus::-webkit-slider-runnable-track {
    background: #b0b0b8;
}
.brush-slider:active::-moz-range-track,
.brush-slider:focus::-moz-range-track {
    background: #b0b0b8;
}

/* Подпись размера */
/* Общий стиль для отображаемого значения (кликабельный) */
#brush-size-value {
    font-size: 14px;
    font-weight: 500;
    color: #1d1d1f;
    min-width: 48px;
    text-align: center;
    user-select: none;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 6px;
    transition: background 0.2s ease, transform 0.15s ease;
}

#brush-size-value:hover {
    background: rgba(0, 0, 0, 0.04);
    transform: scale(1.03);
}

.color-picker-trigger {
    position: relative;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.color-picker-trigger:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.color-picker-input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    cursor: pointer;
    z-index: 2;
}

/* Скрыть стрелки и прочее (для единообразия) */
.color-picker-input::-webkit-color-swatch {
    border: none;
    border-radius: 50%;
}
.color-picker-input::-moz-color-swatch {
    border: none;
    border-radius: 50%;
}

/* Скрытое поле ввода — стилизовано под iOS */
input#brush-size-value {
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    width: 52px;
    height: 26px;
    padding: 0 4px;
    border: 2px solid transparent;
    border-radius: 8px;
    background: #ffffff;
    color: #1d1d1f;
    outline: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    appearance: textfield;
    animation: fadeInInput 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Мягкое появление */
@keyframes fadeInInput {
    from {
        opacity: 0;
        transform: scale(0.92);
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    }
    to {
        opacity: 1;
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }
}

/* Состояние фокуса — акцентный синий бордер (как в iOS Settings) */
input#brush-size-value:focus {
    border-color: #007aff;
    box-shadow: 0 2px 10px rgba(0, 122, 255, 0.2);
}

/* Убираем стрелки в Chrome/Safari/Firefox */
input#brush-size-value::-webkit-outer-spin-button,
input#brush-size-value::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input#brush-size-value[type=number] {
    -moz-appearance: textfield;
}

#pad {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    cursor: crosshair;
    touch-action: none; 
}

/* ================================================= */
/* АДАПТИВНОСТЬ (МЕДИА-ЗАПРОСЫ) */
/* ================================================= */

/* Планшеты и небольшие ноутбуки (до 1024px) */
@media (max-width: 1024px) {
    .toolbar {
        padding: 10px;
        justify-content: space-between;
    }
    
    .brush-slider {
        width: 80px; /* Немного уменьшаем слайдер */
    }
}

/* Смартфоны (до 768px) */
@media (max-width: 768px) {
    .toolbar {
        flex-direction: column; /* Стекинг: сначала цвета, потом инструменты */
        align-items: stretch;
        gap: 15px;
    }

    .color-picker {
        justify-content: center; /* Центруем палитру на мобилках */
        flex-wrap: wrap;
    }

    .tools {
        margin-left: 0;
        justify-content: space-around;
        width: 100%;
        border-top: 1px solid #e0e4f0;
        padding-top: 10px;
    }

    .tool-btn {
        padding: 8px 10px;
        font-size: 12px; /* Меньше текст, чтобы влезло */
        flex: 1; /* Кнопки растягиваются поровну */
        justify-content: center;
    }

    .canvas-container {
        padding: 10px;
    }

    #pad {
        max-width: 100%; /* Чтобы холст не вылезал за края экрана */
        height: auto !important; /* Сохраняем пропорции */
    }
}

/* Очень маленькие экраны (до 480px) */
@media (max-width: 480px) {
    .color-option {
        width: 25px;
        height: 25px;
    }

    .tools {
        display: grid;
        grid-template-columns: 1fr 1fr; /* Кнопки в два ряда */
        gap: 8px;
    }

    .brush-slider {
        width: 100%; /* Слайдер на всю ширину в своем ряду, если нужно */
    }
    
    .tool-btn span {
        display: none; /* Скрываем текст, оставляем только иконки (если они есть) */
    }
}

/* Исправление для touch-устройств (предотвращение скролла при рисовании) */



.instructions {
    margin-top: 10px;
    font-size: 13px;
    color: #8a94a6;
}

@media (max-width: 768px) {
    .toolbar {
        flex-direction: column;
    }
    
    .tools {
        margin-left: 0;
        justify-content: center;
    }
    
    #pad {
        width: 100% !important;
        height: auto !important;
    }
}

/* ================================================= */
/* СТИЛИ ДЛЯ ПРИЛОЖЕНИЯ "ПОГОДА" (iOS Style + Map) */
/* ================================================= */

/* Общий контейнер приложения */
#weather-app .weather-app-content {
    padding: 20px;
    height: calc(100% - 64px); /* Учитываем высоту app-header */
    overflow-y: auto;
    background: transparent; /* Фон задается в body/app-window, но контент прозрачен */
}

/* Эффект стекла для карточек внутри приложения */
#weather-app .detail-card, #weather-app .map-container {
    /* Используем общий градиент как фон приложения */
    background: rgba(255, 255, 255, 0.1); 
    border-radius: 15px; 
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#weather-app .header {
    text-align: center;
    padding-bottom: 15px;
}

#weather-app .header h1 {
    font-size: 1.8em;
    font-weight: 700;
    margin: 0;
    color: white;
}

#weather-app .date-time {
    font-size: 0.9em;
    font-weight: 400;
    opacity: 0.8;
    margin: 5px 0 0;
}

/* Основная информация */
#weather-app .main-info {
    padding: 10px 0 30px;
    cursor: pointer;
}

#weather-app .temp-section {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    color: white;
}

#weather-app .fa-icon {
    font-size: 3.5em;
    opacity: 0.9;
    flex-shrink: 0;
}

#weather-app .current-temp {
    font-size: 5.5em;
    font-weight: 600;
    line-height: 1;
    text-align: left;
}

#weather-app .description {
    font-size: 1.2em;
    font-weight: 600;
    margin-top: 5px;
    color: white;
}

/* Секция деталей (Виджеты) */
#weather-app .details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    max-height: 800px; 
    overflow: hidden;
    transition: max-height 0.7s ease-in-out, opacity 0.7s ease-in-out;
}

#weather-app .details-grid.hidden {
    max-height: 0;
    opacity: 0;
}

#weather-app .detail-card {
    padding: 15px;
    text-align: left;
    color: white;
}

#weather-app .detail-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
}

#weather-app .detail-icon {
    font-size: 1.0em;
    opacity: 0.7;
}

#weather-app .detail-label {
    font-size: 0.9em;
    opacity: 0.7;
}

#weather-app .detail-value {
    font-size: 1.8em;
    font-weight: 600;
    line-height: 1.2;
    margin-top: 5px;
}

/* Карта */
#weather-app #map-container {
    height: 300px;
    margin-top: 20px;
    padding: 0;
    
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}

#weather-app #map-container.active {
    max-height: 300px;
    opacity: 1;
}

#weather-app #map {
    height: 100%;
    width: 100%;
    border-radius: 15px;
}

/* Футер */
#weather-app .footer-note {
    font-size: 0.7em;
    opacity: 0.6;
    margin-top: 20px;
    text-align: center;
}

/* Переопределение фона всего окна приложения Погода */
#weather-app.app-window {
    background: linear-gradient(135deg, #0077b6 0%, #0096c7 100%); 
}

#notification-container {
    position: fixed;
    top: 12px; /* Небольшой отступ от верхней грани */
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    max-width: 380px;
    z-index: 999999;
    pointer-events: none;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.notification {
    pointer-events: auto;
    /* Эффект матового стекла */
    background: rgba(255, 255, 255, 0.7); 
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    
    padding: 12px 16px;
    border-radius: 24px; /* Более круглые углы в стиле iOS */
    margin-bottom: 8px;
    
    /* Тонкая граница для объема */
    border: 0.5px solid rgba(255, 255, 255, 0.4);
    
    /* Мягкая глубокая тень */
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    
    display: flex;
    align-items: center;
    gap: 12px;
    
    animation: iosSlideIn 0.6s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

/* Темная тема для уведомлений */
.notification.dark {
    background: rgba(35, 35, 35, 0.7);
    border: 0.5px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.notification-icon {
    width: 38px;
    height: 38px;
    background-size: cover;
    background-position: center;
    border-radius: 9px; /* Squircle-подобный радиус */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.notification-content {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.notification-title {
    font-size: 15px;
    font-weight: 600;
    color: #000;
    line-height: 1.2;
    margin-bottom: 2px;
}

.notification.dark .notification-title {
    color: #fff;
}

.notification-text {
    font-size: 14px;
    color: rgba(0, 0, 0, 0.7);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notification.dark .notification-text {
    color: rgba(255, 255, 255, 0.7);
}

/* Анимации в стиле iOS (плавный выезд сверху) */
@keyframes iosSlideIn {
    0% { transform: translateY(-120%) scale(0.9); opacity: 0; }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}

.notification.fade-out {
    animation: iosFadeOut 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes iosFadeOut {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(0.85); opacity: 0; filter: blur(10px); }
}

.notification-icon {
    width: 40px;             /* Или твой размер */
    height: 40px;            /* Должен быть равен ширине */
    
    display: flex;           /* Включаем гибкий контейнер */
    align-items: center;     /* Центрируем по вертикали */
    justify-content: center; /* Центрируем по горизонтали */
    
    flex-shrink: 0;          /* Чтобы иконка не сплющивалась, если текста много */
    border-radius: 50%;      /* Делаем круглым, если нужно */
    background: rgba(255, 255, 255, 0.1); /* Легкий фон для иконки */
}

/* На всякий случай сбросим отступы самой иконки i */
.notification-icon i {
    display: block;
    line-height: 1;          /* Убираем лишнее пространство снизу */
    margin: 0;
    padding: 0;
    text-align: center;
}
.theme-switch {
    position: relative;
    display: inline-block;
    /* Увеличиваем общие размеры для "жирности" */
    width: 66px; 
    height: 36px;
    flex-shrink: 0;
}

.theme-switch input {
    display: none; /* Полностью скрываем, чтобы не мешал */
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #d1d1d6;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 100px; /* Идеально круглые края */
    overflow: hidden; /* Дополнительная защита: всё, что выйдет за границы, скроется */
}

.slider:before {
    position: absolute;
    content: "";
    /* Делаем кружок крупным */
    height: 28px;
    width: 28px;
    
    /* Идеальное центрирование внутри */
    left: 4px;
    top: 50%;
    transform: translateY(-50%); /* Центровка по вертикали */
    
    background-color: white;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

/* Состояние ВКЛ */
input:checked + .slider {
    background-color: #007aff;
}

/* Самое важное: движение через CALC */
/* 100% ширины минус (размер кружка 28px + отступ 4px) */
input:checked + .slider:before {
    left: calc(100% - 32px); 
    transform: translateY(-50%); /* Сохраняем вертикальную центровку */
}

/* Эффект при нажатии: кружок чуть сплющивается, но остается внутри */
.theme-switch:active .slider:before {
    width: 34px;
}

.cc-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Две колонки */
    gap: 15px;
    margin-top: 10px;
}

/* Модуль связи (4 кнопки в сетке 2х2) */
.connectivity-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: rgba(255, 255, 255, 0.1);
    padding: 12px;
    border-radius: 28px;
    gap: 12px;
}

.cc-icon-btn {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
    transition: 0.3s;
}

.cc-icon-btn.active {
    background: #007AFF; /* Фирменный синий iOS */
}

/* Слайдеры-капсулы */
.cc-sliders-row {
    display: flex;
    gap: 15px;
}

.slider-track {
    position: relative;
    width: 60px;
    height: 140px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    overflow: hidden;
}

/* Заполнение слайдера снизу вверх */
.slider-fill {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 100%; /* Управляется через JS */
    background: rgba(255, 255, 255, 0.9);
    transition: height 0.1s ease;
}

.slider-icon {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(0,0,0,0.5);
    z-index: 2;
    pointer-events: none;
}

/* Скрытый настоящий инпут поверх капсулы */
.slider-track input[type="range"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 140px; /* Высота становится шириной */
    height: 60px;
    transform: rotate(-90deg) translateX(-140px);
    transform-origin: top left;
    opacity: 0; /* Делаем невидимым, но кликабельным */
    cursor: pointer;
}
.control-center {
    position: fixed;
    bottom: -500px; /* Глубже для плавного вылета */
    left: 50%;
    transform: translateX(-50%);
    width: 340px; /* Чуть шире для солидности */
    
    /* Эффект Liquid Glass */
    background: rgba(20, 20, 20, 0.4); /* Темная основа */
    backdrop-filter: blur(50px) saturate(210%) brightness(1.2);
    -webkit-backdrop-filter: blur(50px) saturate(210%) brightness(1.2);
    
    /* Тонкая светящаяся грань */
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.4),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05); /* Внутренний блик */
    
    border-radius: 45px;
    padding: 22px;
    
    /* Улучшенная физика вылета (iOS 26 Spring) */
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 10000;
}

.control-center.active {
    bottom: 40px; /* Оставляем зазор от края экрана */
}

/* Добавим эффект тени на контент под ним, когда CC активен */
.control-center.active::before {
    content: '';
    position: fixed;
    inset: -2000px;
    background: rgba(0,0,0,0.2);
    z-index: -1;
    pointer-events: none;
}

.cc-wrapper {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.connectivity-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1);
    padding: 12px;
    border-radius: 24px;
}

.cc-icon-btn {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
}

.cc-icon-btn.active { background: #007AFF; }

.cc-sliders-row { display: flex; gap: 12px; }

.slider-track {
    position: relative;
    width: 58px;
    height: 130px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 18px;
    overflow: hidden;
}

.slider-fill {
    position: absolute;
    bottom: 0;
    width: 100%;
    background: white;
    pointer-events: none;
}

.slider-icon {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(0,0,0,0.4);
    pointer-events: none;
    z-index: 5;
}

/* Скрытый ползунок поверх */
.slider-track input[type="range"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 130px; /* Равно высоте track */
    height: 58px; /* Равно ширине track */
    transform: rotate(-90deg) translate(-130px, 0);
    transform-origin: top left;
    opacity: 0;
    cursor: pointer;
    margin: 0;
}
.snowflake {
    position: fixed;
    top: -10px;
    color: #fff;
    user-select: none;
    z-index: 9999;
    pointer-events: none; /* Чтобы снег не мешал кликать на иконки */
    animation: fall linear forwards;
}

@keyframes fall {
    to {
        transform: translateY(100vh); /* Падает до конца экрана */
    }
}

/* 1. Обновленные переменные для темной темы */
body.dark-theme {
    --ios-bg: #000000;
    --ios-surface: #1C1C1E; /* Цвет карточек в iOS */
    --ios-text: #FFFFFF;
    --ios-secondary-text: #8E8E93;
    --ios-border: rgba(255, 255, 255, 0.1);
}

/* 2. Улучшенная логика темной темы */
body.dark-theme {
    background: var(--ios-bg) !important;
    color: var(--ios-text);
}

/* Исправляем видимость иконок в темной теме */
body.dark-theme .app-icon .icon {
    background: rgba(255, 255, 255, 0.12); /* Стеклянный эффект на черном */
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

body.dark-theme .app-window {
    background: var(--ios-bg);
}

body.dark-theme .app-header {
    background: rgba(28, 28, 30, 0.8);
    border-bottom: 0.5px solid var(--ios-border);
}

body.dark-theme .settings-section {
    background: var(--ios-surface);
}

body.dark-theme .settings-item {
    border-color: var(--ios-border);
    color: var(--ios-text);
}

/* 3. Улучшенные МЕДИА-ЗАПРОСЫ (Адаптив) */

/* Смартфоны (iPhone и аналоги) */
@media (max-width: 480px) {
    .app-grid {
        grid-template-columns: repeat(4, 1fr) !important; /* Всегда 4 в ряд */
        gap: 15px 10px !important;
        padding: 20px 15px !important;
    }

    .app-icon .icon {
        width: 58px; /* Чуть меньше для узких экранов */
        height: 58px;
        font-size: 24px;
    }

    .app-icon p {
        font-size: 11px;
    }

    /* Док-бар на мобилках */
    .dock {
        width: 90%;
        bottom: 20px;
        padding: 10px;
        gap: 15px;
    }
    
    .dock-icon {
        width: 50px;
        height: 50px;
    }
}

/* Планшеты */
@media (min-width: 481px) and (max-width: 1024px) {
    .app-grid {
        grid-template-columns: repeat(6, 1fr) !important; /* 6 иконок на планшете */
        gap: 30px;
    }
}

/* Центровка для больших экранов (чтобы сетка не растягивалась на весь монитор) */
@media (min-width: 1025px) {
    .app-grid {
        max-width: 800px;
        margin: 0 auto;
        grid-template-columns: repeat(6, 1fr) !important;
    }
}

/* Фиксируем сетку рабочего стола */
.app-grid {
    display: grid !important;
    /* Всегда строго 4 колонки */
    grid-template-columns: repeat(4, 1fr) !important; 
    justify-content: center;
    justify-items: center;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    
    /* Базовые отступы для обычных телефонов */
    gap: 30px 20px; 
    padding: 20px;
}

/* Планшеты (iPad и подобные) */
@media (min-width: 768px) {
    .app-grid {
        max-width: 600px; /* Ограничиваем общую ширину, чтобы 4 иконки не разъехались в края */
        gap: 50px 40px;   /* Увеличиваем "воздух" между иконками */
        padding: 40px;
    }
}

/* Компьютеры, Ноутбуки и ТВ */
@media (min-width: 1200px) {
    .app-grid {
        max-width: 800px; /* Иконки остаются в центре внимания */
        gap: 80px 60px;   /* Огромные отступы для премиального вида */
        padding: 60px;
    }
}

/* Смарт-часы (исключение: тут 4 в ряд убьют читаемость, делаем 2) */
@media (max-width: 280px) {
    .app-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px;
        padding: 10px;
    }
    .app-icon .icon {
        width: 48px;
        height: 48px;
        font-size: 22px;
    }
}

/* Исправляем блок, который у тебя в коде называется #apps */
#apps {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important; /* Убираем minmax, ставим 4 колонки */
    gap: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

/* Убеждаемся, что иконки не растягиваются */
.app-icon {
    width: 100%;
    max-width: 70px;
    margin: 0 auto;
}

/* Общие настройки для окна */
.app-window {
    @apply fixed inset-0 bg-[#F2F2F7] z-[100] flex flex-col font-sans overflow-hidden animate-in fade-in zoom-in duration-300;
}

/* Шапка: имитация Safe Area iPhone */
.app-header {
    @apply bg-white/80 backdrop-blur-xl border-b border-black/5 px-5 pt-12 pb-4 flex items-center justify-between sticky top-0 z-50;
}

.close-btn {
    @apply text-[#007AFF] text-[17px] font-medium active:opacity-30 transition-all duration-200;
}

.app-title {
    @apply absolute left-1/2 -translate-x-1/2 text-[17px] font-semibold text-black tracking-tight;
}

/* Контентная зона */
/* Основной контейнер контента */
#browser-content {
    @apply flex-1 flex flex-col bg-white shadow-inner;
}

/* Общие стили для панелей ввода (URL и Поиск) */
/* Бары ввода (URL и Поиск) — мягкое подсвечивание фона всей строки */
/* Контейнер браузера */
#browser-content {
    background-color: #ffffff !important;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Строки ввода */
#browser-url-bar, #browser-req-bar {
    background-color: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
    padding: 12px 20px !important;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background 0.3s ease;
}

/* ФИКС ТЕКСТА: Чтобы он был виден и не был белым */
#browser-url-input, #browser-req-input {
    flex: 1 !important;
    height: 42px !important;
    border-radius: 12px !important;
    padding: 0 16px !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    outline: none !important;
    border: 1px solid transparent !important;
    
    /* ЖЕСТКИЙ ЦВЕТ ТЕКСТА */
    color: #1c1c1e !important; 
    background-color: #f2f2f7 !important;
    
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* КРАСИВЫЙ HOVER для инпутов */
#browser-url-input:hover, #browser-req-input:hover {
    background-color: #ebebf0 !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
}

/* Эффект при клике (Focus) */
#browser-url-input:focus, #browser-req-input:focus {
    background-color: #ffffff !important;
    border-color: #007aff !important;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.15) !important;
    transform: translateY(-1px);
}

/* ФИКС КНОПОК */
#browser-go-url, #browser-go-req {
    background-color: #007aff !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 8px 18px !important;
    font-weight: 700 !important;
    font-size: 13px !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 6px rgba(0, 122, 255, 0.2) !important;
}

/* HOVER для кнопок */
#browser-go-url:hover, #browser-go-req:hover {
    background-color: #0066d6 !important;
    box-shadow: 0 6px 15px rgba(0, 122, 255, 0.35) !important;
    transform: translateY(-2px);
}

#browser-go-url:active, #browser-go-req:active {
    transform: translateY(0) scale(0.96);
}

/* Иконки Font Awesome */
#browser-url-bar::before, #browser-req-bar::before {
    font-family: "Font Awesome 5 Free", "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 18px;
    color: #aeaeb2;
    transition: color 0.3s ease;
}

#browser-url-bar:focus-within::before { color: #007aff; }

/* Плейсхолдер */
input::placeholder {
    color: #8e8e93 !important;
    opacity: 1 !important;
}

/* Фикс для системных настроек, которые могут перебивать цвет */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus {
    -webkit-text-fill-color: #1c1c1e !important;
    transition: background-color 5000s ease-in-out 0s;
}
/* Общий стиль для ссылок или кнопок «Назад» (если есть) */
.close-btn {
    @apply transition-all duration-200 hover:opacity-70 active:scale-90 hover:translate-x-[-2px] !important;
}

/* Фрейм: легкое появление при загрузке */
#browser-frame {
    @apply w-full h-full border-none bg-white transition-opacity duration-700;
}

/* Плавный вход всего контента */
#browser-content {
    @apply flex-1 flex flex-col bg-white animate-in fade-in slide-in-from-bottom-2 duration-500;
}

/* Заголовок приложения */
.app-title {
    @apply text-[17px] font-black tracking-tight text-slate-900 !important;
}

/* Секция «Экран» */

/* Контейнер фрейма */
#browser-frame-container {
    @apply flex-1 relative bg-slate-100 overflow-hidden;
}

#browser-frame {
    @apply w-full h-full border-none bg-white shadow-2xl;
}

/* Улучшенное сообщение об ошибке */
#browser-error {
    @apply absolute inset-0 bg-[#F2F2F7] flex flex-col items-center justify-center p-12 
           text-center animate-in fade-in duration-500;
}

#browser-error::before {
    content: "\f071"; /* Exclamation Triangle */
    font-family: "Font Awesome 5 Free", "Font Awesome 6 Free";
    font-weight: 900;
    @apply text-4xl text-slate-300 mb-4;
}

#browser-error p {
    @apply text-[15px] font-bold text-slate-400 max-w-[250px] leading-relaxed;
}




/* ИСПРАВЛЕНИЕ КНОПОК: Отмена, Повтор, Заливка */
#pictor-app .tool-btn {
    @apply flex items-center justify-center gap-2 px-4 py-2 rounded-xl transition-all duration-200 !important;
    /* Фон кнопок - светло-серый, чтобы текст не сливался */
    background-color: #E5E7EB !important; 
    /* Цвет иконок и текста - темно-серый */
    color: #374151 !important; 
    border: 1px solid rgba(0,0,0,0.05) !important;
}

#pictor-app .tool-btn:hover:not(:disabled) {
    background-color: #D1D5DB !important;
    color: #111827 !important;
}

#pictor-app .tool-btn:active:not(:disabled) {
    @apply scale-95 !important;
    background-color: #9CA3AF !important;
}

/* Состояние Disabled (когда нельзя нажать Назад/Вперед) */
#pictor-app .tool-btn:disabled {
    @apply opacity-30 cursor-not-allowed !important;
    background-color: #F3F4F6 !important;
    color: #9CA3AF !important;
}

/* Слайдер размера кисти (Modern iOS Style) */
#pictor-app .brush-slider {
    -webkit-appearance: none;
    @apply w-32 h-2 bg-slate-200 rounded-full outline-none transition-all !important;
}

/* Ползунок (Кругляшок) */
#pictor-app .brush-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    @apply w-5 h-5 bg-white border border-slate-300 rounded-full cursor-pointer shadow-md transition-transform !important;
}

#pictor-app .brush-slider::-webkit-slider-thumb:hover {
    @apply scale-110 shadow-lg !important;
    border-color: #007AFF !important;
}

#pictor-app .brush-slider::-moz-range-thumb {
    @apply w-5 h-5 bg-white border border-slate-300 rounded-full cursor-pointer shadow-md !important;
}

/* Текст значения размера */
#pictor-app #brush-size-value {
    @apply text-[11px] font-black text-[#007AFF] bg-blue-50 px-2 py-1 rounded-md min-w-[45px] text-center !important;
}

/* Специфические кнопки */
#pictor-app .tool-btn.clear {
    @apply bg-red-50 text-red-600 border-red-100 hover:bg-red-100 !important;
}

#pictor-app .tool-btn.save {
    @apply bg-[#007AFF] text-white border-none hover:bg-[#0056b3] shadow-blue-500/20 !important;
}

/* Фикс для иконок внутри кнопок */
#pictor-app .tool-btn i {
    @apply text-inherit !important; /* Наследует цвет кнопки (черный/темно-серый) */
}

/* Контейнер для слайдера, чтобы центрировать его */
.flex.items-center.gap-4 {
    @apply py-2 !important;
}

/* Базовый стиль дорожки слайдера */
#pictor-app .brush-slider {
    -webkit-appearance: none;
    appearance: none;
    @apply w-32 h-[6px] bg-[#D1D1D6] rounded-full outline-none transition-all !important;
    background-image: linear-gradient(#007AFF, #007AFF); /* Цвет заполнения */
    background-repeat: no-repeat;
    background-size: 0% 100%; /* Управляется через JS или статично */
}

/* Ползунок (Кнопочка) — Тот самый стиль Apple */
#pictor-app .brush-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    @apply w-7 h-7 bg-white rounded-full shadow-[0_3px_8px_rgba(0,0,0,0.15),0_1px_1px_rgba(0,0,0,0.05)] 
           cursor-grab active:cursor-grabbing active:scale-95 transition-transform !important;
    border: 0.5px solid rgba(0,0,0,0.04) !important;
}

/* Для Firefox */
#pictor-app .brush-slider::-moz-range-thumb {
    @apply w-7 h-7 bg-white rounded-full border-none shadow-[0_3px_8px_rgba(0,0,0,0.15)] 
           cursor-grab active:scale-95 transition-transform !important;
}

/* Чтобы дорожка заполнялась синим (добавь этот микро-скрипт или оставь так) */
#pictor-app .brush-slider::-webkit-slider-runnable-track {
    @apply h-[6px] rounded-full !important;
}

/* Текст значения рядом со слайдером — делаем его как системный шрифт */
#pictor-app #brush-size-value {
    @apply text-[13px] font-semibold text-[#8E8E93] min-w-[35px] text-right !important;
    font-variant-numeric: tabular-nums; /* Чтобы цифры не прыгали при смене */
}

/* Состояние, когда заливка включена (Toggle Active) */
#pictor-app .tool-btn.fill-tool.active {
    background-color: #007AFF !important; /* Яркий синий iOS */
    color: #ffffff !important;            /* Белая иконка */
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3) !important;
    border-color: transparent !important;
}

/* Анимация при переключении */
#pictor-app .tool-btn.fill-tool {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Чтобы иконка внутри тоже меняла цвет */
#pictor-app .tool-btn.fill-tool.active i {
    color: #ffffff !important;
}

/* Заголовок секции (Дизайн / Стиль) */
.settings-section-title {
    @apply flex items-center gap-2 px-5 py-3 text-[11px] font-black text-slate-400 
           uppercase tracking-widest bg-slate-50 border-b border-black/[0.03] !important;
}

/* Строка настройки (Тема) */
.settings-item {
    @apply flex items-center justify-between px-5 py-4 bg-white border-b border-black/[0.02] 
           transition-all duration-200 hover:bg-blue-50/30 !important;
}

/* Текст названия настройки */
.settings-item span {
    @apply text-[15px] font-semibold text-slate-800 !important;
}

/* Стилизация выпадающего списка (Select) */
.settings-select {
    @apply bg-slate-100 border-none rounded-xl px-4 py-2 text-[14px] font-bold 
           cursor-pointer outline-none transition-all duration-300 !important;
    /* ФИКС ЦВЕТА: чтобы текст не был белым */
    color: #1a1a1a !important;
    appearance: none; /* Убираем стандартную стрелку для чистоты */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    padding-right: 35px;
}

/* Эффекты при наведении на селект */
.settings-select:hover {
    @apply bg-slate-200 shadow-sm !important;
}

.settings-select:focus {
    @apply ring-2 ring-blue-500/20 bg-white !important;
}

/* Чтобы внутри списка текст тоже был черным */
.settings-select option {
    @apply bg-white text-black !important;
}

/* Сам элемент выбора (Select) */
.settings-select {
    @apply appearance-none bg-slate-100 border-2 border-transparent rounded-xl px-4 py-2 
           text-[14px] font-bold text-slate-900 cursor-pointer outline-none
           transition-all duration-300 shadow-sm !important;
    
    /* Принудительный черный текст */
    color: #1a1a1a !important;
    
    /* Красивая кастомная стрелочка Apple Style */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23007AFF' stroke-width='3'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 14px;
    padding-right: 40px;
}

/* Эффект при наведении на сам выбор */
.settings-select:hover {
    @apply bg-slate-200 border-slate-300/50 shadow-md -translate-y-0.5 !important;
}

/* Состояние при клике/раскрытии (Focus) */
.settings-select:focus {
    @apply bg-white border-blue-500 shadow-[0_0_0_4px_rgba(0,122,255,0.15)] !important;
}

/* Стиль для опций внутри (насколько позволяет браузер) */
.settings-select option {
    @apply bg-white text-slate-900 font-medium py-2 !important;
    padding: 10px !important;
}

/* Контейнер настройки для визуального отклика */
.settings-item {
    @apply flex items-center justify-between px-5 py-4 bg-white border-b border-black/[0.02]
           transition-all duration-300 !important;
}

/* Эффект наведения на всю строку настройки */
.settings-item:hover {
    @apply bg-blue-50/50 !important;
}

/* Текст внутри строки */
.settings-item span {
    @apply text-[15px] font-bold text-slate-800 tracking-tight transition-colors !important;
}

.settings-item:hover span {
    @apply text-blue-600 !important;
}

@tailwind base;
@tailwind components;
@tailwind utilities;

@layer components {
    .clock-number {
        @apply text-slate-400 font-black text-sm transition-colors duration-500;
        text-shadow: 0 0 5px rgba(255,255,255,0.1);
    }

    /* Эффект свечения для активного часа */
    .clock-number.active {
        @apply text-white scale-125;
        text-shadow: 0 0 15px rgba(255,255,255,0.5);
    }
}

/* Плавный ход секундной стрелки */
#clock-second {
    transition-timing-function: cubic-bezier(0.1, 2.7, 0.58, 1); /* Небольшой "отскок" в конце */
}

/* Базовый сброс и шрифты */
.clock-app-content {
    --ios-bg: #ffffff;
    --ios-text: #000000;
    --ios-accent: #ff9f0a;
    --ios-gray: #8e8e93;
    --ios-tab-bg: rgba(249, 249, 249, 0.9);
    --ios-border: rgba(0, 0, 0, 0.1);

    background-color: var(--ios-bg) !important;
    color: var(--ios-text);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
    
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* Темная тема */
.dark-theme.clock-app-content, 
.dark-theme .clock-app-content {
    --ios-bg: #000000;
    --ios-text: #ffffff;
    --ios-tab-bg: rgba(28, 28, 30, 0.85);
    --ios-border: rgba(255, 255, 255, 0.15);
}

/* Секции (Контент) */
.clock-section {
    display: none; /* Скрыто по умолчанию */
    flex-direction: column;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 20px 16px 120px 16px; /* Отступ снизу под табы */
    box-sizing: border-box;
    overflow-y: auto;
}

.clock-section.active {
    display: flex;
    animation: ios-appear 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Заголовки */
.ios-title {
    width: 100%;
    font-size: 34px;
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 20px;
    text-align: left;
}

/* Цифровые показатели */
.big-time {
    font-size: 88px;
    font-weight: 100; /* Ультра-тонкий iOS стиль */
    letter-spacing: -3px;
    margin: 60px 0;
    font-variant-numeric: tabular-nums;
}

#digital-clock {
    font-size: 52px;
    font-weight: 200;
    margin-top: 10px;
}

#current-date {
    color: var(--ios-accent);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Нижняя панель (Fixed Bottom) */
.clock-tabs {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 90px;
    background: var(--ios-tab-bg);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-top: 0.5px solid var(--ios-border);
    display: flex;
    justify-content: space-around;
    padding-bottom: 25px; /* Под домашнюю кнопку iPhone */
    z-index: 999;
}

.tab-btn {
    flex: 1;
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--ios-gray);
    transition: color 0.2s;
    cursor: pointer;
}

.tab-btn.active {
    color: var(--ios-accent);
}

.tab-btn i {
    font-size: 24px;
    margin-bottom: 5px;
}

.tab-btn span {
    font-size: 10px;
    font-weight: 500;
}

/* Кнопки секундомера */
.btn-group {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 340px;
    margin-top: 20px;
}

.circle-btn {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: none;
    font-size: 17px;
    font-weight: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: opacity 0.2s;
}

.btn-gray { background: #f2f2f7; color: #000; }
.dark-theme .btn-gray { background: #333333; color: #fff; }

.btn-start { background: #e3f9e5; color: #30d158; }
.dark-theme .btn-start { background: #1b3a1e; }

.btn-stop { background: #ffe5e5; color: #ff453a; }
.dark-theme .btn-stop { background: #3a1211; }

/* Анимация */
@keyframes ios-appear {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.pass-btn {
    /* Геометрия: гарантированный круг */
    width: 80px;
    height: 80px;
    border-radius: 50%;
    
    /* Флекс для центровки цифры */
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* Шрифт */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 32px;
    font-weight: 200;
    color: white;
    
    /* Стеклянный пирог (Liquid Glass) */
    background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0.05) 100%);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%); /* Для Safari */
    
    /* Границы и тени */
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 
        inset 0 4px 12px rgba(255, 255, 255, 0.2), /* Внутренний блик сверху */
        inset 0 -4px 12px rgba(0, 0, 0, 0.1),      /* Тень снизу для объема */
        0 10px 25px rgba(0, 0, 0, 0.2);             /* Тень под кнопкой */
    
    /* Анимация отклика */
    cursor: pointer;
    user-select: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

/* Эффект нажатия (Liquid Press) */
.pass-btn:active {
    transform: scale(0.88);
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(30px);
    transition: all 0.1s ease-out;
}

/* Медиа-запрос для ПК (чтобы кнопки были чуть больше) */
@media (min-width: 1024px) {
    .pass-btn {
        width: 95px;
        height: 95px;
        font-size: 38px;
    }
}

#notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 8px; /* Плотная пачка уведомлений */
}

.liquid-box-mini {
    width: 280px; /* Было 320px, теперь максимально компактно */
    padding: 12px 14px;
    border-radius: 20px;
    position: relative;
    display: flex;
    gap: 10px;
    cursor: pointer;
    overflow: hidden;
    
    /* Контрастное стекло для любого фона */
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.2) 0%, rgba(40, 40, 40, 0.1) 100%);
    backdrop-filter: blur(40px) saturate(210%) contrast(1.1);
    -webkit-backdrop-filter: blur(40px) saturate(210%) contrast(1.1);
    
    border: 0.5px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 10px 25px rgba(0, 0, 0, 0.2),
        inset 0 1px 2px rgba(255, 255, 255, 0.2);

    animation: liquid-arrival-mini 0.5s cubic-bezier(0.2, 1, 0.3, 1) forwards;
}

/* Иконка (еще меньше) */
.liquid-icon-mini {
    width: 32px; height: 32px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; color: #fff;
    flex-shrink: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.liquid-body-mini { display: flex; flex-direction: column; gap: 1px; width: 100%; }
.liquid-row { display: flex; justify-content: space-between; align-items: center; }

/* Текст с защитой от белого фона */
.liquid-title-mini { 
    color: #ffffff; 
    font-weight: 700; 
    font-size: 13px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5); 
}

.liquid-msg-mini { 
    color: #f0f0f0; 
    font-weight: 400; 
    font-size: 12px; 
    line-height: 1.2;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4); 
}

.liquid-meta-mini { 
    color: rgba(255, 255, 255, 0.5); 
    font-size: 9px; 
    font-weight: 800;
    text-transform: uppercase;
}

/* Анимация */
@keyframes liquid-arrival-mini {
    0% { opacity: 0; transform: scale(0.9) translateX(20px); filter: blur(5px); }
    100% { opacity: 1; transform: scale(1) translateX(0); filter: blur(0); }
}

.liquid-exit-mini {
    animation: liquid-departure-mini 0.5s ease-in forwards;
}

@keyframes liquid-departure-mini {
    to { opacity: 0; transform: scale(0.95) translateY(-10px); filter: blur(10px); }
}

/* Темная тема */
.liquid-box-mini.dark {
    background: rgba(15, 15, 15, 0.75);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Контейнер-сетка */
.font-settings-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    margin-top: 10px;
}

/* Кнопка-стекляшка */
.font-btn {
    flex: 1;
    min-width: 60px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 12px;
    font-size: 16px;
    color: rgb(0, 0, 0);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Liquid Glass эффект */
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Эффекты при наведении и нажатии */
.font-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    border-color: var(--ios-blue, #007AFF);
}

.font-btn:active {
    transform: scale(0.9);
    filter: brightness(1.2);
}

/* Стили для визуализации выбора внутри кнопок */
.font-btn.italic { font-style: italic; }
.font-btn.bold { font-weight: bold; }
.font-btn.underline { text-decoration: underline; }
.font-btn.line-through { text-decoration: line-through; }

/* Контейнер уведомлений */
#notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none; /* Чтобы не мешал кликать по десктопу */
    isolation: isolate;   /* Изолируем слои смешивания */
}

/* Сама плашка уведомления */
.liquid-box-mini {
    pointer-events: auto; /* Возвращаем кликабельность самой плашке */
    position: relative;
    width: 320px;
    padding: 14px;
    border-radius: 22px; /* В стиле iOS 17/18 */
    overflow: hidden;
    
    /* ГЛАВНОЕ ИСПРАВЛЕНИЕ: Темная подложка + правильный блюр */
    background: rgba(20, 20, 20, 0.4); 
    backdrop-filter: blur(25px) brightness(0.7) contrast(1.1);
    -webkit-backdrop-filter: blur(25px) brightness(0.7) contrast(1.1);
    
    /* Тонкая рамка, чтобы не сливалось */
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Для светлой темы, если она активна */
.liquid-box-mini:not(.dark) {
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(25px) brightness(1.1) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Шиммер (блик) делаем мягче, чтобы не слепил */
.liquid-shimmer {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.03), transparent);
    transform: translateX(-100%);
    animation: shimmer-anim 3s infinite;
}

@keyframes shimmer-anim {
    100% { transform: translateX(100%); }
}

.slider-track {
    flex: 1;
    position: relative;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    overflow: hidden;
    cursor: pointer;
    touch-action: none; /* Блокирует системный свайп */
}

.slider-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #fff;
    pointer-events: none;
    /* Убираем transition для мгновенного отклика под пальцем, 
       либо ставим очень маленькое значение */
    transition: height 0.05s linear;
}

