/* style.css */
:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary: #64748b;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-light: #64748b;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --radius: 12px;
}

* { box-sizing: border-box; font-family: 'Kanit', sans-serif; }

body { margin: 0; background-color: var(--bg-color); color: var(--text-main); display: flex; flex-direction: column; min-height: 100vh; }

/* Navbar */
.navbar {
    background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(10px);
    border-bottom: 1px solid #e2e8f0; padding: 1rem 2rem;
    position: sticky; top: 0; z-index: 100;
    display: flex; justify-content: space-between; align-items: center;
}
.brand { font-size: 1.5rem; font-weight: 600; color: var(--primary); text-decoration: none; display: flex; gap: 10px; align-items: center; }

/* Container & Layout */
.container { max-width: 1000px; margin: 2rem auto; padding: 0 1rem; width: 100%; flex: 1; }

.hero { text-align: center; padding: 3rem 1rem; }
.hero h1 { font-size: 2.2rem; margin-bottom: 0.5rem; color: var(--text-main); }
.hero p { color: var(--text-light); margin-bottom: 2rem; }

/* Search & Filters */
.search-box { position: relative; max-width: 600px; margin: 0 auto 1.5rem; }
.search-input {
    width: 100%; padding: 1rem 1.5rem; font-size: 1.1rem;
    border: 2px solid #e2e8f0; border-radius: 50px; outline: none; transition: 0.3s;
}
.search-input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(37,99,235,0.1); }
.search-btn {
    position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
    background: var(--primary); color: white; border: none; width: 40px; height: 40px;
    border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center;
}

.category-tags { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 2rem; }
.cat-tag {
    background: white; border: 1px solid #cbd5e1; padding: 6px 16px; border-radius: 20px;
    font-size: 0.9rem; color: var(--text-light); text-decoration: none; transition: 0.2s;
}
.cat-tag:hover, .cat-tag.active { background: var(--primary); color: white; border-color: var(--primary); }

/* Course Card */
.status-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.course-card {
    background: var(--card-bg); border-radius: var(--radius); padding: 1.5rem;
    box-shadow: var(--shadow); border: 1px solid #e2e8f0; transition: transform 0.2s;
}
.course-card:hover { transform: translateY(-3px); border-color: var(--primary); }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.course-id { font-size: 1.4rem; font-weight: 700; }
.badge { padding: 4px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; }
.badge.ready { background: #dcfce7; color: #166534; }
.badge.pending { background: #fef9c3; color: #854d0e; }

/* Upload Slots */
.upload-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.file-slot {
    background: white; border: 2px dashed #cbd5e1; border-radius: var(--radius);
    padding: 1rem; position: relative; transition: 0.2s;
}
.file-slot.uploading { border-color: var(--primary); background: #eff6ff; }
.file-slot.done { border-style: solid; border-color: var(--success); background: #f0fdf4; }

.slot-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }
.slot-title { font-weight: 600; font-size: 0.95rem; }
.slot-status { font-size: 0.8rem; color: var(--text-light); }

.upload-btn-label {
    display: block; text-align: center; padding: 8px; background: var(--primary);
    color: white; border-radius: 6px; cursor: pointer; font-size: 0.9rem; margin-top: 10px;
}
.upload-btn-label:hover { background: var(--primary-hover); }
.upload-btn-label.disabled { background: #ccc; cursor: not-allowed; pointer-events: none; }

/* Individual Progress Bar */
.mini-progress { height: 6px; background: #e2e8f0; border-radius: 3px; overflow: hidden; margin-top: 10px; display: none; }
.mini-progress-bar { height: 100%; background: var(--success); width: 0%; transition: width 0.3s; }

/* Footer */
.disclaimer {
    margin-top: 3rem; padding: 2rem 1rem; background: white; border-top: 1px solid #e2e8f0;
    text-align: center; font-size: 0.85rem; color: #94a3b8;
}
.btn { padding: 0.6rem 1.2rem; border-radius: 8px; text-decoration: none; display: inline-block; cursor: pointer; border:none; font-size: 1rem; transition: 0.2s;}
.btn-primary { background: var(--primary); color: white; }
.btn-outline { border: 1px solid var(--primary); color: var(--primary); background: transparent; }
.btn:hover { opacity: 0.9; }