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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #333;
    overflow: hidden;
    position: relative;
}

.background-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    opacity: 0.8;
}

.container {
    width: 100%;
    max-width: 100%;
    padding: 20px;
    text-align: center;
    position: relative;
    z-index: 1;
}

h1, h2 {
    color: #4a4a4a;
    margin-bottom: 15px;
    font-weight: 300;
    letter-spacing: 1px;
}

h1 {
    color: #ffffff;
}

.birthday-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-bottom: 60px;
}

.date-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}

.date-inputs input {
    padding: 12px;
    font-size: 16px;
    border: 1px solid #b0b0b0;
    border-radius: 4px;
    background: #fff;
    color: #333;
    width: 80px;
    text-align: center;
    transition: border-color 0.2s;
}

.date-inputs input:focus {
    outline: none;
    border-color: #6b6b6b;
}

button[type="submit"] {
    padding: 15px 40px;
    font-size: 16px;
    background: cadetblue;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s;
    font-weight: 500;
}

button[type="submit"]:hover {
    background: #5f9ea0;
}

button[type="submit"]:active {
    background: #4a8a8c;
}


.grid-container {
    display: grid;
    gap: 5px;
    margin: 10px auto;
    justify-content: center;
    max-width: 100%;
    overflow: visible;
}

.month-cell {
    border-radius: 2px;
    transition: opacity 0.2s;
    width: 100%;
    height: 100%;
}

.month-lived {
    background: cadetblue;
}

.month-remaining {
    background: #e8e8e8;
}

.month-anniversary {
    position: relative;
}

.month-anniversary.month-lived {
    background: #2f6f6f !important; /* более темный cadetblue */
}

.month-anniversary.month-remaining {
    background: #c0c0c0 !important; /* более темный #e8e8e8 */
}

.anniversary-tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    pointer-events: none;
    transform: translate(-50%, -100%);
    margin-top: -5px;
    left: 50%;
    top: 0;
}

.title-link {
    color: #4a4a4a;
    text-decoration: underline;
    text-underline-offset: 4px;
    transition: color 0.3s;
}

.title-link:hover {
    color: #6b6b6b;
}

@media (min-width: 769px) {
    .container {
        padding: 0;
        margin: 5% 10% 10% 10%;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 20px 15px 80px 15px;
    }
    
    h1, h2 {
        font-size: 24px;
        margin-bottom: 20px;
    }
    
    #birthday {
        min-width: 200px;
        padding: 12px 15px;
    }
    
    button[type="submit"] {
        padding: 12px 30px;
    }
}

