:root {
    --text-main: #0f172a;
    --text-light: #64748b;
    --primary: #10b981; /* Emerald Green */
    --accent: #34d399;
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(255, 255, 255, 0.8);
    --card-shadow: 0 8px 32px rgba(31, 38, 135, 0.07);
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Inter', -apple-system, sans-serif; }

body {
    background: #f8fafc;
    color: var(--text-main);
    height: 100vh;
    overflow: hidden; /* Prevent body scroll, use container scroll */
    display: flex;
    justify-content: center;
}

/* --- THE MESH ANIMATION --- */
.bg-animation {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1;
    background-color: #ffffff;
    
    /* The Grid Pattern */
    background-image: 
        linear-gradient(rgba(16, 185, 129, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(16, 185, 129, 0.07) 1px, transparent 1px);
    background-size: 50px 50px;
    
    /* Movement */
    animation: panGrid 60s linear infinite;
}

/* The Green Aura (Mixed Color) */
.bg-animation::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle at 50% 50%, rgba(52, 211, 153, 0.15), transparent 60%);
    animation: pulseAura 10s ease-in-out infinite alternate;
}

@keyframes panGrid {
    0% { background-position: 0 0; }
    100% { background-position: 50px 50px; }
}

@keyframes pulseAura {
    0% { transform: scale(1); opacity: 0.5; }
    100% { transform: scale(1.1); opacity: 0.8; }
}

/* --- Layout --- */
.glass-container {
    width: 100%;
    max-width: 550px;
    height: 100%;
    display: flex;
    flex-direction: column;
    /* Frosted Glass Frame */
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(8px);
    border-left: 1px solid white;
    border-right: 1px solid white;
}

/* --- Header --- */
.app-header {
    padding: 20px 24px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(16, 185, 129, 0.1);
    box-shadow: 0 4px 20px rgba(0,0,0,0.02);
    z-index: 10;
}

.header-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.brand { display: flex; align-items: center; gap: 8px; }
.brand h1 { font-size: 1.4rem; font-weight: 800; color: #064e3b; letter-spacing: -0.5px; }
.status-badge { 
    font-size: 0.75rem; 
    background: #ecfdf5; 
    color: #059669; 
    padding: 4px 10px; 
    border-radius: 20px; 
    font-weight: 600; 
    border: 1px solid #d1fae5;
}

/* --- Search Bar --- */
.search-box { position: relative; margin-bottom: 20px; }
input {
    width: 100%;
    padding: 14px 20px;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    background: white;
    font-size: 1rem;
    color: #334155;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}
input:focus { 
    border-color: var(--primary); 
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2); 
    outline: none;
}

#clearSearch {
    position: absolute; right: 15px; top: 50%; transform: translateY(-50%);
    background: #e2e8f0; border: none; width: 24px; height: 24px; 
    border-radius: 50%; color: #64748b; cursor: pointer; font-size: 12px;
}
.hidden { display: none !important; }

/* --- Tabs --- */
.nav-pills { 
    display: flex; background: #f1f5f9; padding: 4px; border-radius: 12px; 
}
.pill {
    flex: 1; border: none; padding: 10px; border-radius: 8px; 
    font-weight: 600; font-size: 0.9rem; cursor: pointer;
    background: transparent; color: #64748b; transition: 0.2s;
}
.pill.active { background: white; color: var(--primary); box-shadow: 0 2px 4px rgba(0,0,0,0.05); }

/* --- Content --- */
.content-scroll { 
    flex: 1; overflow-y: auto; padding: 24px; 
    scroll-behavior: smooth;
}

/* --- Cards --- */
.schedule-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 0; /* Removing padding from container for header effect */
    margin-bottom: 24px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--card-shadow);
    animation: floatUp 0.4s ease-out backwards;
    overflow: hidden;
}

.card-header-strip {
    background: linear-gradient(135deg, #10b981, #059669);
    padding: 12px 20px;
    color: white;
}

.batch-tag {
    font-weight: 700; font-size: 1rem; letter-spacing: 0.5px;
}

.card-body { padding: 10px 20px 20px; }

/* --- Grid --- */
.date-group { margin-top: 15px; }
.date-header {
    font-size: 0.75rem; font-weight: 800; color: #94a3b8; 
    text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px;
    display: flex; align-items: center; gap: 8px;
}
.date-header::after { content: ''; flex: 1; height: 1px; background: #e2e8f0; }

.class-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 0; border-bottom: 1px dashed #e2e8f0;
    transition: 0.2s;
}
.class-row:last-child { border-bottom: none; }
.class-row:hover { transform: translateX(4px); }

.time { font-size: 0.85rem; font-weight: 600; color: var(--primary); width: 80px; }
.subject { font-weight: 600; color: #334155; flex: 1; }
.room { 
    font-size: 0.75rem; font-weight: 700; color: #64748b; 
    background: #f8fafc; padding: 2px 8px; border-radius: 6px; border: 1px solid #e2e8f0;
}

.welcome-msg { text-align: center; margin-top: 60px; color: #475569; }
.illustration { font-size: 3rem; margin-bottom: 10px; display: block; opacity: 0.8; }

@keyframes floatUp {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}