/* ===========================
   SHARED STYLES FOR ALL PAGES
   =========================== */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Helvetica', 'Arial', sans-serif;
}

html, body {
    width: 100%;
    height: 100%;
}

body {
    color: #ffffff;
    background: #2f2f2f;
    min-height: 100vh;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Headers */
h1 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 2.5em;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

h3 {
    margin-bottom: 15px;
}

/* Navigation */
.nav-buttons {
    text-align: center;
    margin-bottom: 30px;
}

.nav-buttons a, 
.nav-buttons button {
    display: inline-block;
    padding: 10px 20px;
    margin: 0 10px;
    background: rgba(255,255,255,0.2);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1em;
}

.nav-buttons a:hover, 
.nav-buttons button:hover {
    background: rgba(255,255,255,0.3);
}

/* Buttons */
.btn {
    padding: 12px 30px;
    font-size: 1.1em;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-save {
    background: #4caf50;
    color: white;
}

.btn-save:hover {
    background: #45a049;
}

.btn-clear {
    background: #f44336;
    color: white;
}

.btn-clear:hover {
    background: #da190b;
}

/* Messages */
.message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 5px;
    display: none;
    z-index: 1000;
}

.message.success {
    background: #4caf50;
    color: white;
}

.message.error {
    background: #f44336;
    color: white;
}

.message.show {
    display: block;
    animation: slideIn 0.3s ease;
}

/* Calendar Styles */
.calendar-grid {
    background: rgba(255,255,255,0.95);
    padding: 20px;
    border-radius: 10px;
    color: #333;
}

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

.calendar-nav {
    background: #667eea;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
}

.calendar-nav:hover {
    background: #764ba2;
}

.weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin-bottom: 10px;
}

.weekday {
    text-align: center;
    font-weight: bold;
    padding: 5px;
    color: #666;
}

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

.day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 5px;
    position: relative;
}

.day:hover:not(.other-month) {
    background: #f0f0f0;
    transform: scale(1.05);
}

.day.weekend {
    background: #f5f5f5;
}

.day.holiday {
    background: #ffdfdf;
    border-color: #fff2f2;
    font-weight: bold;
}

.day.holiday:hover {
    background: #f4d2d2;
    border-color: #f7d6d6;
}

.day.selected {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.day.other-month {
    color: #ccc;
    cursor: default;
}

/* Date Tags */
.date-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    max-height: 200px;
    overflow-y: auto;
    padding: 10px;
    background: rgba(255,255,255,0.1);
    border-radius: 5px;
}

.date-tag {
    background: rgba(255,255,255,0.2);
    padding: 8px 12px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.date-tag button {
    background: rgba(255,255,255,0.3);
    border: none;
    color: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.date-tag button:hover {
    background: rgba(255,255,255,0.5);
}

/* Loading State */
.loading {
    text-align: center;
    padding: 50px;
    font-size: 1.2em;
    color: #fff;
}

/* Sections */
.main-section,
.edit-section {
    background: rgba(255,255,255,0.1);
    padding: 30px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.edit-section {
    display: none;
}

.edit-section.active {
    display: block;
}

/* Month Picker */
.month-picker input {
    width: 100%;
    padding: 10px;
    font-size: 1.1em;
    border: none;
    border-radius: 5px;
    background: rgba(255,255,255,0.9);
    color: #333;
}

/* Animations */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    h1 {
        font-size: 1.8em;
    }
    
    .nav-buttons a,
    .nav-buttons button {
        padding: 8px 12px;
        margin: 5px;
        font-size: 0.9em;
    }
}