html,
body {
    margin: 0;
    padding: 0;
}
/* ============================================================
   NAVIGATION
============================================================ */
header {
    background: #111827;
    color: #f9fafb;
    padding: 16px 0;
}

.navbar {
    max-width: 1120px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-evenly;
}

.navbar a.logo {
    font-weight: 700;
    font-size: 1.25rem;
    text-decoration: none;
    color: #f9fafb;
}

/* Desktop Links */
.nav-links {
    display: flex;
    align-items: center;
}

.nav-links a {
    margin-left: 16px;
    text-decoration: none;
    color: #e5e7eb;
    font-size: 0.95rem;
}

.nav-links a:hover {
    color: #ffffff;
}


:root {
    --heading-font: 'Patrick Hand', 'Kalam', sans-serif;
    --body-font: 'Inter', system-ui, -apple-system, sans-serif;

    --card-bg: #ffffffcc;
    --card-solid: #ffffff;
    --bg: linear-gradient(135deg, #fafbff, #eef2ff);

    --border-soft: #e0e3f2;
    --text-main: #111827;
    --text-sub: #4b5563;

    --accent-blue: #4b6bff;
    --accent-blue-soft: #e3e7ff;
    --accent-yellow: #fff7b3;
}

/* Page background wrapper so tool stays centred and ads can live on sides */
.rt-main {
    min-height: 100vh;
    background: var(--bg);
    padding: 0 12px 60px;
    display: flex;
    justify-content: center;
}

.rt-wrapper {
    max-width: 960px;
    width: 100%;
    margin: 0 auto;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
    padding: 32px 30px 40px;
}

/* Typography */
.rt-wrapper h1 {
    text-align: center;
    font-family: var(--heading-font);
    font-size: 2.8rem;
    margin-bottom: 8px;
    color: var(--text-main);
}

.rt-subtitle {
    text-align: center;
    font-size: 1.05rem;
    color: var(--text-sub);
    margin-bottom: 30px;
}

.rt-hint {
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 8px;
}

/* Input row layout */
.rt-input-row {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    gap: 20px;
    margin-bottom: 30px;
}

.rt-card {
    background: var(--card-solid);
    border-radius: 18px;
    padding: 18px 20px 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-soft);
}

.rt-card h3 {
    margin: 0 0 6px;
    font-family: var(--heading-font);
    font-size: 1.5rem;
    color: var(--text-main);
}

/* Subject inputs */
#subjects-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#subjects-list input {
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #d3d6f0;
    background: #f9faff;
    font-size: 0.95rem;
}

/* Select */
#hours-per-week {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #d3d6f0;
    background: #f9faff;
    font-size: 0.95rem;
    margin-bottom: 14px;
}

/* Buttons small & primary */
.rt-small-btn {
    margin-top: 10px;
    padding: 8px 14px;
    border-radius: 999px;
    border: none;
    background: #e5e7ff;
    color: #1f2937;
    font-size: 0.85rem;
    font-family: var(--heading-font);
    cursor: pointer;
    transition: 0.15s;
}

.rt-small-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.rt-generate-btn {
    display: inline-block;
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    border: none;
    background: var(--accent-blue);
    color: #ffffff;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 6px;
    transition: 0.2s;
    font-family: var(--body-font);
}

.rt-generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(75, 107, 255, 0.25);
}

/* Timetable section */
.rt-timetable-section {
    margin-top: 24px;
}

.rt-timetable-header {
    margin-bottom: 10px;
}

.rt-timetable-header h2 {
    font-family: var(--heading-font);
    font-size: 2rem;
    margin-bottom: 4px;
    color: var(--text-main);
}

/* Timetable card (export area) */
.rt-timetable-card {
    margin-top: 10px;
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid var(--border-soft);
    padding: 16px 18px 22px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
}

.rt-week-label {
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 10px;
}

/* Table wrapper for scroll on mobile */
.rt-table-wrapper {
    overflow-x: auto;
}

#timetable-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 640px;
    font-size: 0.95rem;
}

#timetable-table thead th {
    padding: 10px 8px;
    border: 1px solid #e4e6f2;
    background: #f2f4ff;
    font-weight: 600;
    color: #374151;
}

#timetable-table td {
    vertical-align: top;
    padding: 8px;
    border: 1px solid #e4e6f2;
    background: #f9f9ff;
}

.rt-slot {
    background: #fef7d8;
    border-radius: 8px;
    padding: 4px 6px;
    font-size: 0.85rem;
    margin-bottom: 4px;
    text-align: left;
}

/* Fallback dash styling */
.rt-day {
    text-align: center;
    color: #9ca3af;
}

/* Actions under table */
.rt-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 14px;
}

.rt-primary-btn,
.rt-secondary-btn {
    padding: 10px 18px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    font-family: var(--body-font);
    font-weight: 500;
    transition: 0.2s;
}

.rt-primary-btn {
    background: var(--accent-blue);
    color: #ffffff;
}

.rt-primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(75, 107, 255, 0.25);
}

.rt-secondary-btn {
    background: #e5e7eb;
    color: #111827;
}

.rt-secondary-btn:hover {
    background: #d1d5db;
}

/* Responsive */
@media (max-width: 800px) {
    .rt-wrapper {
        padding: 22px 18px 30px;
        border-radius: 20px;
    }

    .rt-input-row {
        grid-template-columns: 1fr;
    }

    .rt-wrapper h1 {
        font-size: 2.2rem;
    }

    .rt-subtitle {
        font-size: 0.98rem;
    }

    #timetable-table {
        font-size: 0.9rem;
        min-width: 540px;
    }

    .rt-actions {
        justify-content: center;
        flex-wrap: wrap;
    }
}