﻿:root {
    --background-color: #f8f9fa;
    --text-color: #000000;
    --button-color: #2A8C7F;
    --button-hover-color: #28675E;
    --border-color: #ccc;
    --warning-background: #ffd09d;
    --warning-border: #ff9018;
}

body {
    font-family: Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
}

.calendar-container {
    max-width: 600px;
    width: 95%;
    margin: 20px auto;
    padding: 20px;
    background-color: #ffffff;
    border-radius: 15px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
}

.calendar-header {
    text-align: center;
    margin-bottom: 30px;
}

.calendar-header h1 {
    color: var(--text-color);
    font-size: 32px;
    margin-bottom: 20px;
    font-weight: 600;
}

.calendar-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 10px;
}

.month-year {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-color);
    min-width: 200px;
    text-align: center;
    flex: 1;
}

.calendar-grid {
    margin-bottom: 2px;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background-color: var(--border-color);
    border-radius: 10px 10px 0 0;
    overflow: hidden;
}

.weekday {
    background-color: var(--button-color);
    color: white;
    padding: 12px 0;
    text-align: center;
    font-weight: 600;
    font-size: 16px;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background-color: var(--border-color);
    border-radius: 0 0 10px 10px;
    overflow: hidden;
}

.day {
    background-color: #ffffff;
    padding: 12px 10px;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    font-size: 16px;
    min-height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.day:hover {
    background-color: #f0f8ff;
    /*transform: scale(1.05);*/
}

.day.other-month {
    color: #ccc;
    background-color: #f9f9f9;
}

.day.selected {
    background-color: var(--button-hover-color);
    color: white;
    font-weight: bold;
}

.day.has-event {
    position: relative;
}

.day.has-event::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background-color: var(--warning-border);
    border-radius: 50%;
}

.nav-button {
    background: linear-gradient(135deg,
            rgba(42, 140, 127, 0.08) 0%,
            rgba(42, 140, 127, 0.15) 100%);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(42, 140, 127, 0.2);
    border-radius: 50%;
    color: var(--button-color);
    width: 50px;
    height: 50px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 6px 20px rgba(42, 140, 127, 0.08),
        0 2px 6px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.nav-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    transition: all 0.4s ease;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.nav-button:hover {
    background: linear-gradient(135deg,
            rgba(42, 140, 127, 0.12) 0%,
            rgba(42, 140, 127, 0.22) 100%);
    border-color: rgba(42, 140, 127, 0.35);
    transform: translateY(-2px) scale(1.05);
    box-shadow:
        0 10px 25px rgba(42, 140, 127, 0.15),
        0 4px 10px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.nav-button:hover::before {
    width: 100px;
    height: 100px;
}

.nav-button:active {
    transform: translateY(0) scale(0.95);
    box-shadow:
        0 3px 10px rgba(42, 140, 127, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.nav-button i {
    font-size: 16px;
    transition: all 0.3s ease;
    z-index: 1;
}

.nav-button:hover i {
    transform: scale(1.1);
    color: var(--button-hover-color);
}

.calendar-container .day.has-event::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    background: linear-gradient(135deg,
            rgba(255, 144, 18, 0.9) 0%,
            rgba(255, 144, 18, 0.7) 100%);
    backdrop-filter: blur(2px);
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow:
        0 2px 8px rgba(255, 144, 18, 0.4),
        0 1px 2px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    z-index: 5;
}

@keyframes modalAppear {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8) rotate(2deg);
    }

    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
    }
}

@media (max-width: 600px) {
    .calendar-container {
        margin: 20px 10px;
        padding: 15px;
        border-radius: 10px;
    }

    .calendar-header h1 {
        font-size: 24px;
        margin-bottom: 15px;
    }

    .calendar-navigation {
        gap: 15px;
        margin-bottom: 15px;
    }

    .month-year {
        font-size: 18px;
        min-width: 150px;
    }

    .calendar-navigation {
        gap: 10px;
        flex-wrap: wrap;
    }

    .month-year {
        font-size: 18px;
        min-width: 120px;
        order: -1;
        width: 100%;
        margin-bottom: 10px;
    }

    .nav-button {
        padding: 10px 12px;
        font-size: 14px;
    }

    .weekday {
        padding: 12px 0;
        font-size: 14px;
    }

    .day {
        padding: 15px 5px;
        min-height: 50px;
        font-size: 14px;
    }
}