@import url('https://fonts.googleapis.com/css2?family=Varela+Round&display=swap');

:root {
    --bg-color: #fcfeff;
    --text-color: #5e5345;
    --card-bg: rgba(255, 255, 255, 0.9);
    --border-radius: 30px;
    --font-family: 'Varela Round', sans-serif;
    --shadow: 0 8px 20px rgba(139, 127, 107, 0.15);
}

/* Base Styles */
body {
    font-family: var(--font-family);
    margin: 0;
    padding: 20px;
    color: var(--text-color);
    background-color: var(--bg-color);
    min-height: 100vh;
    box-sizing: border-box;
    /* Default fallback pattern */
    background-image:
        radial-gradient(#e6e2d6 15%, transparent 16%),
        radial-gradient(#e6e2d6 15%, transparent 16%);
    background-size: 60px 60px;
    background-position: 0 0, 30px 30px;
    transition: background 0.5s ease;
}

/* Layout */
.container {
    max-width: 1100px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 40px;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border: 4px solid white;
}

h1 {
    margin: 0;
    font-size: 3em;
    color: #5e5345;
    text-shadow: 3px 3px 0px rgba(255, 255, 255, 0.5);
}

nav {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

nav a {
    text-decoration: none;
    color: #5e5345;
    background-color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9em;
    box-shadow: 0 4px 0 #e0d8c8;
    transition: transform 0.1s, box-shadow 0.1s;
}

nav a:active {
    transform: translateY(4px);
    box-shadow: 0 0 0 #e0d8c8;
}

/* Cards */
.card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
    border: 4px solid white;
}

.card h2 {
    color: #6fb0c4;
    border-bottom: 3px dashed #e0d8c8;
    padding-bottom: 15px;
    margin-top: 0;
    font-size: 1.8em;
}

/* Home Grid */
.home-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
}

/* Lists */
.event-list {
    list-style: none;
    padding: 0;
}

.event-list li {
    background-color: #fff;
    margin-bottom: 12px;
    padding: 15px 20px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
    font-size: 1.1em;
}

.event-icon {
    font-size: 1.4em;
}

/* Calendar Month View */
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.month-nav-btn {
    background-color: #78c8a1;
    color: white;
    text-decoration: none;
    padding: 12px 25px;
    border-radius: 25px;
    font-weight: bold;
    box-shadow: 0 4px 0 #5aa382;
    transition: transform 0.1s;
}

.month-nav-btn:active {
    transform: translateY(4px);
    box-shadow: none;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 15px;
}

.day-header {
    text-align: center;
    font-weight: bold;
    color: #928b80;
    padding-bottom: 10px;
    text-transform: uppercase;
    font-size: 0.9em;
    letter-spacing: 1px;
}

.day-cell {
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    min-height: 120px;
    padding: 10px;
    position: relative;
    transition: transform 0.2s;
    border: 2px solid white;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.05);
}

.day-cell:hover {
    transform: scale(1.02);
    z-index: 2;
}

.day-number {
    font-weight: bold;
    color: #79bfd3;
    font-size: 1.2em;
    margin-bottom: 8px;
    display: inline-block;
    background: #fff;
    padding: 2px 8px;
    border-radius: 10px;
}

.day-event,
.day-birthday {
    font-size: 0.85em;
    padding: 4px 8px;
    border-radius: 10px;
    margin-bottom: 4px;
    display: block;
    line-height: 1.2;
    color: #5e5345;
}

.day-event {
    background-color: #fef5c5;
    /* Default Event Yellow */
    border: 1px solid #f0e6b0;
}

.day-birthday {
    background-color: #ffe0eb;
    /* Default Birthday Pink */
    border: 1px solid #f2cfdb;
}

.empty-cell {
    background: transparent;
    border: none;
    box-shadow: none;
}

/* --- MONTHLY THEMES --- */

/* JANUARY: Snow & Ice */
.month-january {
    background-color: #e3f2fd;
    background-image: url('assets/january.png');
    background-size: 300px;
    background-repeat: repeat;
}

.month-january header h1,
.month-january .card h2 {
    color: #5dade2;
}

.month-january .day-number {
    color: #5dade2;
}

.month-january .month-nav-btn {
    background-color: #aed6f1;
    box-shadow: 0 4px 0 #85c1e9;
}

/* FEBRUARY: Love & Cold */
.month-february {
    background-color: #fce4ec;
    background-image: url('assets/february.png');
    background-size: 300px;
    background-repeat: repeat;
}

.month-february header h1,
.month-february .card h2 {
    color: #ec407a;
}

.month-february .day-number {
    color: #ec407a;
}

.month-february .month-nav-btn {
    background-color: #f48fb1;
    box-shadow: 0 4px 0 #c2185b;
}

/* MARCH: Clover & Spring */
.month-march {
    background-color: #e8f5e9;
    background-image: url('assets/march.png');
    background-size: 300px;
    background-repeat: repeat;
}

.month-march header h1,
.month-march .card h2 {
    color: #43a047;
}

.month-march .day-number {
    color: #66bb6a;
}

.month-march .month-nav-btn {
    background-color: #81c784;
    box-shadow: 0 4px 0 #388e3c;
}

