:root {
    /* Palette - Xoxi Butterfly Theme */
    --color-primary: #FF5C8D;
    /* Vibrant Rose Pink */
    --color-primary-dark: #D84370;
    /* Darker Rose */
    --color-secondary: #FFF0F5;
    /* Lavender Blush */
    --color-accent: #FFD700;
    /* Gold */

    --color-text: #2E1A2B;
    /* Dark Purple/Black replacement */
    --color-text-light: #886078;
    /* Muted Purple/Grey */

    --color-white: #ffffff;
    --color-background: #FFFAFB;
    /* Very light pink tint */

    --font-main: 'Outfit', sans-serif;

    --shadow-sm: 0 2px 8px rgba(255, 92, 141, 0.15);
    --shadow-md: 0 4px 12px rgba(255, 92, 141, 0.25);

    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;

    --transition: all 0.3s ease;

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: 1px solid rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
    --glass-blur: blur(10px);
}

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

body {
    font-family: var(--font-main);
    background-color: var(--color-background);
    color: var(--color-text);
    line-height: 1.6;
    background-image: radial-gradient(circle at 10% 20%, rgba(255, 240, 245, 1) 0%, rgba(255, 255, 255, 0) 90%);
    min-height: 100vh;
}

/* Typography */
h1,
h2,
h3 {
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.2;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, var(--color-primary-dark), var(--color-primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Layout Utilities */
.container {
    max-width: 600px;
    /* Mobile-first focus */
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 16px 32px;
    border-radius: var(--radius-lg);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 1.1rem;
    width: 100%;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: var(--color-white);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 107, 133, 0.4);
}

.btn-secondary {
    background: var(--color-white);
    color: var(--color-primary-dark);
    border: 2px solid var(--color-primary-dark);
}

/* Cards */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    box-shadow: var(--glass-shadow);
}

.card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--glass-shadow);
    margin-bottom: 16px;
    border: var(--glass-border);
    transition: var(--transition);
}

.card:hover {
    border-color: var(--color-primary);
    transform: translateY(-2px);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* View Transitions */
@keyframes slideInRight {
    from { transform: translateX(50px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOutLeft {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(-50px); opacity: 0; }
}

.slide-in {
    animation: slideInRight 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* Toast Notifications */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 15px 20px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 250px;
    animation: slideInRight 0.3s ease forwards;
    border-left: 4px solid #ddd;
}

.toast.success { border-left-color: #28a745; }
.toast.error { border-left-color: #dc3545; }
.toast.info { border-left-color: var(--color-primary); }

.toast-icon { font-size: 1.2rem; }
.toast-message { font-size: 0.95rem; font-weight: 500; color: var(--color-text); }

/* Butterfly Decoration (CSS only) */
.butterfly-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ff8fa3' fill-opacity='1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* Horizontal Day Scroller */
.day-scroller-container {
    margin-bottom: 2rem;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.day-scroller-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.month-year-label {
    text-align: center;
    font-weight: 700;
    color: var(--color-primary-dark);
    margin-bottom: 10px;
    font-size: 1.1rem;
    text-transform: capitalize;
    transition: opacity 0.3s ease;
}

.day-scroller {
    display: flex;
    overflow-x: auto;
    gap: 12px;
    padding: 10px 20px;
    /* Allows centering first/last items */
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    width: 100%;
}

.day-scroller::-webkit-scrollbar {
    display: none;
}

.day-chip {
    flex: 0 0 auto;
    width: 65px;
    height: 80px;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    scroll-snap-align: center;
}

.day-chip span.day-name {
    font-size: 0.8rem;
    color: var(--color-text-light);
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 4px;
}

.day-chip span.day-number {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-text);
}

.day-chip.selected {
    background: var(--color-primary);
    border-color: var(--color-primary);
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(255, 92, 141, 0.3);
}

.day-chip.selected span.day-name,
.day-chip.selected span.day-number {
    color: white;
}

/* Navigation Buttons */
.scroller-nav-btn {
    background: white;
    border: 1px solid var(--color-primary);
    color: var(--color-primary);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.2rem;
    z-index: 2;
    transition: all 0.2s;
    flex-shrink: 0;
}

.scroller-nav-btn:hover {
    background: var(--color-primary);
    color: white;
}

.scroller-nav-btn.prev {
    margin-right: 8px;
}

.scroller-nav-btn.next {
    margin-left: 8px;
}

/* Time Slots Grid */
.time-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 12px;
}

.time-chip {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    border-radius: 12px;
    padding: 12px 0;
    text-align: center;
    font-weight: 600;
    color: var(--color-text);
    cursor: pointer;
    transition: all 0.2s;
}

.time-chip:hover {
    background: var(--color-secondary);
    border-color: var(--color-primary);
}

.time-chip.selected {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
    box-shadow: 0 4px 10px rgba(255, 92, 141, 0.2);
}
/* Loading Spinner */
.loader-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    height: 300px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--color-secondary);
    border-top: 4px solid var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: var(--color-text-light);
    font-weight: 500;
    font-size: 1.1rem;
}
