* { box-sizing: border-box; margin: 0; padding: 0; }
body { 
    font-family: 'Google Sans', Roboto, Arial, sans-serif; 
    background-color: #202124; 
    color: #e8eaed; 
    height: 100vh; 
    display: flex; 
    flex-direction: column; 
    overflow: hidden; 
}
.app-container { display: flex; flex-direction: column; height: 100%; }

/* Header */
.header { 
    display: flex; 
    align-items: center; 
    justify-content: space-between;
    padding: 8px 12px; 
    border-bottom: 1px solid #3c4043; 
    height: 64px;
}
.header-left, .header-right { display: flex; align-items: center; }
.header-left { gap: 8px; }
.menu-btn { 
    width: 48px; height: 48px; border-radius: 50%; 
    display: flex; align-items: center; justify-content: center; cursor: pointer; 
}
.menu-btn:hover { background-color: rgba(255,255,255,0.04); }
.menu-btn svg { width: 24px; height: 24px; }
.logo-area { display: flex; align-items: center; margin-right: 32px; margin-left: 4px; }
.logo-icon { 
    width: 32px; height: 32px; background: #4285f4; color: #fff; 
    border-radius: 4px; display: flex; align-items: center; justify-content: center; 
    font-weight: 500; font-size: 16px; margin-right: 8px;
}
.logo-text { font-size: 22px; color: #fff; }

.calendar-nav { display: flex; align-items: center; gap: 12px; }
#today-btn { 
    background: transparent; border: 1px solid #5f6368; color: #e8eaed; 
    font-weight: 500; padding: 0 16px; height: 36px; font-size: 14px; 
    border-radius: 4px; cursor: pointer; 
}
#today-btn:hover { background: rgba(255,255,255,0.04); }
.nav-buttons { display: flex; }
.nav-buttons button { 
    background: transparent; border: none; width: 36px; height: 36px; 
    border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.nav-buttons button:hover { background: rgba(255,255,255,0.04); }
.nav-buttons svg { width: 20px; height: 20px; }
h2#current-month-display { font-size: 22px; font-weight: 400; margin-left: 8px; }

.header-right { gap: 8px; padding-right: 12px; }
.icon-btn { 
    background: transparent; border: none; width: 40px; height: 40px; 
    border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.icon-btn:hover { background: rgba(255,255,255,0.04); }
.icon-btn svg { width: 24px; height: 24px; }
.view-selector { 
    display: flex; align-items: center; gap: 4px; border: 1px solid #5f6368; 
    border-radius: 4px; padding: 0 12px; height: 36px; cursor: pointer; 
    font-size: 14px; margin: 0 8px;
}
.view-selector:hover { background: rgba(255,255,255,0.04); }
.view-selector svg { width: 20px; height: 20px; }
.profile-avatar { width: 32px; height: 32px; border-radius: 50%; overflow: hidden; margin-left: 8px; cursor: pointer; }
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* Main layout */
.main-content { display: flex; flex: 1; overflow: hidden; }

/* Sidebar */
.sidebar { width: 256px; padding: 16px 12px 16px 16px; border-right: 1px solid transparent; display: flex; flex-direction: column; overflow-y: auto; transition: width 0.3s ease, padding 0.3s ease, opacity 0.3s ease; }
.sidebar.collapsed { width: 0; padding: 0; opacity: 0; overflow: hidden; pointer-events: none; }
.sidebar::-webkit-scrollbar { width: 8px; }
.sidebar::-webkit-scrollbar-thumb { background: #5f6368; border-radius: 4px; }

.create-btn {
    display: flex; align-items: center; background: #303134; border: 1px solid #5f6368;
    border-radius: 24px; padding: 0 16px 0 8px; height: 48px; cursor: pointer;
    box-shadow: 0 1px 2px 0 rgba(0,0,0,0.3); width: fit-content; margin-bottom: 24px;
}
.create-btn:hover { background: #3c4043; box-shadow: 0 1px 3px 0 rgba(0,0,0,0.4); }
.create-icon { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; }
.create-icon svg { width: 32px; height: 32px; }
.create-text { color: #e8eaed; font-size: 14px; font-weight: 500; margin: 0 8px; }
.create-arrow { margin-left: 4px; }

/* Mini Calendar */
.mini-calendar { margin-bottom: 16px; width: 100%; max-width: 224px; }
.mini-cal-header { display: flex; align-items: center; justify-content: space-between; font-size: 14px; font-weight: 500; padding: 0 8px; margin-bottom: 8px; }
.mini-nav span { display: inline-block; padding: 4px 8px; cursor: pointer; color: #9aa0a6; }
.mini-nav span:hover { background: rgba(255,255,255,0.04); border-radius: 50%; }
.mini-cal-dow { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-size: 10px; color: #9aa0a6; margin-bottom: 4px; }
.mini-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-size: 10px; row-gap: 4px; }
.mini-cal-grid span { width: 24px; height: 24px; line-height: 24px; border-radius: 50%; margin: 0 auto; cursor: pointer; }
.mini-cal-grid span:hover:not(.active-day) { background: rgba(255,255,255,0.04); }
.mini-cal-grid .dim { color: #5f6368; }
.mini-cal-grid .active-day { background: #8ab4f8; color: #202124; }

/* Search People */
.search-people { display: flex; align-items: center; background: rgba(255,255,255,0.04); border-radius: 4px; padding: 0 8px; height: 36px; margin-bottom: 16px; margin-right: 8px; }
.search-people svg { margin-right: 8px; }
.search-people input { background: transparent; border: none; color: #e8eaed; font-size: 14px; outline: none; width: 100%; }

/* Calendars List */
.calendars-list { display: flex; flex-direction: column; gap: 8px; }
.cal-section { margin-bottom: 8px; }
.cal-section-header { display: flex; align-items: center; justify-content: space-between; padding: 8px; font-size: 14px; font-weight: 500; cursor: pointer; }
.cal-section-header:hover { background: rgba(255,255,255,0.04); border-radius: 4px; }
.cal-section-actions { display: flex; align-items: center; }
.cal-items { padding-left: 8px; }
.cal-item { display: flex; align-items: center; gap: 12px; padding: 6px 8px; font-size: 13px; cursor: pointer; }
.cal-item:hover { background: rgba(255,255,255,0.04); border-radius: 4px; }
.cal-item input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; }

/* Calendar Area */
.calendar-area { display: flex; flex-direction: column; flex: 1; border-left: 1px solid #3c4043; overflow: hidden; }

/* Grid Header */
.calendar-header { 
    display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; 
    padding: 0; font-size: 11px; font-weight: 500; color: #9aa0a6; border-bottom: 1px solid #3c4043;
}
.calendar-header div { padding: 8px 0; border-right: 1px solid #3c4043; }
.calendar-header div:last-child { border-right: none; }
.dow-text { display: block; text-transform: uppercase; }

/* Main Grid */
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); grid-auto-rows: 1fr; flex: 1; overflow-y: auto; }

/* Day Cell */
.day-cell { border-right: 1px solid #3c4043; border-bottom: 1px solid #3c4043; position: relative; display: flex; flex-direction: column; padding-top: 4px; }
.calendar-grid .day-cell:nth-child(7n) { border-right: none; }
.day-cell.not-current-month .date-number { color: #5f6368; }

.date-header { display: flex; justify-content: center; position: relative; padding: 2px 0; margin-bottom: 2px; }
.date-number { text-align: center; font-size: 12px; font-weight: 500; width: 24px; height: 24px; line-height: 24px; border-radius: 50%; display: inline-block; cursor: pointer; }
.date-number:hover { background: rgba(255,255,255,0.04); }
.day-cell.today .date-number { background-color: #8ab4f8; color: #202124; }
.day-cell.today .date-number:hover { background-color: #9ebaf7; }

/* Episode Cards */
.episodes-container { flex: 1; overflow-y: hidden; display: flex; flex-direction: column; gap: 2px; }
.episode { 
    background-color: #039be5; color: #ffffff; padding: 2px 8px; border-radius: 4px; 
    font-size: 12px; font-weight: 500; line-height: 16px; height: 22px; white-space: nowrap; 
    overflow: hidden; text-overflow: ellipsis; cursor: pointer; margin: 0 4px; transition: filter 0.2s;
}
.episode:hover { filter: brightness(0.9); }
.episode.s2 { background-color: #f6bf26; color: #202124;} /* Match Boba orange / Purple S2 mapping below */
.episode.bobf { background-color: #e67c73; color: #fff;}
.episode.s3 { background-color: #33b679; color: #202124;}
.episode.watched { background-color: #3c4043; color: #9aa0a6; text-decoration: line-through; }

/* Make Boba the reddish and S2 the purplish based on requested pic */
.episode.s2 { background-color: #8e24aa; color: #ffffff; }
.episode.bobf { background-color: #f09300; color: #ffffff; }

/* Controls Hover */
.controls { position: absolute; top: 2px; right: 4px; display: none; gap: 4px; z-index: 10; }
.day-cell:hover .controls { display: flex; }
.controls button { background: rgba(60,64,67, 0.9); border: none; color: white; width: 22px; height: 22px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 16px; box-shadow: 0 1px 3px rgba(0,0,0,0.4); }
.controls button:hover { background: #5f6368; }

.episode.movie {
    background-color: #d50000;
    color: #ffffff;
    font-weight: bold;
    display: flex;
    justify-content: center;
    border-radius: 8px;
    margin-top: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.5);
    cursor: grab;
}
.episode.movie:active { cursor: grabbing; }

.logo-text { font-family: Impact, sans-serif; font-size: 26px; color: #fff; letter-spacing: 1px; font-style: italic; }
.header-right { min-width: 64px; }
