/* ========== ОСНОВНЫЕ СТИЛИ САЙТА ========== */
main {
            max-width: 1400px;
            margin: 0 auto;
            padding: 20px;
        }
        .calendar-container {
            max-width: 1300px;
            width: 100%;
            background: rgba(255, 255, 255, 0.9);
            border-radius: 2rem;
            box-shadow: 0 25px 45px -12px rgba(0, 0, 0, 0.25);
            padding: 1.5rem;
            margin: 0 auto;
        }
        
        .admin-panel {
            background: white;
            border-radius: 1rem;
            padding: 0.8rem 1.2rem;
            margin-bottom: 1rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 10px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.05);
        }
        .admin-welcome {
            font-weight: 500;
            color: #2c3e50;
            font-size: 14px;
        }
        .admin-badge {
            background: #dd4b60;
            color: white;
            padding: 3px 10px;
            border-radius: 20px;
            font-size: 11px;
            margin-left: 8px;
        }
        .admin-buttons {
            display: flex;
            gap: 10px;
        }
        .admin-btn {
            padding: 6px 18px;
            border-radius: 25px;
            border: none;
            cursor: pointer;
            font-weight: 500;
            transition: 0.2s;
            font-family: 'Montserrat', sans-serif;
        }
        .admin-btn.login {
            background: #2c3e50;
            color: white;
        }
        .admin-btn.logout {
            background: #dd4b60;
            color: white;
        }
        .admin-btn:hover {
            transform: translateY(-2px);
        }
        
        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.5);
            justify-content: center;
            align-items: center;
            z-index: 1000;
        }
        .modal.active {
            display: flex;
        }
        .modal-content {
            background: white;
            padding: 30px;
            border-radius: 25px;
            width: 380px;
            max-width: 90%;
            position: relative;
        }
        .modal-content h3 {
            margin-bottom: 20px;
            text-align: center;
            color: #1f2b3c;
        }
        .modal-content input {
            width: 100%;
            padding: 12px;
            margin-bottom: 15px;
            border: 1px solid #e2e8f0;
            border-radius: 12px;
            font-size: 14px;
        }
        .modal-content button {
            width: 100%;
            padding: 12px;
            background: #2c3e50;
            color: white;
            border: none;
            border-radius: 12px;
            font-weight: 600;
            cursor: pointer;
        }
        .close-modal {
            position: absolute;
            top: 12px;
            right: 18px;
            font-size: 24px;
            cursor: pointer;
            color: #94a3b8;
        }
        .modal-error {
            color: #dd4b60;
            text-align: center;
            margin-bottom: 15px;
            font-size: 13px;
        }
        
        .db-status {
            background: #f0fdf4;
            border-left: 4px solid #22c55e;
            padding: 0.75rem 1rem;
            margin-bottom: 1rem;
            border-radius: 0.75rem;
            font-size: 0.85rem;
            color: #dd4b60;
            font-weight: 500;
        }
        .calendar-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 1rem;
            margin-bottom: 2rem;
            background: white;
            padding: 1rem 1.8rem;
            border-radius: 3rem;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
        }
        .month-year {
            font-size: 1.8rem;
            font-weight: 700;
            background: linear-gradient(135deg, #1f2b3c, #2c3e50);
            background-clip: text;
            -webkit-background-clip: text;
            color: transparent;
        }
        .nav-buttons {
            display: flex;
            gap: 0.75rem;
        }
        .nav-btn {
            background: #f0f2f5;
            border: none;
            font-size: 1rem;
            font-weight: 600;
            padding: 0.5rem 1rem;
            border-radius: 2rem;
            cursor: pointer;
            transition: 0.2s;
            color: #2c3e50;
        }
        .nav-btn:hover {
            background: #e4e9f0;
            transform: translateY(-2px);
        }
        .today-btn {
            background: #2c3e50;
            color: white;
        }
        .calendar-grid {
            background: white;
            border-radius: 1.5rem;
            overflow: hidden;
            margin-bottom: 2rem;
        }
        .weekdays {
            display: grid;
            grid-template-columns: repeat(7, 1fr);
            background: #f8fafd;
            border-bottom: 1px solid #e2e8f0;
        }
        .weekday {
            padding: 1rem 0.5rem;
            text-align: center;
            font-weight: 600;
            color: #1e293b;
        }
        .days-grid {
            display: grid;
            grid-template-columns: repeat(7, 1fr);
        }
        .day-cell {
            min-height: 110px;
            border-right: 1px solid #edf2f7;
            border-bottom: 1px solid #edf2f7;
            padding: 0.5rem;
            cursor: pointer;
            transition: 0.1s;
            background: white;
            vertical-align: top;
        }
        .day-cell:nth-child(7n) {
            border-right: none;
        }
        .day-cell:hover {
            background: #fafbff;
        }
        .day-number {
            font-weight: 600;
            font-size: 1rem;
            color: #1e293b;
            display: inline-block;
            width: 28px;
            height: 28px;
            line-height: 28px;
            text-align: center;
            border-radius: 30px;
            margin-bottom: 0.4rem;
        }
        .today .day-number {
            background: #2c3e50;
            color: white;
        }
        .other-month {
            background-color: #fefef8;
        }
        .other-month .day-number {
            color: #94a3b8;
        }
        .events-list {
            max-height: 65px;
            overflow-y: auto;
            font-size: 0.7rem;
        }
        .event-badge {
            background: #eef2ff;
            color: #dd4b60;
            padding: 0.2rem 0.4rem;
            border-radius: 1rem;
            font-size: 0.7rem;
            cursor: pointer;
            margin-bottom: 0.2rem;
            border-left: 3px solid #dd4b60;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .event-badge:hover {
            background: #e0e7ff;
        }
        .events-panel {
            background: white;
            border-radius: 1.5rem;
            padding: 1.2rem 1.5rem;
        }
        .panel-title {
            font-size: 1.2rem;
            font-weight: 600;
            margin-bottom: 1rem;
            color: #0f172a;
            border-left: 4px solid #dd4b60;
            padding-left: 1rem;
        }
        .add-event-area {
            display: flex;
            flex-wrap: wrap;
            gap: 0.8rem;
            margin-bottom: 1.8rem;
            background: #f9fafc;
            padding: 1rem;
            border-radius: 1.2rem;
        }
        .input-group {
            flex: 1;
            min-width: 140px;
        }
        .input-group label {
            display: block;
            font-size: 0.7rem;
            font-weight: 600;
            color: #334155;
            margin-bottom: 0.2rem;
        }
        .input-group input {
            width: 100%;
            padding: 0.6rem 0.8rem;
            border-radius: 1rem;
            border: 1px solid #e2e8f0;
            font-size: 0.85rem;
        }
        .btn-add {
            background: #2c3e50;
            border: none;
            padding: 0.6rem 1.5rem;
            border-radius: 2rem;
            color: white;
            font-weight: 600;
            cursor: pointer;
            transition: 0.2s;
        }
        .btn-add:hover {
            background: #1e2f3c;
        }
        .selected-date-info {
            font-size: 0.9rem;
            background: #f1f5f9;
            padding: 0.5rem 1rem;
            border-radius: 2rem;
            display: inline-block;
            margin-bottom: 1rem;
        }
        .events-list-panel {
            max-height: 250px;
            overflow-y: auto;
        }
        .event-item {
            background: #f8fafc;
            border-radius: 1rem;
            padding: 0.6rem 1rem;
            margin-bottom: 0.5rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-left: 4px solid #dd4b60;
        }
        .event-info {
            flex: 1;
        }
        .event-title {
            font-weight: 600;
            color: #0f172a;
        }
        .event-place {
            font-size: 0.7rem;
            color: #475569;
            margin-top: 0.2rem;
        }
        .delete-event {
            background: none;
            border: none;
            cursor: pointer;
            color: #94a3b8;
            font-size: 1.2rem;
            padding: 0.3rem 0.6rem;
            border-radius: 1rem;
        }
        .delete-event:hover:not(:disabled) {
            background: #fee2e2;
            color: #dc2626;
        }
        .delete-event:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }
        .empty-events {
            color: #94a3b8;
            text-align: center;
            padding: 1rem;
        }
        
        /* ========== СТИЛИ ДЛЯ ФУТЕРА ========== */
        .main-footer {
            background: #dd4c60;
            color: white;
            margin-top: 60px;
            padding: 40px 20px 20px;
            border-radius: 30px 30px 0 0;
        }
        .footer-content {
            max-width: 1400px;
            margin: 0 auto;
        }
        .footer-nav {
            display: flex;
            justify-content: center;
            flex-wrap: wrap;
            gap: 15px;
            margin-bottom: 30px;
        }
        .footer-nav .btn-new {
            background: rgba(255,255,255,0.1);
            color: white;
            padding: 12px 25px;
        }
        .footer-nav .btn-new:hover {
            background: #dd4b60;
            box-shadow: 0 0 0 2px white, 0 0 0 4px #dd4b60;
        }
        .social-section {
            text-align: center;
            margin-bottom: 30px;
        }
        .social-title {
            font-size: 18px;
            margin-bottom: 20px;
            font-weight: 500;
        }
        .social-links {
            display: flex;
            justify-content: center;
            gap: 30px;
            flex-wrap: wrap;
        }
        .social-link {
            display: flex;
            align-items: center;
            gap: 10px;
            background: rgba(255,255,255,0.1);
            padding: 12px 25px;
            border-radius: 50px;
            text-decoration: none;
            color: white;
            transition: 0.2s;
            font-weight: 500;
        }
        .social-link:hover {
            background: #dd4b60;
            transform: translateY(-3px);
        }
        .social-link.vk:hover {
            background: #dd4b60;
        }
        .social-link.tg:hover {
            background: #dd4b60;
        }
        .copyright {
            text-align: center;
            padding-top: 25px;
            border-top: 1px solid rgba(255,255,255,0.1);
            font-size: 14px;
            color: #ffffff;
        }
        
        footer {
            text-align: center;
            font-size: 0.7rem;
            margin-top: 1.5rem;
            color: #5c6f87;
        }
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(145deg, #f0f4fa 0%, #e6edf4 100%);
    background-attachment: fixed;
    font-family: 'Montserrat', 'Segoe UI', 'Inter', system-ui, Courier, monospace;
    min-height: 100vh;
                margin: 0;
            padding: 0;
}

