/* Base styling */
body {
    font-family: 'Press Start 2P', cursive, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #f8f8f8;
    color: #333;
    line-height: 1.6;
    text-align: center;
}

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

/* Header styling */
header {
    margin-bottom: 30px;
}

h1 {
    color: #444;
    font-size: 2rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 0px rgba(0,0,0,0.1);
}

header p {
    color: #666;
    font-size: 0.7rem;
    max-width: 600px;
    margin: 0 auto 20px auto;
}

/* Grid styling */
.grid-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin: 20px auto;
    max-width: 1000px;
}

/* Month styling */
.month-container {
    margin-bottom: 20px;
}

.month-header {
    margin-bottom: 10px;
    font-size: 1.2rem;
    color: #444;
    text-align: center;
}

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

.weekday-header {
    font-size: 0.6rem;
    padding: 5px;
    text-align: center;
    color: #666;
    background-color: #eee;
}

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

.grid-cell {
    aspect-ratio: 1/1;
    background-color: #dcdcdc;
    cursor: pointer;
    border: 1px solid #ccc;
    transition: all 0.2s ease;
    position: relative;
    min-height: 30px;
}

.grid-cell.empty {
    background-color: #f0f0f0;
    border: 1px dashed #ddd;
    cursor: default;
}

.grid-cell:hover {
    transform: scale(1.05);
    z-index: 2;
    box-shadow: 0 0 5px rgba(0,0,0,0.2);
}

.grid-cell.filled {
    animation: cellActivate 0.3s ease forwards;
}

/* Controls */
.controls {
    margin: 15px 0;
}

.pixel-btn {
    font-family: 'Press Start 2P', cursive, sans-serif;
    background-color: #444;
    color: #fff;
    border: none;
    padding: 10px 15px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 2px;
    box-shadow: 3px 3px 0px rgba(0,0,0,0.2);
}

.pixel-btn:hover {
    transform: translateY(-2px);
    box-shadow: 3px 5px 0px rgba(0,0,0,0.2);
}

.pixel-btn:active {
    transform: translateY(0px);
    box-shadow: 1px 1px 0px rgba(0,0,0,0.2);
}

.pixel-btn-small {
    font-family: inherit;
    font-size: 0.6rem;
    padding: 5px 8px;
    background-color: #444;
    color: #fff;
    border: none;
    cursor: pointer;
    border-radius: 2px;
}

/* Tooltip styling */
.tooltip {
    display: none;
    position: absolute;
    background-color: rgba(50, 50, 50, 0.95);
    color: #fff;
    padding: 10px;
    border-radius: 2px;
    font-size: 0.6rem;
    z-index: 10;
    min-width: 200px;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    border: 2px solid #fff;
    text-align: left;
}

.tooltip-date {
    margin-bottom: 8px;
    font-weight: bold;
}

.tooltip-note {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.tooltip-note input {
    font-family: inherit;
    padding: 5px;
    font-size: 0.6rem;
    background-color: #333;
    border: 1px solid #555;
    color: #fff;
}

/* Animations */
@keyframes cellActivate {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Modal styling */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 100;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #f8f8f8;
    padding: 20px;
    border-radius: 5px;
    width: 80%;
    max-width: 500px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.modal-content h3 {
    font-size: 1rem;
    margin-bottom: 15px;
    color: #444;
}

#event-input {
    width: 100%;
    height: 100px;
    padding: 10px;
    margin-bottom: 15px;
    font-family: inherit;
    font-size: 0.7rem;
    border: 2px solid #ccc;
    resize: none;
}

.modal-buttons {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.modal-buttons button {
    flex: 1;
}

/* Grid cell date label */
.cell-date {
    font-size: 0.4rem;
    color: #777;
    position: absolute;
    top: 2px;
    left: 2px;
    pointer-events: none;
    line-height: 1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .grid-container {
        grid-template-columns: repeat(auto-fit, minmax(20px, 1fr));
        gap: 3px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    header p {
        font-size: 0.6rem;
    }
    
    .tooltip {
        min-width: 180px;
    }
}

@media (max-width: 480px) {
    .grid-container {
        grid-template-columns: repeat(auto-fit, minmax(15px, 1fr));
        gap: 2px;
    }
    
    h1 {
        font-size: 1.2rem;
    }
} 