* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background-color: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.header {
    background: linear-gradient(90deg, #4b6cb7 0%, #182848 100%);
    color: white;
    padding: 25px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.header h1 {
    font-size: 28px;
    font-weight: 600;
}

.header h1 i {
    margin-right: 15px;
}

.current-date {
    font-size: 18px;
    background: rgba(255, 255, 255, 0.2);
    padding: 10px 20px;
    border-radius: 50px;
}

/* ===== СТИЛИ ДЛЯ КНОПКИ ВХОДА/ВЫХОДА ===== */
#login-button-container {
    margin-left: auto;
}

.login-btn, .logout-btn {
    background: linear-gradient(90deg, #4b6cb7 0%, #182848 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.login-btn:hover, .logout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(75, 108, 183, 0.3);
    background: #cb3a3a;
}

.logout-btn {
    background: #d46262;
    padding: 8px 15px;
    font-size: 13px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    color: white;
}

.user-info span {
    font-weight: 500;
}

/* ===== ОСНОВНОЙ КОНТЕНТ ===== */
.main-content {
    display: flex;
    min-height: 700px;
}

.calendar-section {
    flex: 3;
    padding: 30px;
    border-right: 1px solid #eee;
}

.events-section {
    flex: 2;
    padding: 30px;
    background-color: #f9fafc;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.calendar-header h2 {
    font-size: 26px;
    color: #2c3e50;
}

.nav-btn {
    background: #4b6cb7;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s;
}

.nav-btn:hover {
    background: #3a5795;
    transform: scale(1.05);
}

.weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-weight: 600;
    color: #4b6cb7;
    margin-bottom: 15px;
    padding: 10px 0;
    border-bottom: 2px solid #eee;
}

.weekdays div {
    padding: 10px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
}

.day {
    height: 100px;
    background-color: #fff;
    border: 1px solid #eaeaea;
    border-radius: 10px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.day:hover {
    background-color: #f0f5ff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.day-number {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 5px;
}

.day-events {
    font-size: 12px;
    max-height: 60px;
    overflow-y: auto;
}

.day-event {
    font-size: 10px;
    padding: 2px 5px;
    border-radius: 3px;
    margin-bottom: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background-color: rgba(75, 108, 183, 0.1);
}

.other-month {
    color: #aaa;
    background-color: #f9f9f9;
}

.today {
    background-color: #e3f2fd;
    border: 2px solid #4b6cb7;
}

.selected {
    background-color: #4b6cb7;
    color: white;
}

.selected .day-number {
    color: white;
}

.today-btn-container {
    text-align: center;
    margin-top: 25px;
}

.today-btn {
    background: linear-gradient(90deg, #4b6cb7 0%, #182848 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s;
}

.today-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(75, 108, 183, 0.3);
}

.today-btn i {
    margin-right: 8px;
}

.events-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.events-header h3 {
    color: #2c3e50;
    font-size: 22px;
}

.events-header h3 i {
    margin-right: 10px;
    color: #4b6cb7;
}

#selected-date-text {
    color: #4b6cb7;
    font-weight: 600;
}

.add-btn {
    background: #4b6cb7;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
}

.add-btn:hover {
    background: #3a5795;
    transform: scale(1.05);
}

.add-btn i {
    margin-right: 5px;
}

.events-list {
    max-height: 550px;
    overflow-y: auto;
}

.event-item {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    border-left: 5px solid;
    transition: all 0.3s;
    position: relative;
}

.event-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.event-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.event-title {
    font-weight: 600;
    font-size: 18px;
    color: #2c3e50;
    flex: 1;
}

.event-actions {
    display: flex;
    gap: 10px;
}

.edit-btn, .delete-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: #7f8c8d;
    transition: all 0.3s;
}

.edit-btn:hover {
    color: #3498db;
}

.delete-btn:hover {
    color: #e74c3c;
}

.event-description {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 10px;
}

.event-date {
    font-size: 12px;
    color: #95a5a6;
    display: flex;
    align-items: center;
}

.event-date i {
    margin-right: 5px;
}

.event-time {
    font-size: 12px;
    color: #7f8c8d;
    margin-top: 5px;
    display: flex;
    align-items: center;
}
.event-time i {
    margin-right: 5px;
}

.no-events {
    text-align: center;
    padding: 60px 20px;
    color: #95a5a6;
    display: none;
}

.no-events i {
    font-size: 60px;
    margin-bottom: 20px;
    color: #bdc3c7;
}

.no-events p {
    font-size: 18px;
}

