/* Global styles for Telegram Bot Mini App */
:root {
    --tg-theme-bg-color: #ffffff;
    --tg-theme-text-color: #000000;
    --tg-theme-hint-color: #999999;
    --tg-theme-link-color: #007aff;
    --tg-theme-button-color: #007aff;
    --tg-theme-button-text-color: #ffffff;
    --tg-theme-secondary-bg-color: #f8f9fa;
}

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

html,
body,
#app {
    height: 100%;
    min-height: var(--tg-viewport-height, 100dvh);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--tg-theme-bg-color, #ffffff);
    color: var(--tg-theme-text-color, #000000);
    line-height: 1.6;
}

button {
    font-family: inherit;
}

input,
textarea,
select {
    font-family: inherit;
}

/* Container */
.container {
    width: 100%;
    margin: 0 auto;
    padding: 0 0 20px 0;
    /* Убираем горизонтальные отступы */
    min-height: var(--tg-viewport-height, 100dvh);
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    text-align: center;
}

.content-section {
    margin-top: 0;
    width: 100%;
    flex: 1;
    display: flex;
    min-height: 0;
    /* Позволяет flex-элементам сжиматься */
    height: 100%;
    /* Занимает всю доступную высоту */
}

/* Content Feed */
.content-feed {
    width: 100%;
    max-width: 100%;
    background: var(--tg-theme-bg-color, #ffffff);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.content-viewer {
    flex: 1;
    min-height: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    touch-action: manipulation;
    /* Отключаем двойное нажатие для масштабирования, но разрешаем прокрутку */
    cursor: grab;
    /* Показываем курсор "захват" для десктопа */
    user-select: none;
    /* Предотвращаем выделение текста при перетаскивании */
}

.content-viewer:active {
    cursor: grabbing;
    /* Меняем курсор при активном перетаскивании */
}

.slide-card {
    width: 100%;
    height: 100%;
    min-width: 100%;
    display: flex;
    flex-direction: column;
    cursor: inherit;
    /* Наследуем курсор от родителя */
    user-select: none;
    /* Предотвращаем выделение текста при перетаскивании */
    transition: transform 0.6s cubic-bezier(0.4, 0.0, 0.2, 1), opacity 0.6s cubic-bezier(0.4, 0.0, 0.2, 1);
}

/* Embla Carousel Styles */
.embla {
    overflow: hidden;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.embla__viewport {
    overflow: hidden;
    flex: 1;
    min-height: 0;
    height: 100%;
}

.embla__container {
    display: flex;
    flex-direction: row;
    height: 100%;
    touch-action: pan-y pinch-zoom;
    will-change: transform;
    backface-visibility: hidden;
}

.embla__slide {
    flex: 0 0 100%;
    min-width: 100%;
    max-width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

.navigation-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--tg-theme-secondary-bg-color, #f8f9fa);
    border-bottom: 1px solid var(--tg-theme-hint-color, #e0e0e0);
    flex-shrink: 0;
}

/* Break timer progress bar (15 минут) */
.break-timer-progress-container {
    width: 100%;
    height: 5px;
    /* В 1.5 раза толще основного (3px * 1.5 = 4.5px, округлено до 5px) */
    background: transparent;
    overflow: hidden;
    flex-shrink: 0;
}

.break-timer-progress-bar {
    height: 100%;
    width: 0%;
    background: #34c759;
    /* Зеленый цвет для отличия от основного синего, но в пределах стиля */
    transition: width 0.1s linear;
    opacity: 0.9;
}

.nav-button {
    background: var(--tg-theme-button-color, #007aff);
    color: var(--tg-theme-button-text-color, #ffffff);
    border: none;
    border-radius: 8px;
    padding: 12px 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
    min-width: 0;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-button.nav-prev,
.nav-button.nav-next {
    font-size: 20px;
}

.nav-button.nav-period {
    font-size: 14px;
}

.nav-button.nav-period.highlighted {
    background: #34c759;
    /* Зеленый цвет, соответствующий цветовой схеме приложения */
    box-shadow: 0 0 0 2px rgba(52, 199, 89, 0.3);
    font-weight: 600;
}

.nav-button:hover:not(:disabled) {
    background: var(--tg-theme-button-color, #0056cc);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.nav-button.nav-period.highlighted:hover:not(:disabled) {
    background: #30b855;
    /* Немного темнее зеленого при наведении */
}

.nav-button:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.nav-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.nav-button:hover:not(:disabled) {
    opacity: 0.8;
}

.navigation-controls:has(.nav-button) {
    justify-content: space-between;
}

.navigation-controls:not(:has(.nav-button)) {
    justify-content: center;
}

.item-counter {
    font-weight: 600;
    color: var(--tg-theme-text-color, #000000);
    font-size: 14px;
}

.item-header {
    padding: 8px 16px;
    background: var(--tg-theme-secondary-bg-color, #f8f9fa);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    border-bottom: 1px solid var(--tg-theme-hint-color, #e0e0e0);
    flex-shrink: 0;
}

.item-url {
    color: var(--tg-theme-hint-color, #666666);
    font-family: monospace;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 200px;
}

.item-meta {
    font-weight: 600;
    color: var(--tg-theme-text-color, #000000);
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 200px;
}

/* Loading, Error, Empty states */
.loading-state,
.error-state,
.empty-state {
    padding: 40px 20px;
    text-align: center;
    background: var(--tg-theme-bg-color, #ffffff);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--tg-theme-hint-color, #e0e0e0);
    border-top: 4px solid var(--tg-theme-button-color, #007aff);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading-state p,
.error-state p,
.empty-state p {
    margin: 0 0 8px 0;
    color: var(--tg-theme-hint-color, #666666);
    font-size: 14px;
}

.empty-hint {
    font-size: 12px !important;
    opacity: 0.7;
}

.error-icon,
.empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
}

.retry-button {
    background: var(--tg-theme-button-color, #007aff);
    color: var(--tg-theme-button-text-color, #ffffff);
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 14px;
    cursor: pointer;
    transition: opacity 0.2s;
    margin-top: 16px;
}

.retry-button:hover {
    opacity: 0.8;
}

.retry-button:active {
    opacity: 0.6;
}

/* WebView Container */
.webview-placeholder {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.webview-container {
    position: relative;
    width: 100%;
    flex: 1;
    min-height: 0;
    border-radius: 12px;
    overflow: hidden;
    background: var(--tg-theme-bg-color, #ffffff);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin: 8px 0;
}

.webview-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    background: transparent;
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--tg-theme-bg-color, #ffffff);
    z-index: 10;
}

.loading-overlay .loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--tg-theme-hint-color, #e0e0e0);
    border-top: 3px solid var(--tg-theme-button-color, #007aff);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 12px;
}

.loading-overlay p {
    color: var(--tg-theme-hint-color, #666666);
    font-size: 14px;
    margin: 0;
}

.error-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--tg-theme-bg-color, #ffffff);
    z-index: 10;
    padding: 20px;
    text-align: center;
}

.error-overlay .error-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.error-overlay p {
    color: var(--tg-theme-hint-color, #666666);
    font-size: 14px;
    margin: 0 0 16px 0;
}

.error-overlay .retry-button {
    background: var(--tg-theme-button-color, #007aff);
    color: var(--tg-theme-button-text-color, #ffffff);
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.error-overlay .retry-button:hover {
    opacity: 0.8;
}

.error-overlay .retry-button:active {
    opacity: 0.6;
}

/* Notification styles */
#notification-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    pointer-events: none;
}

.notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: var(--tg-theme-secondary-bg-color, #f8f9fa);
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 90%;
    z-index: 1000;
    transition: transform 0.3s ease;
    pointer-events: auto;
}

.notification.visible {
    transform: translateX(-50%) translateY(0);
}

.notification.success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.notification.error {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.notification.warning {
    background: #fff3cd;
    color: #856404;
    border-left: 4px solid #ffc107;
}

.notification.info {
    background: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

.notification .icon {
    font-size: 20px;
    flex-shrink: 0;
}

.notification .content {
    flex: 1;
    min-width: 0;
}

.notification .content p {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    word-wrap: break-word;
}

/* Settings button */
.settings-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--tg-theme-button-color, #007aff);
    color: var(--tg-theme-button-text-color, #ffffff);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    transition: all 0.2s ease;
    padding: 0;
}

.settings-button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.settings-button:active {
    transform: scale(0.95);
}

.settings-button svg {
    width: 24px;
    height: 24px;
    pointer-events: none;
}

/* Settings page styles */
.settings-container {
    padding: 20px;
}

.back-button {
    background: var(--tg-theme-secondary-bg-color, #f8f9fa);
    color: var(--tg-theme-text-color, #000000);
    border: 1px solid var(--tg-theme-hint-color, #e0e0e0);
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.back-button:hover {
    opacity: 0.8;
}

h1 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 24px;
    font-weight: 700;
    color: var(--tg-theme-text-color, #000000);
}

.card {
    background: var(--tg-theme-bg-color, #ffffff);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.card-highlighted {
    background: var(--tg-theme-secondary-bg-color, #f8f9fa);
}

.card-outlined {
    border: 1px solid var(--tg-theme-hint-color, #e0e0e0);
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--tg-theme-text-color, #000000);
}

.card-subtitle {
    font-size: 14px;
    color: var(--tg-theme-hint-color, #999999);
    margin-bottom: 16px;
}

.user-info p {
    margin: 6px 0;
    font-size: 14px;
}

.working-hours-display {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.time-display {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.time-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--tg-theme-hint-color, #e0e0e0);
}

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

.time-item .label {
    font-size: 14px;
    color: var(--tg-theme-hint-color, #666666);
}

.time-item .time {
    font-size: 16px;
    font-weight: 600;
    color: var(--tg-theme-text-color, #000000);
}

.actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

.telegram-button {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s;
}

.telegram-button.primary {
    background: var(--tg-theme-button-color, #007aff);
    color: var(--tg-theme-button-text-color, #ffffff);
}

.telegram-button.secondary {
    background: var(--tg-theme-secondary-bg-color, #f8f9fa);
    color: var(--tg-theme-text-color, #000000);
    border: 1px solid var(--tg-theme-hint-color, #e0e0e0);
}

.telegram-button:hover {
    opacity: 0.8;
}

.telegram-button:active {
    opacity: 0.6;
}

.form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.field label {
    font-size: 14px;
    font-weight: 500;
    color: var(--tg-theme-text-color, #000000);
}

.field input,
.field textarea,
.field select {
    padding: 10px;
    border: 1px solid var(--tg-theme-hint-color, #e0e0e0);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    background: var(--tg-theme-bg-color, #ffffff);
    color: var(--tg-theme-text-color, #000000);
}

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

.reminder-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--tg-theme-hint-color, #e0e0e0);
    border-radius: 8px;
    margin-bottom: 8px;
}

.reminder-content {
    flex: 1;
}

.reminder-message {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
    color: var(--tg-theme-text-color, #000000);
}

.reminder-time {
    font-size: 12px;
    color: var(--tg-theme-hint-color, #666666);
}

.delete-reminder-btn {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.delete-reminder-btn:hover {
    opacity: 0.8;
}

.status-list p {
    margin: 6px 0;
    font-size: 14px;
}

.debug-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--tg-theme-hint-color, #e0e0e0);
}

.debug-panel {
    margin-top: 12px;
    padding: 12px;
    background: var(--tg-theme-secondary-bg-color, #f8f9fa);
    border-radius: 8px;
    max-height: 300px;
    overflow-y: auto;
}

.debug-panel h4 {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: var(--tg-theme-text-color, #000000);
}

.debug-logs {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.debug-log {
    font-size: 12px;
    line-height: 1.4;
}

.debug-time {
    color: var(--tg-theme-hint-color, #999999);
    font-weight: 500;
}

.debug-message {
    color: var(--tg-theme-text-color, #000000);
    margin-left: 8px;
}

.debug-data {
    margin: 4px 0 0 0;
    padding: 8px;
    background: var(--tg-theme-bg-color, #ffffff);
    border-radius: 4px;
    font-size: 10px;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

/* Telegram WebApp Info Widget */
.telegram-info-widget {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--tg-theme-secondary-bg-color, #f8f9fa);
    border-top: 1px solid var(--tg-theme-hint-color, #e0e0e0);
    padding: 12px 20px;
    z-index: 1100;
    font-size: 12px;
    max-height: 50vh;
    overflow-y: auto;
    transition: max-height 0.3s ease;
}

.telegram-info-widget.collapsed {
    max-height: 60px;
}

.telegram-info-widget.collapsed .widget-content {
    display: none;
}

.widget-controls-collapsed {
    display: none;
    padding: 8px 20px;
    text-align: center;
}

.telegram-info-widget.collapsed .widget-controls-collapsed {
    display: block;
}

.widget-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    max-width: 100%;
    margin: 0 auto;
}

.widget-section {
    border: 1px solid var(--tg-theme-hint-color, #e0e0e0);
    border-radius: 8px;
    padding: 8px;
    background: var(--tg-theme-bg-color, #ffffff);
}

.widget-section-title {
    font-weight: 600;
    color: var(--tg-theme-text-color, #000000);
    margin-bottom: 6px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.widget-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 2px;
    min-height: 16px;
}

.widget-item:last-child {
    margin-bottom: 0;
}

.widget-label {
    color: var(--tg-theme-hint-color, #666666);
    font-weight: 500;
    flex-shrink: 0;
}

.widget-value {
    color: var(--tg-theme-text-color, #000000);
    font-weight: 600;
    font-family: monospace;
    font-size: 11px;
    word-break: break-all;
    text-align: right;
    flex: 1;
    min-width: 0;
}

.widget-logs {
    max-height: 120px;
    overflow-y: auto;
    background: var(--tg-theme-secondary-bg-color, #f8f9fa);
    border-radius: 4px;
    padding: 4px;
}

.log-entry {
    font-family: monospace;
    font-size: 10px;
    color: var(--tg-theme-text-color, #333333);
    margin-bottom: 2px;
    padding: 2px 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.5);
    word-break: break-all;
}

.log-entry.error {
    color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
}

.log-entry.success {
    color: #28a745;
    background: rgba(40, 167, 69, 0.1);
}

.log-entry.warning {
    color: #ffc107;
    background: rgba(255, 193, 7, 0.1);
}

.widget-controls {
    display: flex;
    gap: 4px;
    justify-content: center;
    flex-wrap: wrap;
}

.widget-button {
    background: var(--tg-theme-button-color, #007aff);
    color: var(--tg-theme-button-text-color, #ffffff);
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 10px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s;
}

.widget-button:hover {
    opacity: 0.8;
}

.widget-button:active {
    transform: scale(0.95);
}

/* Mobile optimizations for navigation */
@media (max-width: 768px) {
    .nav-button {
        padding: 14px 6px;
        font-size: 18px;
        border-radius: 12px;
    }

    .nav-button.nav-prev,
    .nav-button.nav-next {
        font-size: 22px;
    }

    .nav-button.nav-period {
        font-size: 13px;
    }

    .navigation-controls {
        padding: 12px 20px;
        gap: 8px;
    }

    .item-counter {
        font-size: 16px;
        font-weight: 600;
    }

    .item-meta {
        font-size: 16px;
        font-weight: 600;
    }

    /* Гарантируем горизонтальное расположение слайдов на мобильных */
    .embla__container {
        flex-direction: row !important;
        flex-wrap: nowrap !important;
    }

    .embla__slide {
        flex: 0 0 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .nav-button {
        padding: 16px 4px;
        font-size: 16px;
    }

    .nav-button.nav-prev,
    .nav-button.nav-next {
        font-size: 20px;
    }

    .nav-button.nav-period {
        font-size: 12px;
    }

    .navigation-controls {
        padding: 16px 16px;
        gap: 8px;
    }

    .item-counter {
        font-size: 14px;
    }

    .item-meta {
        font-size: 14px;
    }

    /* Гарантируем горизонтальное расположение слайдов на маленьких экранах */
    .embla__container {
        flex-direction: row !important;
        flex-wrap: nowrap !important;
    }

    .embla__slide {
        flex: 0 0 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
    }
}

/* Break modal styles */
.break-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.break-modal-content {
    background: var(--tg-theme-bg-color, #ffffff);
    border-radius: 16px;
    padding: 32px 24px;
    max-width: 90%;
    width: 320px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.break-modal-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.break-modal-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--tg-theme-text-color, #000000);
    margin-bottom: 12px;
}

.break-modal-message {
    font-size: 16px;
    color: var(--tg-theme-hint-color, #666666);
    margin-bottom: 24px;
    line-height: 1.5;
}

.break-modal-button {
    background: var(--tg-theme-button-color, #007aff);
    color: var(--tg-theme-button-text-color, #ffffff);
    border: none;
    border-radius: 8px;
    padding: 12px 32px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

.break-modal-button:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.break-modal-button:active {
    transform: translateY(0);
    opacity: 0.8;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .widget-content {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .telegram-info-widget {
        font-size: 11px;
        padding: 8px 12px;
    }

    .widget-section {
        padding: 6px;
    }

    .break-modal-content {
        padding: 24px 20px;
        width: 85%;
    }

    .break-modal-icon {
        font-size: 48px;
        margin-bottom: 12px;
    }

    .break-modal-title {
        font-size: 20px;
        margin-bottom: 10px;
    }

    .break-modal-message {
        font-size: 14px;
        margin-bottom: 20px;
    }

    .break-modal-button {
        padding: 10px 24px;
        font-size: 14px;
    }
}

.embla__slide.fade-out {
    animation: fadeOut 0.3s ease-out forwards;
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: scale(1);
    }

    to {
        opacity: 0;
        transform: scale(0.95);
    }
}

.embla__slide--removing {
    animation: slideOut 0.5s forwards cubic-bezier(0.4, 0.0, 0.2, 1);
}

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

.congrats-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    animation: fadeIn 0.3s ease;
}

.congrats-modal-content {
    background: var(--tg-theme-bg-color, #ffffff);
    border-radius: 16px;
    padding: 32px 24px;
    max-width: 90%;
    width: 340px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

.congrats-modal-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.congrats-modal-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--tg-theme-text-color, #000000);
    margin-bottom: 12px;
}

.congrats-modal-message {
    font-size: 16px;
    color: var(--tg-theme-hint-color, #666666);
    margin-bottom: 24px;
    line-height: 1.5;
}

.congrats-modal-button {
    background: var(--tg-theme-button-color, #007aff);
    color: var(--tg-theme-button-text-color, #ffffff);
    border: none;
    border-radius: 8px;
    padding: 12px 32px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

/* Compact settings form */
.compact-form {
    gap: 10px;
}

.time-inputs-row {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.compact-field {
    flex: 1;
    min-width: 0;
}

.compact-label {
    font-size: 13px;
    color: var(--tg-theme-hint-color, #999999);
    margin-bottom: 4px;
    display: block;
}

.compact-form input[type="time"],
.compact-form select {
    width: 100%;
    padding: 8px 12px;
    font-size: 16px;
    /* Prevent zoom on iOS */
}