/*
Theme Name: wp-hoc-toan
Version: 1.0
*/

:root {
    --primary-color: #2563eb;
    --secondary-color: #10b981; /* Emerald Green */
    --accent-color: #f59e0b;
    --bg-color: #f9fafb;
    --text-main: #111827;
    --text-muted: #6b7280;
    --card-bg: #ffffff;
    --card-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --card-shadow-hover: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --border-radius: 12px;
}

body {
    background-color: var(--bg-color);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text-main);
    margin: 0;
    padding: 0;
    line-height: 1.5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.home-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.site-header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 30px rgba(37, 99, 235, 0.05); /* Subtle blue glow */
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 20px;
    font-weight: 800;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo span {
    color: var(--primary-color);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

.main-nav a {
    text-decoration: none;
    color: #4b5563;
    font-size: 15px;
    font-weight: 600;
    transition: color 0.2s;
}

.main-nav a:hover {
    color: var(--primary-color);
}

.btn-login-header {
    background: #f3f4f6;
    color: #111827 !important;
    padding: 8px 20px;
    border-radius: 99px;
    transition: all 0.2s !important;
}

.btn-login-header:hover {
    background: #e5e7eb;
}

.search-bar {
    background: #f1f5f9;
    border-radius: 99px;
    padding: 8px 20px;
    display: flex;
    align-items: center;
    width: 400px;
}

.search-bar input {
    background: transparent;
    border: none;
    outline: none;
    width: 100%;
    margin-left: 8px;
}

/* Dashboard Grid */
.hero-section {
    padding: 40px 0;
}

.banner-card {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border-radius: var(--border-radius);
    padding: 40px;
    color: white;
    margin-bottom: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.banner-content h1 {
    font-size: 32px;
    margin-bottom: 12px;
}

.banner-button {
    background: var(--secondary-color);
    color: white;
    padding: 12px 24px;
    border-radius: 99px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s;
}

.banner-button:hover {
    transform: translateY(-2px);
}

/* Section Titles */
.section-title-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
}

.section-title-wrapper h2 {
    font-size: 28px;
    font-weight: 800;
    color: #1e293b;
    margin: 0;
}

.section-icon {
    color: var(--primary-color);
}

/* Category Card (Học tập) */
.cat-home-grid { 
    display: grid; 
    grid-template-columns: repeat(4, 1fr); 
    gap: 24px; /* Phù hợp với shadow lớn */
    margin-bottom: 80px; 
}

.cat-card {
    background: #fff;
    border-radius: 8px; /* rounded-lg */
    overflow: hidden;
    border: none;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); /* shadow-md */
    transition: all 0.3s ease; /* transition-shadow duration-300 */
    text-decoration: none;
    display: flex;
    flex-direction: column;
}

.cat-card:hover {
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1); /* shadow-xl */
}

.cat-card-header {
    padding: 24px; /* p-6 */
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Theo snippet là căn trái hoặc tự nhiên */
}

.cat-card-header h3 {
    color: white;
    font-size: 24px; /* text-2xl */
    font-weight: 700; /* font-bold */
    margin: 0;
}

.cat-card-body {
    padding: 16px; /* p-4 */
}

.btn-cat-view-wrapper {
    background: #f9fafb; /* bg-gray-50 */
    border-radius: 8px; /* rounded-lg */
    padding: 12px; /* p-3 */
    text-align: center;
    transition: background 0.2s;
}

.cat-card:hover .btn-cat-view-wrapper {
    background: rgba(34, 197, 94, 0.1); /* group-hover:bg-green-50 tương đương */
}

.btn-cat-view-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600; /* font-semibold */
    font-size: 16px;
}