/* APRIL: Cherry Blossom */
.month-april {
    background-color: #fff0f5;
    background-image: url('assets/april.png');
    background-size: 300px;
    background-repeat: repeat;
}

.month-april header h1,
.month-april .card h2 {
    color: #ff69b4;
}

.month-april .day-number {
    color: #ff69b4;
}

.month-april .month-nav-btn {
    background-color: #ff80ab;
    box-shadow: 0 4px 0 #c51162;
}

/* MAY: Fresh Green */
.month-may {
    background-color: #f1f8e9;
    background-image: url('assets/may.png');
    background-size: 300px;
    background-repeat: repeat;
}

.month-may header h1,
.month-may .card h2 {
    color: #7cb342;
}

.month-may .day-number {
    color: #8bc34a;
}

.month-may .month-nav-btn {
    background-color: #aed581;
    box-shadow: 0 4px 0 #558b2f;
}

/* JUNE: Hydrangea Blue */
.month-june {
    background-color: #e1f5fe;
    background-image: url('assets/june.png');
    background-size: 300px;
    background-repeat: repeat;
}

.month-june header h1,
.month-june .card h2 {
    color: #0288d1;
}

.month-june .day-number {
    color: #039be5;
}

.month-june .month-nav-btn {
    background-color: #29b6f6;
    box-shadow: 0 4px 0 #01579b;
}

/* JULY: Summer Sun */
.month-july {
    background-color: #fffde7;
    background-image: url('assets/july.png');
    background-size: 300px;
    background-repeat: repeat;
}

.month-july header h1,
.month-july .card h2 {
    color: #fbc02d;
}

.month-july .day-number {
    color: #fdd835;
}

.month-july .month-nav-btn {
    background-color: #ffee58;
    box-shadow: 0 4px 0 #f57f17;
}

/* AUGUST: Fireworks & Night */
.month-august {
    background-color: #e8eaf6;
    background-image: url('assets/august.png');
    background-size: 300px;
    background-repeat: repeat;
}

.month-august header h1,
.month-august .card h2 {
    color: #3949ab;
}

.month-august .day-number {
    color: #5c6bc0;
}

.month-august .month-nav-btn {
    background-color: #7986cb;
    box-shadow: 0 4px 0 #283593;
}

/* SEPTEMBER: Autumn Grass */
.month-september {
    background-color: #fff8e1;
    background-image: url('assets/september.png');
    background-size: 300px;
    background-repeat: repeat;
}

.month-september header h1,
.month-september .card h2 {
    color: #fb8c00;
}

.month-september .day-number {
    color: #ff9800;
}

.month-september .month-nav-btn {
    background-color: #ffb74d;
    box-shadow: 0 4px 0 #e65100;
}

/* OCTOBER: Spooky */
.month-october {
    background-color: #f3e5f5;
    background-image: url('assets/october.png');
    background-size: 300px;
    background-repeat: repeat;
}

.month-october header h1,
.month-october .card h2 {
    color: #8e24aa;
}

.month-october .day-number {
    color: #ab47bc;
}

.month-october .month-nav-btn {
    background-color: #ba68c8;
    box-shadow: 0 4px 0 #6a1b9a;
}

/* NOVEMBER: Mushroom */
.month-november {
    background-color: #efebe9;
    background-image: url('assets/november.png');
    background-size: 300px;
    background-repeat: repeat;
}

.month-november header h1,
.month-november .card h2 {
    color: #8d6e63;
}

.month-november .day-number {
    color: #a1887f;
}

.month-november .month-nav-btn {
    background-color: #bcaaa4;
    box-shadow: 0 4px 0 #5d4037;
}

/* DECEMBER: Toy Day */
.month-december {
    background-color: #ffebee;
    background-image: url('assets/december.png');
    background-size: 300px;
    background-repeat: repeat;
}

.month-december header h1,
.month-december .card h2 {
    color: #d32f2f;
}

.month-december .day-number {
    color: #ef5350;
}

.month-december .month-nav-btn {
    background-color: #ef9a9a;
    box-shadow: 0 4px 0 #b71c1c;
}

/* --- MODAL STYLES --- */
.modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.modal-content {
    background-color: #fdfbf7;
    margin: 10% auto;
    padding: 30px;
    border: 5px solid #fff;
    border-radius: 30px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    position: relative;
    /* ACNH Pattern for Modal Bg */
    background-image: radial-gradient(#efefef 15%, transparent 16%);
    background-size: 20px 20px;
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.close-btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 20px;
}

.close-btn:hover {
    color: #5e5345;
}

.clickable-event,
.clickable-villager {
    cursor: pointer;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-decoration-color: #aaa;
    transition: color 0.2s;
}

.clickable-event:hover,
.clickable-villager:hover {
    color: #4a90e2;
    background-color: rgba(255, 255, 255, 0.8);
}

/* Modal Content Styles */
.villager-profile {
    text-align: center;
}

.villager-img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    background-color: white;
    border-radius: 50%;
    padding: 10px;
    border: 3px solid #e0d8c8;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.villager-info h2 {
    color: #55a630;
    margin-bottom: 5px;
    font-size: 1.8em;
}

.villager-info p {
    margin: 5px 0;
    font-size: 1.1em;
}

.villager-colors {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.event-profile {
    text-align: center;
}

.event-profile h2 {
    color: #e59500;
}