body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    margin: 0;
    padding: 20px 10px;
    background-color: #f4f4f9;
    box-sizing: border-box;
}

.calendar-container {
    background-color: #fff;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 900px;
    display: flex;
    flex-direction: column;
}

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

.calendar-header h2 {
    margin: 0;
    font-size: 1.4rem;
    color: #333;
    text-transform: capitalize;
    text-align: center;
}

.calendar-header button {
    background: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background 0.3s;
    flex-shrink: 0;
}

.calendar-header button:hover {
    background: #0056b3;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    margin-bottom: 10px;
}

.calendar-weekdays div {
    font-weight: 600;
    color: #555;
    font-size: 0.9rem;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 15px;
}

.day-cell {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 4px;
    min-height: 70px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow: hidden;
}

.day-number {
    font-size: 0.85rem;
    font-weight: bold;
    color: #444;
    margin-bottom: 4px;
    align-self: flex-end;
}

.current-day {
    background-color: #e8f0fe;
    border: 1px solid #4285f4;
}

.current-day .day-number {
    color: #4285f4;
}

.event-title {
    font-size: 0.7rem;
    color: #fff;
    background-color: #28a745;
    border-radius: 3px;
    padding: 2px 4px;
    margin-top: 2px;
    width: 100%;
    box-sizing: border-box;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: default;
}

.has-event {
    background-color: #f9fff9;
}

/* --- Upravená patička pro obrázkové počítadlo --- */
.footer {
    text-align: center;
    font-size: 0.8rem;
    color: #999;
    border-top: 1px solid #eee;
    padding-top: 15px;
    margin-top: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.footer p {
    margin: 0;
    margin-bottom: 5px;
}

.footer img {
    height: 20px; /* Výška počítadla */
    opacity: 0.9;
}

/* PC verze */
@media (min-width: 768px) {
    body {
        align-items: center;
    }
    
    .calendar-container {
        padding: 30px;
    }

    .calendar-header h2 {
        font-size: 2rem;
    }

    .day-cell {
        min-height: 100px;
        padding: 8px;
    }

    .day-number {
        font-size: 1rem;
    }

    .event-title {
        font-size: 0.85rem;
        padding: 3px 6px;
        margin-top: 3px;
    }
}