/* Màu cụ thể cho từng thẻ */
.cat-card[data-color="green"] .cat-card-header { background: linear-gradient(to right, #22c55e, #16a34a); }
.cat-card[data-color="green"] .btn-cat-view-content { color: #16a34a; }

.cat-card[data-color="blue"] .cat-card-header { background: linear-gradient(to right, #3b82f6, #2563eb); }
.cat-card[data-color="blue"] .btn-cat-view-content { color: #2563eb; }

.btn-cat-view:hover {
    background: #e2e8f0;
}

/* Class Card (Danh sách lớp học) */
.class-card-new {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #f1f5f9;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.class-card-new:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-shadow-hover);
}

.class-card-new-header {
    background: var(--primary-color);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
}

.class-card-new-header h3 {
    font-size: 18px;
    font-weight: 800;
    margin: 0;
    text-transform: uppercase;
}

.class-card-new-body {
    padding: 24px;
    flex: 1;
}

.subject-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.subject-mini-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.subject-mini-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #1e293b;
    font-weight: 600;
    font-size: 14px;
}

.lesson-count-badge {
    background: #dbeafe;
    color: #2563eb;
    padding: 4px 10px;
    border-radius: 99px;
    font-size: 12px;
    font-weight: 700;
}

.btn-class-view {
    background: #f1f5f9;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    transition: all 0.2s;
}

.btn-class-view:hover {
    background: #2563eb;
    color: white;
}

.btn-view-lesson:hover {
    background: #dcfce7;
}

/* Subject Detail Layout */
.breadcrumb {
    font-size: 13px;
    color: #94a3b8;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.subject-header-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 32px;
}

.subject-title {
    font-size: 28px;
    font-weight: 800;
    color: #1e1b4b; /* Màu Indigo đậm */
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.lesson-list-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
}

.lesson-item {
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f1f5f9;
    text-decoration: none;
    color: var(--text-main);
    transition: background 0.2s;
}

.lesson-item:hover {
    background: #f8fafc;
    color: var(--primary-color);
}

/* Special Category Banner */
.special-banner {
    background: linear-gradient(135deg, #4ade80 0%, #16a34a 100%);
    color: white;
    padding: 32px 40px;
    border-radius: 12px;
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 40px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    text-align: center;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 0;
    color: #64748b;
}

.empty-state svg {
    margin-bottom: 24px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 18px;
    font-weight: 500;
}

.lesson-item:last-child {
    border-bottom: none;
}

/* Khối đặc biệt Giải bài tập SGK */
.special-card .card-header {
    background: linear-gradient(135deg, #22c55e 0%, #15803d 100%);
    padding: 28px 16px; /* Tăng một chút độ cao cho khối lớn */
    font-size: 20px;
    display: flex;
    justify-content: center;
}

/* Lesson Layout */
.lesson-container {
    display: flex;
    min-height: calc(100vh - 150px);
    background: #fff;
}

.lesson-sidebar {
    width: 300px;
    border-right: 1px solid #e2e8f0;
    padding: 24px;
    overflow-y: auto;
    position: sticky;
    top: 65px;
    height: calc(100vh - 65px);
    background: #fdfdfd;
}

.lesson-content {
    flex: 1;
    padding: 40px 60px;
    max-width: 900px;
}

.sidebar-title {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 16px;
    font-weight: 700;
}

.lesson-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.lesson-nav-item a {
    display: block;
    padding: 10px 12px;
    color: var(--text-main);
    text-decoration: none;
    border-radius: 8px;
    font-size: 15px;
    margin-bottom: 4px;
    transition: background 0.2s;
}

.lesson-nav-item a:hover,
.lesson-nav-item.active a {
    background: var(--bg-color);
    color: var(--primary-color);
    font-weight: 600;
}

.lesson-entry-header h1 {
    font-size: 36px;
    margin-bottom: 24px;
    color: #0f172a;
}

.lesson-metadata {
    display: flex;
    gap: 20px;
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 32px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 16px;
}

.lesson-footer-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 60px;
    padding-top: 32px;
    border-top: 2px solid #f1f5f9;
}

/* Auth Pages */
.auth-wrapper {
    background: #f1f5f9;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-card {
    background: #fff;
    width: 100%;
    max-width: 400px;
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: var(--card-shadow);
}

.auth-card h2 {
    text-align: center;
    font-size: 24px;
    margin-bottom: 32px;
    font-weight: 800;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-main);
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    outline: none;
    font-size: 16px;
}

.form-group input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.auth-btn {
    width: 100%;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 12px;
}

.auth-btn:hover {
    background: #1d4ed8;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

/* Class Detail Page */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 24px;
}

.class-banner {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 40px;
}

.class-banner h1 {
    font-size: 36px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 15px;
    color: #0f172a;
}

.subject-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    transition: transform 0.2s;
}

.subject-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.subject-card-header {
    background: linear-gradient(135deg, #22c55e 0%, #15803d 100%); /* Xanh lá êm hơn */
    color: white;
    padding: 16px;
    font-weight: 700;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.subject-card-body {
    padding: 24px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #64748b;
    font-size: 15px;
}

.count-badge {
    background: #dcfce7;
    color: #16a34a;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 800;
}

.btn-view-lesson {
    background: #f0fdf4;
    color: #16a34a;
    display: block;
    text-align: center;
    padding: 12px;
    margin: 0 16px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
}

/* Admin Dashboard */
.admin-navbar {
    background: #fff;
    border-bottom: 2px solid #f1f5f9;
    padding: 15px 0;
}

.admin-nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-brand {
    font-size: 20px;
    font-weight: 800;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-menu {
    display: flex;
    gap: 20px;
}

.admin-menu a {
    text-decoration: none;
    color: #64748b;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.admin-section {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 30px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.admin-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.admin-section-title {
    font-size: 18px;
    font-weight: 800;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-purple {
    background: #9333ea;
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}

.btn-blue {
    background: #2563eb;
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}

.admin-item-card {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.admin-item-stats {
    font-size: 13px;
    color: #64748b;
}

.admin-item-stats div {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

.admin-btn-group {
    display: flex;
    gap: 8px;
}

.btn-action-view {
    flex: 1;
    background: #2563eb;
    color: white;
    text-align: center;
    padding: 8px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
}

.btn-action-delete {
    background: #ef4444;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.status-dot {
    width: 10px;
    height: 10px;
    background: #22c55e;
    border-radius: 50%;
}

/* New Login Page Styles */
.auth-page-bg {
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-new-card {
    background: #fff;
    width: 100%;
    max-width: 440px;
    border-radius: 24px;
    padding: 48px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    text-align: center;
}

.auth-icon-wrapper {
    width: 64px;
    height: 64px;
    background: #eff6ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.auth-new-card h2 {
    font-size: 28px;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 8px;
}

.auth-new-card p {
    color: #64748b;
    font-size: 15px;
    margin-bottom: 32px;
}

.input-with-icon {
    position: relative;
    margin-bottom: 20px;
}

.input-with-icon svg {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

.input-with-icon input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    outline: none;
    font-size: 15px;
    transition: all 0.2s;
}

.input-with-icon input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.btn-login-new {
    width: 100%;
    background: #2563eb;
    color: white;
    padding: 14px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 16px;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 10px;
}

.btn-login-new:hover {
    background: #1d4ed8;
}
