/* Base Setup */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
body {
    background-color: #FAFAFA;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    padding: 48px 24px;
    color: #09090B;
    display: flex;
    justify-content: center;
}
.container {
    width: 100%;
    max-width: 800px;
}

/* Form Card & Container Layout */
.card {
    background-color: #FFFFFF;
    padding: 32px;
    border-radius: 12px;
    border: 1px solid #E5E7EB;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    margin-bottom: 48px;
}
h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
}
.subtitle {
    font-size: 14px;
    color: #6B7280;
    margin-bottom: 24px;
}

/* Form Inputs Styling */
.form-group {
    margin-bottom: 20px;
}
label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
}
input, textarea, select {
    width: 100%;
    background-color: #F3F4F6;
    border: none;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    font-family: inherit;
    color: #111827;
    outline: none;
    transition: ring 0.15s ease;
}
input::placeholder, textarea::placeholder {
    color: #9CA3AF;
}
textarea {
    resize: none;
}
input:focus, textarea:focus, select:focus {
    box-shadow: 0 0 0 2px #000000;
}

/* Dropdown Custom Arrow (Encoded SVG) */
/* Dropdown Custom Arrow (Encoded SVG) */
select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://w3.org' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
    padding-right: 40px;
}

/* This styles the placeholder option text when no category is selected yet */
select:invalid {
    color: #9CA3AF;
}

/* This forces the actual dropdown menu options to be dark and readable when open */
select option {
    color: #09090B;
    background-color: #FFFFFF;
}

/* Keeps the disabled placeholder choice gray inside the open list */
select option[value=""] {
    color: #9CA3AF;
}


/* Buttons */
button {
    width: 100%;
    background-color: #09090B;
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 500;
    padding: 14px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    margin-top: 8px;
}
button:hover {
    background-color: #27272A;
}

/* Saved Lessons List Section */
.section-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 24px;
}
.list-container {
    background-color: #FFFFFF;
    padding: 32px;
    border-radius: 12px;
    border: 1px solid #E5E7EB;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    min-height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.empty-state {
    text-align: center;
    color: #9CA3AF;
    font-size: 14px;
}
.hidden {
    display: none !important;
}

/* Saved Lesson Cards */
.lesson-card {
    padding: 20px;
    background-color: #F9FAFB;
    border: 1px solid #F3F4F6;
    border-radius: 8px;
    margin-bottom: 16px;
}
.lesson-card:last-child {
    margin-bottom: 0;
}
.lesson-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 8px;
}
.lesson-title {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    /* FIX: Breaks long words in titles */
    word-break: break-word; 
    overflow-wrap: anywhere;
}
.lesson-badge {
    background-color: #09090B;
    color: #FFFFFF;
    font-size: 12px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 9999px;
    white-space: nowrap;
}
.lesson-desc {
    color: #4B5563;
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-line;
    margin-bottom: 12px;
    /* FIX: Forces long unbroken text strings to wrap to the next line */
    word-break: break-word;
    overflow-wrap: anywhere;
}
.lesson-date {
    font-size: 12px;
    color: #9CA3AF;
}
.lesson-date span {
    font-weight: 500;
    color: #6B7280;
}
