/* Page-Specific Styles */

/* ========== TIMETABLE PAGE ========== */
.timetable-container {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 2px solid var(--gray-200);
}

.timetable-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.timetable-container.timetable-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.timetable {
    width: 100%;
    min-width: 600px;
    border-collapse: separate;
    border-spacing: 0;
}

.timetable th {
    background: linear-gradient(135deg, var(--dark-light), var(--dark));
    color: var(--primary);
    font-weight: 700;
    padding: 14px 10px;
    text-align: center;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 3px solid var(--primary);
}

/* Time column header */
.timetable th:first-child {
    min-width: 110px;
    width: auto;
    text-align: left;
    position: sticky;
    left: 0;
    z-index: 2;
}

.timetable td {
    padding: 10px 8px;
    border-bottom: 1px solid var(--gray-100);
    vertical-align: top;
    text-align: center;
}

/* Sticky time column */
.timetable td:first-child,
.timetable th:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    background: var(--gray-50);
}

.timetable td:first-child {
    font-weight: 700;
    font-size: 0.78rem;
    color: var(--secondary);
    background: var(--gray-50);
    border-right: 2px solid var(--primary);
    text-align: left;
    padding-left: 12px;
    min-width: 110px;
}

.activity-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.12), rgba(255, 215, 0, 0.04));
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    color: var(--secondary);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 2px 0;
    border: 1px solid rgba(255, 215, 0, 0.15);
    line-height: 1.3;
    word-break: break-word;
}

.activity-item:hover {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.3), rgba(255, 215, 0, 0.15));
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.15);
}

.activity-item .delete-btn {
    opacity: 0;
    color: var(--danger);
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.activity-item:hover .delete-btn {
    opacity: 1;
}

.timetable tbody tr:hover {
    background: rgba(255, 215, 0, 0.03);
}

/* Alternating row subtle stripe */
.timetable tbody tr:nth-child(even) {
    background: rgba(0, 0, 0, 0.015);
}

/* ========== WEEKEND PAGE ========== */
.weekend-section {
    margin-top: 32px;
}

.weekend-section h3 {
    font-size: 1.2rem;
    color: var(--secondary);
    margin-bottom: 16px;
    font-family: Georgia, serif;
}

.weekend-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.weekend-card {
    background: linear-gradient(135deg, var(--white), var(--gray-50));
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
    border: 2px solid var(--gray-200);
    transition: all 0.3s ease;
}

.weekend-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.weekend-card h4 {
    font-size: 1.1rem;
    color: var(--secondary);
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary);
    font-family: Georgia, serif;
}

.weekend-card p {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    color: var(--gray-600);
}

/* ========== DAILY PLAN PAGE ========== */
.plan-form {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 32px;
    border: 2px solid var(--gray-200);
}

.plan-section {
    margin-bottom: 28px;
}

.plan-section h3 {
    font-size: 1.1rem;
    color: var(--secondary);
    margin-bottom: 16px;
    font-family: Georgia, serif;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.form-group.half {
    flex: 1;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 2px solid var(--gray-100);
}

/* ========== REVIEW PAGE ========== */
.review-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.review-form {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 24px;
    margin-bottom: 24px;
    border: 2px solid var(--gray-200);
}

.review-filter {
    margin-bottom: 16px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.review-filter .filter-btn {
    padding: 5px 14px;
    border-radius: 20px;
    border: 1.5px solid var(--gray-200);
    background: var(--white);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.2s ease;
}

.review-filter .filter-btn:hover {
    border-color: var(--primary);
    color: var(--secondary);
}

.review-filter .filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--dark);
}

.review-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.review-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    background: var(--white);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    border-left: 3px solid var(--primary);
    transition: all 0.2s ease;
}

.review-item:hover {
    box-shadow: var(--shadow);
    transform: translateX(2px);
}

.review-word {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--secondary);
    font-family: Georgia, serif;
}

.review-pattern {
    font-size: 0.72rem;
    color: var(--gray-400);
    margin-left: 6px;
}

.review-mastery {
    display: flex;
    gap: 4px;
}

.mastery-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1.5px solid var(--gray-200);
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--white);
}

.mastery-dot.filled {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-color: var(--primary);
    box-shadow: 0 1px 4px rgba(255, 215, 0, 0.3);
}

.mastery-dot:hover {
    transform: scale(1.15);
}

/* ========== PROGRESS PAGE ========== */
.progress-card {
    background: linear-gradient(135deg, var(--white), var(--gray-50));
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
    border: 2px solid var(--gray-200);
}

.progress-bar {
    height: 12px;
    background: var(--gray-200);
    border-radius: 6px;
    overflow: hidden;
    margin: 16px 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--warning));
    border-radius: 6px;
    transition: width 0.5s ease;
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.5);
}

.progress-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.progress-category {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}

.progress-check {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.progress-check input[type="checkbox"] {
    width: 22px;
    height: 22px;
    accent-color: var(--primary);
}

/* ========== SETTINGS PAGE ========== */
.settings-container {
    max-width: 500px;
}

.settings-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 28px;
    margin-bottom: 24px;
    border: 2px solid var(--gray-200);
}

.settings-card h3 {
    color: var(--secondary);
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--gray-100);
    font-family: Georgia, serif;
}

/* ========== EDIT FORMS ========== */
#timetable-form {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 24px;
    margin-bottom: 24px;
    border: 2px solid var(--gray-200);
}

/* ========== MEDIUM SCREEN ========== */
@media (max-width: 1200px) {
    .timetable th,
    .timetable td {
        padding: 8px 6px;
        font-size: 0.78rem;
    }

    .activity-item {
        font-size: 0.75rem;
        padding: 5px 8px;
        gap: 4px;
    }
}

/* ========== MOBILE RESPONSIVE ========== */
@media (max-width: 768px) {
    .timetable-container,
    .timetable-wrapper {
        margin: 0 -12px;
        border-radius: 0;
        border-left: none;
        border-right: none;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .timetable {
        min-width: 700px;
    }

    .timetable th:first-child {
        min-width: 90px;
    }

    .timetable th,
    .timetable td {
        padding: 8px 6px;
        font-size: 0.72rem;
    }

    .timetable td:first-child {
        font-size: 0.68rem;
        padding-left: 6px;
        min-width: 90px;
    }

    .activity-item {
        font-size: 0.68rem;
        padding: 4px 6px;
        gap: 3px;
        word-break: normal;
        white-space: nowrap;
    }

    .weekend-cards {
        grid-template-columns: 1fr;
    }

    .page-header {
        gap: 8px;
    }

    .page-header h1 {
        font-size: 1.3rem;
    }
}