/* ===== МОДАЛЬНОЕ ОКНО ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    width: 90%;
    max-width: 500px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
    background: linear-gradient(90deg, #4b6cb7 0%, #182848 100%);
    color: white;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 22px;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
}

.modal-body {
    padding: 25px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

.form-group label i {
    margin-right: 8px;
    color: #4b6cb7;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #4b6cb7;
}

/* ===== ПИКЕР ЦВЕТОВ С ПОДСКАЗКАМИ ===== */
.color-picker {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.color-option {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    border: 3px solid transparent;
    position: relative;
}

.color-option:hover {
    transform: scale(1.1);
}

.color-option.selected {
    border-color: #333;
    transform: scale(1.1);
}

/* ===== КАСТОМНЫЕ ПОДСКАЗКИ ДЛЯ ЦВЕТОВ ===== */
.color-option::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-5px);
    
    background-color: #333;
    color: white;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
    
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
    
    z-index: 1000;
    pointer-events: none;
}

.color-option:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-10px);
}

.modal-footer {
    padding: 20px 25px;
    background-color: #f9fafc;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

.btn {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-primary {
    background: #4b6cb7;
    color: white;
}

.btn-primary:hover {
    background: #3a5795;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

/* Стили для кнопок авторизации */
.auth-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.login-btn.yandex-btn {
    background: linear-gradient(90deg, #ff0000 0%, #ffffff 100%);
    color: #000;
}

.login-btn.yandex-btn:hover {
    background: linear-gradient(90deg, #cc0000 0%, #ffffff 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 0, 0, 0.3);
}

.login-btn.google-btn {
    background: linear-gradient(90deg, #4285f4 0%, #34a853 100%);
    color: white;
}

.login-btn.google-btn:hover {
    background: linear-gradient(90deg, #3367d6 0%, #2e8b57 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(66, 133, 244, 0.3);
}

/* Стиль кнопки Войти по паролю */
.login-btn.email-password-btn {
    background: linear-gradient(90deg, #9c27b0 0%, #ffffff 100%);
    color: rgb(0, 0, 0);
}

.login-btn.email-password-btn:hover {
    background: linear-gradient(90deg, #7b1fa2 0%, #ffffff 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(156, 39, 176, 0.3);
}

/* Стили для модального окна объединения */
.merge-info {
    padding: 15px 0;
}

.account-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    margin: 15px 0;
    border-left: 4px solid #4b6cb7;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.account-email {
    font-weight: 600;
    color: #2c3e50;
    font-size: 16px;
}

.account-source {
    background: #4b6cb7;
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.merge-benefits {
    background: #e8f5e9;
    border-radius: 10px;
    padding: 15px;
    margin-top: 20px;
    color: #2e7d32;
    font-size: 14px;
    line-height: 1.6;
}

.merge-benefits i {
    margin-right: 8px;
    color: #4caf50;
}

/* Кнопка объединения в интерфейсе */
.merge-accounts-btn {
    background: linear-gradient(90deg, #9c27b0 0%, #673ab7 100%);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 10px;
}

.merge-accounts-btn:hover {
    background: linear-gradient(90deg, #7b1fa2 0%, #5e35b1 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(156, 39, 176, 0.3);
}

/* Кнопка ПРОФИЛЬ */
.profile-btn {
    display: inline-block;
    background: #8650c1;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 13px;
    margin-left: 10px;
    text-decoration: none;
    text-align: center;
}

.profile-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(75, 108, 183, 0.3);
    background: #782bcf;
}

/* Кнопка СТАТИСТИКИ */

.stats-btn {
    display: inline-block;
    background: #00b894;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 13px;
    margin-left: 10px;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s;
}

.stats-btn:hover {
    background: #00a884;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 184, 148, 0.3);
}

/* ===== СТАТИСТИКА ===== */
.stats-container {
    padding: 30px;
    background: white;
    min-height: 700px;
}

.stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.stats-title {
    display: flex;
    align-items: center;
    gap: 15px;
}

.stats-title h2 {
    color: #2c3e50;
    font-size: 26px;
    margin: 0;
}

.date-range {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #f8f9fa;
    padding: 10px 20px;
    border-radius: 50px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.date-nav-btn {
    background: #4b6cb7;
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.date-nav-btn:hover {
    background: #3a5795;
    transform: scale(1.05);
}

.date-nav-btn:disabled {
    background: #b0c4de;
    cursor: not-allowed;
    transform: none;
}

.date-range-text {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    min-width: 200px;
    text-align: center;
}

.timeline-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    padding: 30px;
    margin-bottom: 30px;
    overflow-x: auto;
}

.days-header {
    display: flex;
    border-bottom: 2px solid #e0e7ff;
    padding-bottom: 15px;
    margin-bottom: 20px;
    min-width: 800px;
}

.day-column-header {
    flex: 1;
    text-align: center;
    font-weight: 600;
    color: #4b6cb7;
    padding: 10px;
}

.day-column-header.today {
    background: #e3f2fd;
    border-radius: 10px;
    color: #182848;
}

.day-name {
    font-size: 14px;
    text-transform: uppercase;
    color: #7f8c8d;
}

.day-number {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
}

.day-month {
    font-size: 12px;
    color: #95a5a6;
}

.timeline-grid {
    display: flex;
    min-width: 800px;
    position: relative;
}

.time-labels {
    width: 60px;
    flex-shrink: 0;
}

.time-label {
    height: 40px;
    font-size: 11px;
    color: #95a5a6;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.days-columns {
    display: flex;
    flex: 1;
}

.day-column {
    flex: 1;
    position: relative;
}

.hour-slot {
    height: 40px;
    border-bottom: 1px solid #f0f0f0;
    border-right: 1px solid #f0f0f0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.event-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.event-dot:hover {
    transform: scale(1.5);
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
}

.event-dot:hover .event-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(-5px);
}

.event-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(0);
    background: #333;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
    pointer-events: none;
}

.event-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}

.stats-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 15px;
    margin-bottom: 30px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #2c3e50;
}

.legend-item i {
    font-size: 14px;
}

.stats-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    color: white;
}

.stat-card:nth-child(2) {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.stat-card:nth-child(3) {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.stat-icon {
    font-size: 40px;
    opacity: 0.8;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
}

@media (max-width: 768px) {
    .stats-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .date-range {
        width: 100%;
        justify-content: center;
    }
    
    .stats-summary {
        grid-template-columns: 1fr;
    }
}

/* ===== ПЕРЕКЛЮЧАТЕЛЬ НЕДЕЛЯ/МЕСЯЦ ===== */
.stats-view-toggle {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    padding: 0 10px;
}

.view-btn {
    background: #f0f0f0;
    border: none;
    padding: 8px 20px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #7f8c8d;
    transition: all 0.3s;
}

.view-btn.active {
    background: #4b6cb7;
    color: white;
}

.view-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

/* ===== АДАПТАЦИЯ ДЛЯ МЕСЯЦА ===== */
.timeline-container {
    overflow-x: auto;
}

.days-columns {
    overflow-x: auto;
}

.day-column {
    min-width: 60px;
}

.stats-summary {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1024px) {
    .stats-summary {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .stats-summary {
        grid-template-columns: 1fr;
    }
}

/* ===== СИНХРОНИЗАЦИЯ ДНЕЙ И КОЛОНОК ===== */
.days-header {
    display: flex !important;
    min-width: 100%;
    margin-bottom: 0;
    border-bottom: 2px solid #e0e7ff;
    padding-bottom: 10px;
}

.days-columns {
    display: flex !important;
    min-width: 100%;
}

.day-column-header,
.day-column {
    flex-shrink: 0;
    box-sizing: border-box;
}

.day-column-header {
    text-align: center;
    padding: 8px 0;
}

.hour-slot {
    width: 100%;
    box-sizing: border-box;
}

/* Для месяца - горизонтальный скролл */
.timeline-container {
    overflow-x: auto;
}

.days-header,
.days-columns {
    overflow-x: visible;
}

/* ===== СТАТИСТИКА - КОЛОНКА ЧАСОВ СЛЕВА ===== */
.timeline-grid {
    display: flex;
    width: 100%;
}

.time-column {
    width: 60px;
    flex-shrink: 0;
    border-right: 2px solid #e0e7ff;
}

.time-column-header {
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #4b6cb7;
    border-bottom: 2px solid #e0e7ff;
}

.time-label {
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
    font-size: 11px;
    color: #95a5a6;
    border-bottom: 1px solid #f0f0f0;
}

.days-section {
    display: flex;
    flex: 1;
    overflow-x: auto;
}

.day-wrapper {
    width: 80px;
    min-width: 80px;
    max-width: 80px;
    flex-shrink: 0;
}

.day-column-header {
    height: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-bottom: 2px solid #e0e7ff;
    background: white;
}

.day-column-header.today {
    background: #e3f2fd;
}

.day-name {
    font-size: 12px;
    color: #7f8c8d;
    text-transform: uppercase;
}

.day-number {
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1.2;
}

.day-month {
    font-size: 10px;
    color: #95a5a6;
}

.day-column {
    width: 100%;
}

.hour-slot {
    height: 40px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.header .stats-view-toggle {
    display: flex;
    gap: 10px;
    margin: 0;
    padding: 0;
}

.header .view-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    padding: 8px 20px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: white;
    transition: all 0.3s;
}

.header .view-btn.active {
    background: white;
    color: #4b6cb7;
}

.header .view-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 1024px) {
    .main-content {
        flex-direction: column;
    }
    
    .calendar-section {
        border-right: none;
        border-bottom: 1px solid #eee;
    }
    
    .day {
        height: 80px;
    }
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    #login-button-container {
        margin-left: 0;
        margin-top: 10px;
    }
    
    .calendar-header h2 {
        font-size: 20px;
    }
    
    .day {
        height: 70px;
        padding: 5px;
    }
    
    .day-number {
        font-size: 12px;
    }
    
    .day-event {
        font-size: 10px;
        padding: 1px 3px;
    }
}

@media (max-width: 480px) {
    .weekdays div {
        padding: 5px;
        font-size: 10px;
    }
    
    .day {
        height: 60px;
    }
    
    .modal-content {
        width: 95%;
    }
    
    .color-picker {
        justify-content: center;
    }
}

/* Мобильная адаптация для строки приветствия и кнопок */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        align-items: stretch;
        padding: 15px;
    }

    .header h1 {
        font-size: 24px;
        margin-bottom: 10px;
        text-align: center;
    }

    /* Стиль для даты на мобильных */
    .current-date {
        font-size: 14px;
        padding: 8px 12px;
        margin: 5px 0;
        text-align: center;
        background: rgba(255, 255, 255, 0.15);
        border-radius: 20px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }

    /* Если дата не помещается - переносим */
    @media (max-width: 480px) {
        .current-date {
            font-size: 13px;
            white-space: normal;
            line-height: 1.4;
            padding: 6px 10px;
        }
    }

    /* Контейнер с кнопками */
    #login-button-container {
        margin-left: 0;
        width: 100%;
    }

    .user-info {
        flex-direction: column;
        align-items: center;
        gap: 10px;
        width: 100%;
    }

    .user-info span {
        font-size: 16px;
        text-align: center;
        width: 100%;
        padding: 5px 0;
        border-bottom: 1px solid rgba(255,255,255,0.2);
    }

    /* Кнопки авторизации вертикально */
    .auth-buttons {
        display: flex;
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }

    /* Стили для всех кнопок входа */
    .login-btn {
        width: 100%;
        justify-content: center;
        margin: 0;
        padding: 12px 20px;
        font-size: 16px;
    }

    /* Кнопка "Войти по паролю" */
    .login-btn.email-password-btn {
        width: 100%;
        margin-bottom: 10px;
    }

    /* Кнопка "Войти через Яндекс" */
    .login-btn.yandex-btn {
        width: 100%;
    }

    /* Кнопка профиля, статистики и выхода */
    .profile-btn,
    .stats-btn,
    .logout-btn {
        width: 100%;
        margin: 5px 0;
        text-align: center;
        justify-content: center;
    }
}

/* Мобильная адаптация */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        align-items: stretch;
        padding: 15px;
    }

    .header h1 {
        font-size: 22px;
        margin-bottom: 8px;
        text-align: center;
    }

    /* Дата остаётся крупной */
    .current-date {
        font-size: 18px;
        padding: 8px 12px;
        margin: 5px 0;
        text-align: center;
        background: rgba(255, 255, 255, 0.15);
        border-radius: 25px;
        font-weight: 500;
    }

    /* Контейнер с кнопками */
    #login-button-container {
        margin-left: 0;
        width: 100%;
    }

    .user-info {
        flex-direction: column;
        align-items: center;
        gap: 8px;
        width: 100%;
    }

    /* ПРИВЕТСТВИЕ УВЕЛИЧЕНО В 1.5 РАЗА */
    .user-info span {
        font-size: 24px;  /* 16px * 1.5 = 24px */
        font-weight: 600;
        text-align: center;
        width: 100%;
        padding: 10px 0;
        border-bottom: 2px solid rgba(255,255,255,0.3);
        margin-bottom: 5px;
        letter-spacing: 0.5px;
    }

    /* Кнопки авторизации */
    .auth-buttons {
        display: flex;
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }

    /* УВЕЛИЧИВАЕМ ВСЕ КНОПКИ В 1.5 РАЗА */
    .login-btn,
    .profile-btn,
    .logout-btn {
        width: 100%;
        justify-content: center;
        margin: 0;
        padding: 12px 16px;
        font-size: 19.5px;  /* 13px * 1.5 = 19.5px */
        font-weight: 600;
        border-radius: 30px;
        letter-spacing: 0.5px;
    }

    .stats-btn {
        display: none;
    }

    /* Кнопка выхода */
    .logout-btn {
        margin-top: 10px;
    }

    /* Для очень маленьких экранов */
    @media (max-width: 480px) {
        .header h1 {
            font-size: 20px;
        }
        
        .current-date {
            font-size: 16px;
            padding: 6px 10px;
        }

        /* Приветствие на маленьких экранах */
        .user-info span {
            font-size: 21px;  /* 14px * 1.5 = 21px */
            padding: 8px 0;
        }

        .login-btn,
        .profile-btn,
        .logout-btn {
            font-size: 18px;  /* 12px * 1.5 = 18px */
            padding: 10px 14px;
        }
    }
}