/* Логотип */
.logo {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.logo img {
    max-width: 100%;
    height: auto;
}

/* Блок кнопок навигации */
.buutonbloc {
    display: flex;
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    padding: 10px;
    font-family: 'Montserrat', Courier, monospace;
    font-size: 30pt;
    gap: 10px;
}

.btn-new {
    border-radius: 10px;
    color: white;
    transition: .2s linear;
    background: #dd4c60;
    padding: 20px 30px;
    font-size: 16px;
    cursor: pointer;
    margin: 10px;
    display: inline-block;
    text-decoration: none;
    font-weight: 600;
}

.btn-new:hover {
    box-shadow: 0 0 0 2px white, 0 0 0 4px #dd4c60;
    transform: translateY(-2px);
}

/* Заголовки секций */
.title {
    font-size: 36px;
    text-align: center;
    margin: 50px 0 30px;
    color: #dd4c60;
    border-bottom: 3px solid #dd4c60;
    display: inline-block;
    width: auto;
    padding-bottom: 10px;
}

/* Блоки с карточками */
.blok {
    display: flex;
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    font-size: 12pt;
    margin-bottom: 40px;
}

.person {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: 12pt;
    padding: 20px;
    text-align: center;
    background: white;
    border-radius: 20px;
    width: 280px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    transition: 0.3s;
}

.person:hover {
    transform: translateY(-5px);
}

.person img {
    width: 100%;
    border-radius: 15px;
    margin-bottom: 15px;
}

.titleperson {
    font-size: 18px;
    font-weight: 600;
    margin: 10px 0;
    color: #3c1f1f;
}

.person a {
    display: inline-block;
    margin: 5px;
    padding: 8px 15px;
    background: #eef2ff;
    color: #af1e1e;
    border-radius: 25px;
    font-size: 14px;
    text-decoration: none;
    transition: 0.2s;
}

.person a:hover {
    background: #dd4c60;
    color: white;
}

.person p {
    font-size: 12px;
    margin: 10px 0;
    color: #694747;
}

/* Карта */
.map {
    display: flex;
    justify-content: center;
    margin: 40px 0;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

/* ========== СТИЛИ КАЛЕНДАРЯ ========== */
.calendar-container {
    max-width: 1300px;
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 2rem;
    box-shadow: 0 25px 45px -12px rgba(0, 0, 0, 0.25);
    padding: 1.5rem;
    margin: 0 auto;
}

.db-status {
    background: #f0fdf4;
    border-left: 4px solid #22c55e;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border-radius: 0.75rem;
    font-size: 0.85rem;
    color: #166534;
    font-weight: 500;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
    background: white;
    padding: 1rem 1.8rem;
    border-radius: 3rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.month-year {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #3c1f1f, #502c2c);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

.nav-buttons {
    display: flex;
    gap: 0.75rem;
}

.nav-btn {
    background: #f0f2f5;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    cursor: pointer;
    transition: 0.2s;
    color: #502c2c;
}

.nav-btn:hover {
    background: #e4e9f0;
    transform: translateY(-2px);
}

.today-btn {
    background: #502c2c;
    color: white;
}

.today-btn:hover {
    background: #3c1e1e;
}

.calendar-grid {
    background: white;
    border-radius: 1.5rem;
    overflow: hidden;
    margin-bottom: 2rem;
}

.weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #f8fafd;
    border-bottom: 1px solid #e2e8f0;
}

.weekday {
    padding: 1rem 0.5rem;
    text-align: center;
    font-weight: 600;
    color: #3b1e1e;
}

.days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.day-cell {
    min-height: 110px;
    border-right: 1px solid #edf2f7;
    border-bottom: 1px solid #edf2f7;
    padding: 0.5rem;
    cursor: pointer;
    transition: 0.1s;
    background: white;
    vertical-align: top;
}

.day-cell:nth-child(7n) {
    border-right: none;
}

.day-cell:hover {
    background: #fafbff;
}

.day-number {
    font-weight: 600;
    font-size: 1rem;
    color: #3b1e1e;
    display: inline-block;
    width: 28px;
    height: 28px;
    line-height: 28px;
    text-align: center;
    border-radius: 30px;
    margin-bottom: 0.4rem;
}

.today .day-number {
    background: #502c2c;
    color: white;
}

.other-month {
    background-color: #fefef8;
}

.other-month .day-number {
    color: #b89494;
}

.events-list {
    max-height: 65px;
    overflow-y: auto;
    font-size: 0.7rem;
}

.event-badge {
    background: #ffeeee;
    color: #af1e1e;
    padding: 0.2rem 0.4rem;
    border-radius: 1rem;
    font-size: 0.7rem;
    cursor: pointer;
    margin-bottom: 0.2rem;
    border-left: 3px solid #dd4b60;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.event-badge:hover {
    background: #ffe0e0;
}

.events-panel {
    background: white;
    border-radius: 1.5rem;
    padding: 1.2rem 1.5rem;
}

.panel-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #2a0f0f;
    border-left: 4px solid #dd4b60;
    padding-left: 1rem;
}

.add-event-area {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 1.8rem;
    background: #f9fafc;
    padding: 1rem;
    border-radius: 1.2rem;
}

.input-group {
    flex: 1;
    min-width: 140px;
}

.input-group label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    color: #553333;
    margin-bottom: 0.2rem;
}

.input-group input {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border-radius: 1rem;
    border: 1px solid #f0e2e2;
    font-size: 0.85rem;
}

.input-group input:focus {
    outline: none;
    border-color: #dd4b60;
}

.btn-add {
    background: #502c2c;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 2rem;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

.btn-add:hover {
    background: #3c1e1e;
    transform: scale(1.02);
}

.selected-date-info {
    font-size: 0.9rem;
    background: #f9f1f1;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    display: inline-block;
    margin-bottom: 1rem;
}

.events-list-panel {
    max-height: 250px;
    overflow-y: auto;
}

.event-item {
    background: #fcf8f8;
    border-radius: 1rem;
    padding: 0.6rem 1rem;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 4px solid #dd4b60;
}

.event-info {
    flex: 1;
}

.event-title {
    font-weight: 600;
    color: #2a0f0f;
}

.event-place {
    font-size: 0.7rem;
    color: #694747;
    margin-top: 0.2rem;
}

.delete-event {
    background: none;
    border: none;
    cursor: pointer;
    color: #b89494;
    font-size: 1.2rem;
    padding: 0.3rem 0.6rem;
    border-radius: 1rem;
    transition: 0.2s;
}

.delete-event:hover {
    background: #fee2e2;
    color: #dd4b60;
}

.empty-events {
    color: #b89494;
    text-align: center;
    padding: 1rem;
}

footer {
    text-align: center;
    font-size: 0.7rem;
    margin-top: 1.5rem;
    color: #875c5c;
}

/* ========== АДАПТИВНОСТЬ ========== */
@media (max-width: 780px) {
    .calendar-container {
        padding: 1rem;
    }
    
    .day-cell {
        min-height: 85px;
    }
    
    .add-event-area {
        flex-direction: column;
    }
    
    .btn-add {
        width: 100%;
    }
    
    .buutonbloc {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-new {
        width: 80%;
        text-align: center;
    }
    
    .blok {
        flex-direction: column;
        align-items: center;
    }
    
    .title {
        font-size: 28px;
        display: block;
        text-align: center;
    }
            .calendar-container { padding: 1rem; }
            .day-cell { min-height: 85px; }
            .add-event-area { flex-direction: column; }
            .btn-add { width: 100%; }
            .admin-panel { flex-direction: column; text-align: center; }
            .footer-nav .btn-new { padding: 8px 16px; font-size: 12px; }
            .social-link { padding: 8px 18px; font-size: 14px; }
        }
