@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@700&display=swap');

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

body {
    background: #fff;
    font-family: 'Georgia', serif;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
    overflow: hidden;
    border: 3px solid #ecb736;
}

/* --- HEADER & CONTROLS --- */
.header {
    background: linear-gradient(135deg, #ecb736 0%, #f4e4bc 100%);
    color: #2c2c2c;
    padding: 25px 30px 15px 30px;
    text-align: center;
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 8px;
    font-family: 'Nunito', sans-serif;
}

.header .month {
    font-size: 1.5em;
    margin-bottom: 5px;
    font-family: 'Nunito', sans-serif;
}

.controls-top {
    text-align: center;
    padding: 15px 20px;
    background: linear-gradient(135deg, #ecb736 0%, #f4e4bc 100%);
    border-bottom: 3px solid #c9a961;
}

.btn {
    background: #ffffff;
    color: #2c2c2c;
    border: 1px solid #adadad;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    margin: 5px;
    transition: all 0.3s ease;
    font-family: 'Georgia', serif;
    white-space: nowrap;
}

.btn:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background: #ffffff;
    color: #2c2c2c;
}

.btn-primary:hover {
    background: #f0f0f0;
}


/* --- MAIN LAYOUT --- */
.main-content {
    display: flex;
    gap: 20px;
    padding: 20px;
}

.activities-bank {
    flex: 0 0 350px;
    background: #faf8f3;
    border-radius: 10px;
    padding: 20px;
    border: 2px solid #e8dcc6;
    max-height: 80vh;
    overflow-y: auto;
}

.calendar-area {
    flex: 1;
    background: #fff;
    border-radius: 10px;
    padding: 20px;
}

.section-title {
    font-size: 1.3em;
    margin-bottom: 15px;
    color: #2c2c2c;
    border-bottom: 3px solid #ecb736;
    padding-bottom: 5px;
    font-family: 'Georgia', serif;
}


/* --- THEME COLOR CODING --- */
.activity-item.theme-Crafty-Constructors, .day-activity.theme-Crafty-Constructors, .activity-item.theme-Drawtastic-Doodler, .day-activity.theme-Drawtastic-Doodler, .activity-item.theme-Winter-Wanderer, .day-activity.theme-Winter-Wanderer, .activity-item.theme-Paper-Play, .day-activity.theme-Paper-Play { border-left: 5px solid #2497d6; }
.activity-item.theme-Color-Kaleidoscope, .day-activity.theme-Color-Kaleidoscope, .activity-item.theme-Thankful-Creations, .day-activity.theme-Thankful-Creations, .activity-item.theme-Merry-Maker, .day-activity.theme-Merry-Maker, .activity-item.theme-Messy-Fun, .day-activity.theme-Messy-Fun { border-left: 5px solid #b0ccb2; }
.activity-item.theme-Autumn-Art, .day-activity.theme-Autumn-Art, .activity-item.theme-Wacky-Wizard, .day-activity.theme-Wacky-Wizard, .activity-item.theme-Holiday-Crafter, .day-activity.theme-Holiday-Crafter, .activity-item.theme-Engineering-Challenges, .day-activity.theme-Engineering-Challenges { border-left: 5px solid #fd6f9d; }
.activity-item.theme-Halloween-Crafts, .day-activity.theme-Halloween-Crafts, .activity-item.theme-Texture-Explorer, .day-activity.theme-Texture-Explorer, .activity-item.theme-Cosmic-Explorer, .day-activity.theme-Cosmic-Explorer, .activity-item.theme-Autumn-Adventures, .day-activity.theme-Autumn-Adventures { border-left: 5px solid #ba986e; }

/* --- THEME COLOR CODING --- */
.activity-item.theme-Crafty-Constructors, .day-activity.theme-Crafty-Constructors, .activity-item.theme-Drawtastic-Doodler, .day-activity.theme-Drawtastic-Doodler, .activity-item.theme-Winter-Wanderer, .day-activity.theme-Winter-Wanderer, .activity-item.theme-Paper-Play, .day-activity.theme-Paper-Play { border-left: 5px solid #2497d6; }
.activity-item.theme-Color-Kaleidoscope, .day-activity.theme-Color-Kaleidoscope, .activity-item.theme-Thankful-Creations, .day-activity.theme-Thankful-Creations, .activity-item.theme-Merry-Maker, .day-activity.theme-Merry-Maker, .activity-item.theme-Messy-Fun, .day-activity.theme-Messy-Fun { border-left: 5px solid #b0ccb2; }
.activity-item.theme-Autumn-Art, .day-activity.theme-Autumn-Art, .activity-item.theme-Wacky-Wizard, .day-activity.theme-Wacky-Wizard, .activity-item.theme-Holiday-Crafter, .day-activity.theme-Holiday-Crafter, .activity-item.theme-Engineering-Challenges, .day-activity.theme-Engineering-Challenges { border-left: 5px solid #fd6f9d; }
.activity-item.theme-Halloween-Crafts, .day-activity.theme-Halloween-Crafts, .activity-item.theme-Texture-Explorer, .day-activity.theme-Texture-Explorer, .activity-item.theme-Cosmic-Explorer, .day-activity.theme-Cosmic-Explorer, .activity-item.theme-Autumn-Adventures, .day-activity.theme-Autumn-Adventures { border-left: 5px solid #ba986e; }

/* --- JANUARY THEME COLOR CODING --- */
/* Colorful Creations: Bright Pink */
.activity-item.theme-Colorful-Creations, .day-activity.theme-Colorful-Creations { border-left: 5px solid #e3439b; }
/* Creative Construction: Deep Teal */
.activity-item.theme-Creative-Construction, .day-activity.theme-Creative-Construction { border-left: 5px solid #00796B; }
/* Paper and Pattern Play: Lavender/Purple */
.activity-item.theme-Paper-and-Pattern-Play, .day-activity.theme-Paper-and-Pattern-Play { border-left: 5px solid #9966cc; }
/* Winter Exploration: Sky Blue */
.activity-item.theme-Winter-Exploration, .day-activity.theme-Winter-Exploration { border-left: 5px solid #5d9cec; }
/* --- ACTIVITY ITEM --- */
.activity-item {
    background: #faf1dc;
    margin: 8px 0;
    padding: 12px;
    border-radius: 8px;
    cursor: grab;
    transition: all 0.3s ease;
    box-shadow: 0 3px 5px rgba(0,0,0,0.1);
    border: 1px solid #ddd;
    position: relative;
    padding-left: 17px;
}
.activity-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(0,0,0,0.15);
}
.activity-item.dragging {
    opacity: 0.7;
    transform: rotate(3deg);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}
.activity-title {
    font-weight: 700;
    color: #333;
    margin-bottom: 3px;
    font-size: 1em;
}
.activity-description {
    font-size: 0.8em;
    color: #666;
    margin-bottom: 5px;
}
.theme-tag {
    font-size: 0.75em;
    font-style: italic;
    opacity: 0.8;
    margin-top: 5px;
}
.activity-item-link {
    display: block;
    margin: 5px 0;
    font-size: 0.8em;
    color: #a88a51;
    text-decoration: none;
    transition: color 0.2s;
}
.activity-item-link:hover {
    color: #2c2c2c;
    text-decoration: underline;
}
.activity-supplies-tooltip {
    position: absolute;
    top: -5px;
    right: 0;
    transform: translateY(-100%);
    background: #2c2c2c;
    color: #fff;
    padding: 8px;
    border-radius: 5px;
    font-size: 0.75em;
    white-space: normal;
    width: 300px;
    text-align: left;
    z-index: 10;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
    line-height: 1.4;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}
.activity-item:hover .activity-supplies-tooltip {
    opacity: 1;
}

/* --- CALENDAR --- */
.calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    background: #c9a961;
    border-radius: 8px;
    padding: 2px;
}
.calendar-header {
    display: contents;
}
.day-name {
    font-weight: 700;
    text-align: center;
    padding: 10px 0;
    background: #fdfaf5;
    border-radius: 4px;
    color: #555;
}
.calendar-day {
    background: #fff;
    min-height: 120px;
    padding: 8px;
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
    overflow-y: auto;
    max-height: 250px;
}
.calendar-day.other-month .day-number {
    opacity: 0.4;
}
.calendar-day.drag-over {
    border: 4px solid #ecb736;
    background: #fff8e8;
    transform: scale(1.01);
}
.calendar-day.drop-success {
    background: #d4edda;
    transition: background 0.1s;
}
.day-number {
    font-weight: 700;
    color: #333;
    margin-bottom: 5px;
    font-size: 0.9em;
}
.day-activity {
    background: #faf1dc;
    border-radius: 4px;
    padding: 5px;
    margin: 4px 0;
    font-size: 0.75em;
    position: relative;
    border: 1px solid #ddd;
    padding-left: 10px;
    cursor: grab;
}
.day-activity .activity-name {
    font-weight: 700;
    color: #333;
    line-height: 1.2;
    margin-bottom: 3px;
}
.day-activity-link {
    color: #c9a961;
    text-decoration: none;
    font-size: .6em;
    display: block;
}

/* --- REMOVE BUTTON --- */
.remove-day-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #c9a961;
    color: #fff;
    border: 2px solid #fff;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    cursor: pointer;
    font-size: 12px;
    line-height: 14px;
    text-align: center;
    padding: 0;
    z-index: 5;
    opacity: 0.7;
    transition: opacity 0.2s;
}
.remove-day-btn:hover {
    opacity: 1;
    background: #a88a51;
}

/* --- RESPONSIVE --- */
@media (max-width: 900px) {
    .main-content {
        flex-direction: column;
    }
    .activities-bank {
        flex: 0 0 auto;
        max-height: 300px;
    }
}
.btn.saved {
    background-color: #28a745;
    color: white;
    cursor: default;
}

/* --- MOBILE FIXES --- */
@media (max-width: 600px) {
    body {
        padding: 10px;
    }
    .calendar {
        gap: 1px;
    }
    .calendar-day {
        min-height: 90px;
        padding: 4px;
    }
    .day-name {
        font-size: .7em;
        padding: 8px 0;
    }
    .day-activity {
        font-size: .65em;
        padding: 3px 5px;
    }
    .activity-supplies-tooltip {
        width: 90%;
        right: auto;
        left: 50%;
        transform: translateX(-50%) translateY(-100%);
    }
}
