/* --- 1. VARIABLES & RESET --- */
:root {
    --bg-color: #f3f4f6;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --primary: #4f46e5;
    --primary-light: #e0e7ff;
    --accent: #10b981;
    --accent-light: #d1fae5;
    --border: #e5e7eb;
    --card-bg: #ffffff;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --radius: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Segoe UI', sans-serif; }

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    padding: 20px;
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

/* --- 2. LAYOUT WRAPPER --- */
.app-layout {
    display: flex;
    gap: 24px;
    width: 100%;
    max-width: 1200px;
    align-items: flex-start;
}

/* --- 3. CALENDAR (Left) --- */
.calendar-container {
    flex: 2;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.calendar-header {
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

.month-title { font-size: 1.5rem; font-weight: 700; }

.nav-btn {
    background: white; border: 1px solid var(--border);
    border-radius: 8px; width: 36px; height: 36px;
    cursor: pointer; transition: 0.2s;
}
.nav-btn:hover { background: var(--bg-color); }

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: var(--border);
    gap: 1px;
}

.weekday {
    background: #f9fafb; padding: 12px;
    text-align: center; font-size: 0.75rem;
    font-weight: 700; color: var(--text-muted);
    text-transform: uppercase;
}

.day-cell {
    background: var(--card-bg);
    min-height: 100px;
    padding: 10px;
    cursor: pointer;
    transition: background 0.2s;
}

.day-cell:hover { background: #f9fafb; }

.day-cell.selected-day {
    background: #eff6ff; 
    box-shadow: inset 0 0 0 2px var(--primary);
}
.day-cell.today .date-num { color: var(--primary); font-weight: 800; }

.date-num { font-weight: 600; font-size: 0.9rem; color: var(--text-muted); margin-bottom: 6px; display: block;}

.event-dot {
    height: 6px; width: 6px;
    background-color: var(--primary);
    border-radius: 50%;
    display: inline-block;
    margin-right: 3px;
}
.event-dot.launch { background-color: var(--accent); }

/* --- 4. SIDEBAR (Right) - SLIDER CONTAINER --- */
.sidebar {
    flex: 1;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    min-height: 450px;
    position: sticky;
    top: 20px;
    overflow: hidden; /* Key for sliding effect */
}

/* The Track that moves left/right */
.sidebar-slider {
    display: flex;
    width: 200%; /* Holds two panels side-by-side */
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); /* Smooth slide */
}

/* The Two Panels */
.view-panel {
    width: 50%; /* Each panel takes half the track (aka 100% of sidebar) */
    padding: 24px;
    flex-shrink: 0;
}

/* --- PANEL A: LIST VIEW STYLES --- */
.sidebar-header { margin-bottom: 20px; padding-bottom: 15px; border-bottom: 1px solid var(--border); }
.sidebar-date-label { font-size: 0.85rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }

/* UPDATED: Matched to .month-title */
.sidebar-day-title { font-size: 1.5rem; font-weight: 700; color: var(--text-main); margin-top: 4px; }

.events-list { list-style: none; }

.event-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border-left: 4px solid var(--primary);
}
.event-card.launch { border-left-color: var(--accent); }
.event-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.05); }

.event-title { font-weight: 700; font-size: 1rem; margin-bottom: 4px; }
.event-time { font-size: 0.85rem; color: var(--text-muted); }

.empty-state { text-align: center; color: var(--text-muted); padding: 40px 0; }
.empty-icon { font-size: 2rem; margin-bottom: 10px; display: block; opacity: 0.5; }

/* --- PANEL B: DETAILS VIEW STYLES --- */
.back-btn {
    background: none; border: none;
    display: flex; align-items: center; gap: 8px;
    color: var(--text-muted);
    font-weight: 600; font-size: 0.9rem;
    cursor: pointer; margin-bottom: 20px;
    transition: color 0.2s;
}
.back-btn:hover { color: var(--primary); }

.detail-badge {
    display: inline-block; padding: 4px 10px;
    border-radius: 6px; font-size: 0.75rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.05em;
    margin-bottom: 15px;
}
.detail-badge.meeting { background: var(--primary-light); color: var(--primary); }
.detail-badge.launch { background: var(--accent-light); color: var(--accent); }

.detail-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 10px; line-height: 1.3; }
.detail-time { color: var(--text-muted); font-weight: 500; margin-bottom: 24px; display: flex; align-items: center; gap: 6px; }

.detail-desc { line-height: 1.6; color: #4b5563; margin-bottom: 20px; }
.detail-row { display: flex; margin-top: 15px; padding-top: 15px; border-top: 1px solid var(--border); }
.detail-item { flex: 1; }
.detail-label { font-size: 0.75rem; text-transform: uppercase; color: var(--text-muted); font-weight: 600; margin-bottom: 4px; }

/* RESPONSIVE */
@media (max-width: 850px) {
    .app-layout { flex-direction: column; }
    .calendar-container, .sidebar { width: 100%; flex: none; }
    .day-cell { min-height: 60px; }
}

/* --- SHARE BUTTON --- */
.share-btn {
    display: block;
    width: 100%;
    padding: 12px;
    margin-top: 24px;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    text-align: center;
}
.share-btn:hover {
    background-color: #4338ca;
}
.share-btn:active {
    transform: scale(0.98);
}
