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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #121212;
    min-height: 100vh;
    padding: 20px;
    color: #e0e0e0;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

header {
    background: #1e1e1e;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #333;
}

.header-title {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

header h1 {
    font-size: 2.2em;
    color: #64b5f6;
    font-weight: 400;
    margin: 0;
}

.header-subtitle {
    font-size: 0.9em;
    color: #999;
    font-weight: 300;
    margin: 0;
    font-style: italic;
}

.header-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.home-btn,
.admin-btn {
    background: #ff6f00;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 0.95em;
    font-weight: 400;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(255, 111, 0, 0.4);
    text-decoration: none;
    display: inline-block;
}

.home-btn:hover,
.admin-btn:hover {
    background: #ff8f00;
    box-shadow: 0 4px 12px rgba(255, 111, 0, 0.6);
    transform: translateY(-1px);
}

.calendar-wrapper {
    background: #1e1e1e;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    border: 1px solid #333;
}

.calendar-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-bottom: 40px;
}

.calendar-controls h2 {
    font-size: 2.2em;
    color: #ff6f00;
    min-width: 120px;
    text-align: center;
    font-weight: 400;
}

.nav-btn {
    background: #ff6f00;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.2em;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(255, 111, 0, 0.4);
}

.nav-btn:hover {
    background: #ff8f00;
    box-shadow: 0 4px 12px rgba(255, 111, 0, 0.6);
    transform: scale(1.05);
}

.months-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.month-card {
    background: #252525;
    border-radius: 8px;
    padding: 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
    border: 1px solid #333;
}

.month-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
    border-color: #444;
    transform: translateY(-2px);
}

.month-title {
    font-size: 1.3em;
    font-weight: 500;
    color: #ff6f00;
    margin-bottom: 12px;
    text-align: center;
    padding-bottom: 8px;
    border-bottom: 2px solid #ff9800;
}

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

.day-header {
    text-align: center;
    font-weight: 500;
    color: #90caf9;
    padding: 6px;
    font-size: 0.85em;
}

.day-cell {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #2d2d2d;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-weight: 400;
    position: relative;
    border: 1px solid #333;
    font-size: 0.9em;
    color: #e0e0e0;
}

.day-cell:hover {
    background: #3d3d3d;
    border-color: #64b5f6;
    color: #64b5f6;
    transform: scale(1.05);
}

.day-cell.empty {
    background: transparent;
    cursor: default;
    border: none;
}

.day-cell.empty:hover {
    transform: none;
    border: none;
}

.day-cell.has-event {
    background: #ff6f00;
    color: #ffffff;
    border-color: #ff9800;
    font-weight: 600;
}

.day-cell.has-event::after {
    content: '●';
    position: absolute;
    bottom: 2px;
    right: 4px;
    font-size: 0.6em;
    color: #ffe0b2;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: #1e1e1e;
    margin: 5% auto;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    animation: slideDown 0.2s ease;
    position: relative;
    max-height: 80vh;
    overflow-y: auto;
    border: 1px solid #333;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    color: #999;
    float: right;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 15px;
    transition: color 0.3s ease;
}

.close:hover {
    color: #f44336;
}

.modal-content h2 {
    color: #64b5f6;
    margin-bottom: 20px;
    font-size: 1.8em;
    font-weight: 400;
}

#eventForm {
    margin-top: 20px;
}

#eventAuthor {
    width: 100%;
    padding: 12px;
    border: 1px solid #444;
    border-radius: 4px;
    font-size: 0.95em;
    font-family: inherit;
    margin-bottom: 12px;
    transition: border-color 0.2s ease;
    background: #252525;
    color: #e0e0e0;
}

#eventAuthor:focus {
    outline: none;
    border-color: #ff6f00;
}

.time-inputs {
    display: flex;
    gap: 15px;
    margin-bottom: 12px;
}

.time-input-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.time-input-group label {
    color: #e0e0e0;
    font-size: 0.9em;
    font-weight: 500;
}

.time-input-group input[type="time"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #444;
    border-radius: 4px;
    font-size: 0.95em;
    font-family: inherit;
    transition: border-color 0.2s ease;
    background: #252525;
    color: #e0e0e0;
}

.time-input-group input[type="time"]:focus {
    outline: none;
    border-color: #ff6f00;
}

#eventText {
    width: 100%;
    padding: 12px;
    border: 1px solid #444;
    border-radius: 4px;
    font-size: 0.95em;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.2s ease;
    background: #252525;
    color: #e0e0e0;
}

#eventText:focus {
    outline: none;
    border-color: #2196f3;
}

.file-label {
    display: block;
    margin: 12px 0;
    padding: 12px;
    background: #ff6f00;
    color: white;
    border-radius: 4px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #ff8f00;
}

.file-label:hover {
    background: #ff8f00;
    border-color: #ffa726;
    transform: translateY(-1px);
}

#eventImage {
    display: none;
}

.submit-btn {
    width: 100%;
    padding: 12px;
    background: #ff6f00;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1em;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 10px;
    box-shadow: 0 2px 8px rgba(255, 111, 0, 0.4);
}

.submit-btn:hover {
    background: #ff8f00;
    box-shadow: 0 4px 12px rgba(255, 111, 0, 0.6);
    transform: translateY(-1px);
}

.existing-event {
    background: #252525;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    border: 1px solid #333;
    border-left: 3px solid #2196f3;
}

.existing-event p {
    margin-bottom: 10px;
    line-height: 1.6;
    color: #e0e0e0;
}

.event-author {
    color: #64b5f6;
    font-size: 0.9em;
    margin-bottom: 8px !important;
    font-weight: 500;
}

.event-time {
    color: #ffa726;
    font-size: 0.9em;
    margin-bottom: 8px !important;
    font-weight: 500;
}

.existing-event img {
    max-width: 100%;
    border-radius: 4px;
    margin-top: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.existing-event img:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.image-modal {
    max-width: 95%;
    max-height: 95vh;
    padding: 20px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow-y: auto;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.image-modal img {
    max-width: 100%;
    width: auto;
    height: auto;
    min-width: 200px;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    display: block;
}

.add-next-event {
    margin-top: 20px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 4px;
    border: 1px dashed #666;
}

.add-next-event:hover {
    background: #2d2d2d;
    border-color: #ff6f00;
}

.add-next-event p {
    color: #999;
    margin: 0;
    font-size: 0.95em;
    font-style: italic;
}

.add-next-event:hover p {
    color: #ff6f00;
}

/* Responsywność */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 20px;
    }

    header h1 {
        font-size: 2em;
    }

    .months-grid {
        grid-template-columns: 1fr;
    }

    .calendar-controls h2 {
        font-size: 2em;
    }
}
