:root {
    --primary: #667eea;
    --primary-dark: #5a6fd6;
    --secondary: #764ba2;
    --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-hover: linear-gradient(135deg, #5a6fd6 0%, #6a3d96 100%);
    --primary-light: #eef0ff;
    --primary-rgb: 102, 126, 234;
    --secondary-rgb: 118, 75, 162;
    --text-primary: #2d3748;
    --text-secondary: #718096;
    --text-muted: #a0aec0;
    --bg-body: #f7f8fc;
    --bg-white: #ffffff;
    --bg-light: #f8f9fa;
    --border-color: #e2e8f0;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --border-radius-lg: 16px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
    --shadow: 0 4px 16px rgba(0,0,0,.08);
    --shadow-lg: 0 8px 32px rgba(0,0,0,.12);
    --shadow-purple: 0 4px 16px rgba(102,126,234,.25);
    --transition: all .3s ease;
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: var(--font-family);
    color: var(--text-primary);
    background: var(--bg-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}
a:hover { color: var(--secondary); }

h1, h2, h3, h4, h5, h6 { font-weight: 600; line-height: 1.4; }

img { max-width: 100%; height: auto; }

::selection { background: rgba(var(--primary-rgb), .2); color: var(--primary-dark); }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #c4c9d4; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #a0aec0; }

.header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1030;
    transition: var(--transition);
}
.header .navbar {
    padding: .6rem 0;
}
.header .navbar-brand {
    font-weight: 700;
    font-size: 1.35rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.header .navbar-brand img { height: 36px; margin-right: 8px; }
.header .nav-link {
    color: var(--text-secondary) !important;
    font-weight: 500;
    padding: .5rem 1rem !important;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
}
.header .nav-link:hover,
.header .nav-link.active {
    color: var(--primary) !important;
    background: var(--primary-light);
}
.header .nav-link i { margin-right: 4px; }
.header .search-box {
    position: relative;
    width: 320px;
}
.header .search-box .form-control {
    border-radius: 50px;
    padding-left: 40px;
    border-color: var(--border-color);
    background: var(--bg-light);
    font-size: .9rem;
    height: 40px;
}
.header .search-box .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .15);
    background: var(--bg-white);
}
.header .search-box .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}
.header .btn-upload {
    background: var(--gradient);
    color: #fff !important;
    border-radius: 50px;
    padding: .4rem 1.2rem !important;
    font-weight: 500;
    font-size: .9rem;
    transition: var(--transition);
}
.header .btn-upload:hover {
    background: var(--gradient-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-purple);
}
.header .user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
}
.header .user-avatar:hover { border-color: var(--primary); }

.navbar-login-btn {
    border-radius: 50px;
    padding: .4rem 1.2rem;
    font-weight: 500;
    font-size: .9rem;
    transition: var(--transition);
}
.navbar-login-btn:hover {
    background: rgba(255,255,255,.15);
    border-color: rgba(255,255,255,.5);
}

.navbar-user-menu {
    position: relative;
}

.navbar-user-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px 4px 4px;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 50px;
    background: rgba(255,255,255,.08);
    color: #fff;
    cursor: pointer;
    font-size: .88rem;
    font-weight: 500;
    transition: all .25s ease;
    outline: none;
    white-space: nowrap;
}
.navbar-user-trigger:hover,
.navbar-user-trigger:focus-visible {
    background: rgba(255,255,255,.18);
    border-color: rgba(255,255,255,.4);
    box-shadow: 0 0 0 3px rgba(255,255,255,.1);
}

.navbar-user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .78rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.navbar-user-name {
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.navbar-user-arrow {
    font-size: .7rem;
    transition: transform .25s ease;
    opacity: .7;
}
.navbar-user-trigger[aria-expanded="true"] .navbar-user-arrow {
    transform: rotate(180deg);
}

.navbar-user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 220px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0,0,0,.18), 0 0 0 1px rgba(0,0,0,.06);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(.96);
    transition: all .25s cubic-bezier(.4, 0, .2, 1);
    z-index: 1050;
    overflow: hidden;
}
.navbar-user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.navbar-user-dropdown-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f2ff 100%);
}

.navbar-user-dropdown-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .95rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.navbar-user-dropdown-name {
    font-size: .9rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}

.navbar-user-dropdown-role {
    font-size: .75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.navbar-user-dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0;
}

.navbar-user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 16px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: .88rem;
    font-weight: 500;
    transition: all .15s ease;
    cursor: pointer;
}
.navbar-user-dropdown-item:hover {
    background: var(--primary-light);
    color: var(--primary);
}
.navbar-user-dropdown-item i {
    width: 18px;
    text-align: center;
    font-size: 1rem;
}

.navbar-user-dropdown-item-danger {
    color: #ef4444;
}
.navbar-user-dropdown-item-danger:hover {
    background: #fef2f2;
    color: #dc2626;
}

@media (max-width: 991.98px) {
    .navbar-user-menu {
        margin-top: 8px;
    }
    .navbar-user-trigger {
        width: 100%;
        justify-content: center;
    }
    .navbar-user-dropdown {
        position: static;
        box-shadow: none;
        border-radius: 0;
        margin-top: 4px;
        background: rgba(255,255,255,.05);
    }
    .navbar-user-dropdown.show {
        display: block;
    }
    .navbar-user-dropdown-header {
        background: rgba(255,255,255,.08);
    }
    .navbar-user-dropdown-name {
        color: #fff;
    }
    .navbar-user-dropdown-role {
        color: rgba(255,255,255,.6);
    }
    .navbar-user-dropdown-item {
        color: rgba(255,255,255,.85);
    }
    .navbar-user-dropdown-item:hover {
        background: rgba(255,255,255,.1);
        color: #fff;
    }
    .navbar-user-dropdown-item-danger {
        color: #fca5a5;
    }
    .navbar-user-dropdown-item-danger:hover {
        background: rgba(239,68,68,.15);
        color: #fca5a5;
    }
    .navbar-user-dropdown-divider {
        background: rgba(255,255,255,.1);
    }
    .navbar-login-btn {
        width: 100%;
        margin-top: 8px;
    }
}

.practice-status-bar {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: rgba(255,255,255,.9);
    padding: 10px 0;
    font-size: .9rem;
    font-weight: 500;
    border-bottom: 1px solid rgba(255,255,255,.1);
}
.practice-status-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hero-banner {
    background: var(--gradient);
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
    min-height: 380px;
    display: flex;
    align-items: center;
}
.hero-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: rgba(255,255,255,.05);
}
.hero-banner::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: rgba(255,255,255,.03);
}
.hero-banner .hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}
.hero-banner .hero-desc {
    font-size: 1.1rem;
    color: rgba(255,255,255,.85);
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
    max-width: 600px;
}
.hero-banner .hero-search {
    position: relative;
    z-index: 1;
    max-width: 560px;
}
.hero-banner .hero-search .form-control {
    height: 54px;
    border-radius: 50px;
    padding-left: 24px;
    font-size: 1rem;
    border: none;
    box-shadow: 0 4px 20px rgba(0,0,0,.15);
}
.hero-banner .hero-search .form-control:focus {
    box-shadow: 0 4px 24px rgba(0,0,0,.2);
}
.hero-banner .hero-search .btn {
    position: absolute;
    right: 4px;
    top: 4px;
    height: 46px;
    border-radius: 50px;
    padding: 0 28px;
    background: var(--gradient);
    color: #fff;
    border: none;
    font-weight: 600;
    transition: var(--transition);
}
.hero-banner .hero-search .btn:hover {
    background: var(--gradient-hover);
    transform: scale(1.02);
}
.hero-banner .hero-stats {
    position: relative;
    z-index: 1;
    margin-top: 2rem;
    color: rgba(255,255,255,.9);
}
.hero-banner .hero-stats .stat-item {
    display: inline-block;
    margin-right: 2.5rem;
}
.hero-banner .hero-stats .stat-item .num {
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    display: block;
    line-height: 1.2;
}
.hero-banner .hero-stats .stat-item .label {
    font-size: .85rem;
    opacity: .8;
}

.section { padding: 3.5rem 0; }
.section .section-header { margin-bottom: 2rem; }
.section .section-header h2 { font-size: 1.6rem; font-weight: 700; }
.section .section-header p { color: var(--text-secondary); font-size: .95rem; }
.section .section-header .view-all {
    color: var(--primary);
    font-weight: 500;
    font-size: .9rem;
}
.section .section-header .view-all:hover { color: var(--secondary); }

.category-card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}
.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient);
    transform: scaleX(0);
    transition: var(--transition);
}
.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}
.category-card:hover::before { transform: scaleX(1); }
.category-card .cat-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
    color: #fff;
    background: var(--gradient);
    transition: var(--transition);
}
.category-card:hover .cat-icon {
    border-radius: 50%;
    transform: rotate(10deg);
}
.category-card h6 { font-size: .95rem; margin-bottom: .3rem; }
.category-card p { font-size: .8rem; color: var(--text-muted); margin: 0; }

.material-card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    padding: 1.2rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.material-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    border-color: transparent;
}
.material-card .card-header-info {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: .8rem;
}
.material-card .file-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
    background: var(--bg-light);
}
.material-card .file-icon.pdf { background: #fff5f5; color: #e53e3e; }
.material-card .file-icon.doc { background: #ebf4ff; color: #3182ce; }
.material-card .file-icon.ppt { background: #fffbeb; color: #d69e2e; }
.material-card .file-icon.img { background: #e6fffa; color: #319795; }
.material-card .file-icon.zip { background: #f0f4ff; color: #667eea; }
.material-card .card-title {
    font-size: .95rem;
    font-weight: 600;
    margin-bottom: .3rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}
.material-card .card-title a { color: var(--text-primary); }
.material-card .card-title a:hover { color: var(--primary); }
.material-card .card-meta { font-size: .8rem; color: var(--text-secondary); }
.material-card .card-meta span { margin-right: 12px; }
.material-card .card-meta i { margin-right: 3px; }
.material-card .card-footer-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: .8rem;
    border-top: 1px solid var(--border-color);
    margin-top: .6rem;
}
.material-card .card-footer-info .user { font-size: .8rem; color: var(--text-secondary); }
.material-card .card-footer-info .user img {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    margin-right: 5px;
    object-fit: cover;
}
.material-card .card-footer-info .actions a {
    color: var(--text-muted);
    font-size: .85rem;
    margin-left: 10px;
    transition: var(--transition);
}
.material-card .card-footer-info .actions a:hover { color: var(--primary); }
.material-card .card-footer-info .actions a.favorited { color: #e53e3e; }

.material-card-list {
    background: var(--bg-white);
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
    padding: 1rem 1.2rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 16px;
}
.material-card-list:hover {
    background: var(--primary-light);
    border-color: rgba(var(--primary-rgb), .2);
}

.btn {
    font-weight: 500;
    padding: .5rem 1.25rem;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
    font-size: .9rem;
}
.btn-primary {
    background: var(--gradient);
    border: none;
    color: #fff;
}
.btn-primary:hover {
    background: var(--gradient-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-purple);
    color: #fff;
}
.btn-outline-primary {
    border: 2px solid var(--primary);
    color: var(--primary);
    background: transparent;
}
.btn-outline-primary:hover {
    background: var(--gradient);
    border-color: transparent;
    color: #fff;
    transform: translateY(-1px);
}
.btn-gradient {
    background: var(--gradient);
    color: #fff;
    border: none;
    position: relative;
    overflow: hidden;
}
.btn-gradient::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.2), transparent);
    transition: .5s;
}
.btn-gradient:hover::after { left: 100%; }
.btn-gradient:hover { color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-purple); }
.btn-sm { padding: .3rem .8rem; font-size: .82rem; }
.btn-lg { padding: .65rem 1.75rem; font-size: 1rem; }
.btn-rounded { border-radius: 50px; }
.btn-icon { width: 36px; height: 36px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; }

.form-control, .form-select {
    border-radius: var(--border-radius-sm);
    border: 1.5px solid var(--border-color);
    padding: .55rem .9rem;
    font-size: .9rem;
    transition: var(--transition);
    font-family: var(--font-family);
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .12);
}
.form-control::placeholder { color: var(--text-muted); }
.form-label { font-weight: 500; font-size: .9rem; color: var(--text-primary); margin-bottom: .35rem; }
.form-text { font-size: .8rem; color: var(--text-muted); }
.form-group { margin-bottom: 1.2rem; }
.form-floating > label { padding: .55rem .9rem; }
textarea.form-control { min-height: 100px; resize: vertical; }
.form-control.is-invalid { border-color: #e53e3e; }
.form-control.is-invalid:focus { box-shadow: 0 0 0 3px rgba(229,62,62,.15); }

.badge {
    font-weight: 500;
    padding: .3em .65em;
    border-radius: 50px;
    font-size: .75rem;
}
.badge.bg-primary { background: var(--gradient) !important; }
.tag {
    display: inline-block;
    padding: .2rem .65rem;
    border-radius: 50px;
    font-size: .78rem;
    background: var(--primary-light);
    color: var(--primary);
    margin-right: 4px;
    margin-bottom: 4px;
    transition: var(--transition);
    cursor: pointer;
}
.tag:hover { background: var(--primary); color: #fff; }

.pagination .page-link {
    border: none;
    color: var(--text-secondary);
    border-radius: var(--border-radius-sm);
    margin: 0 2px;
    padding: .4rem .85rem;
    font-size: .88rem;
    font-weight: 500;
    transition: var(--transition);
}
.pagination .page-link:hover {
    background: var(--primary-light);
    color: var(--primary);
}
.pagination .page-item.active .page-link {
    background: var(--gradient);
    color: #fff;
    box-shadow: var(--shadow-purple);
}
.pagination .page-item.disabled .page-link {
    color: var(--text-muted);
    background: transparent;
}

.sidebar {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    overflow: hidden;
}
.sidebar .sidebar-header {
    padding: 1.2rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}
.sidebar .sidebar-header .avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-light);
    margin-bottom: .5rem;
}
.sidebar .sidebar-header h6 { font-size: .95rem; margin-bottom: .2rem; }
.sidebar .sidebar-header p { font-size: .8rem; color: var(--text-secondary); margin: 0; }
.sidebar .nav-list { list-style: none; padding: 0; margin: 0; }
.sidebar .nav-list li { border-bottom: 1px solid var(--border-color); }
.sidebar .nav-list li:last-child { border-bottom: none; }
.sidebar .nav-list a {
    display: flex;
    align-items: center;
    padding: .75rem 1.2rem;
    color: var(--text-secondary);
    font-size: .9rem;
    transition: var(--transition);
    gap: 10px;
}
.sidebar .nav-list a i { font-size: 1.1rem; width: 20px; text-align: center; }
.sidebar .nav-list a:hover { background: var(--primary-light); color: var(--primary); }
.sidebar .nav-list a.active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
    border-right: 3px solid var(--primary);
}

.dashboard-panel {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    transition: var(--transition);
}
.dashboard-panel:hover { box-shadow: var(--shadow); }
.dashboard-panel .panel-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: .8rem;
    border-bottom: 1px solid var(--border-color);
}

.table { margin-bottom: 0; }
.table thead th {
    font-weight: 600;
    font-size: .83rem;
    color: var(--text-secondary);
    border-bottom-width: 1px;
    padding: .75rem .9rem;
    white-space: nowrap;
}
.table td {
    padding: .7rem .9rem;
    font-size: .88rem;
    vertical-align: middle;
}
.table-hover tbody tr:hover { background: var(--primary-light); }

.modal-content {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
}
.modal-header {
    border-bottom: 1px solid var(--border-color);
    padding: 1.2rem 1.5rem;
}
.modal-header .modal-title { font-weight: 600; font-size: 1.05rem; }
.modal-body { padding: 1.5rem; }
.modal-footer { border-top: 1px solid var(--border-color); padding: 1rem 1.5rem; }
.modal .btn-close:focus { box-shadow: none; }

.toast-container { z-index: 9999; }
.toast {
    border: none;
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-lg);
    animation: slideInRight .3s ease;
}
.toast .toast-header { border-radius: var(--border-radius-sm) var(--border-radius-sm) 0 0; }
.toast .toast-body { font-size: .9rem; padding: .75rem 1rem; }

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9998;
    backdrop-filter: blur(2px);
}
.loading-overlay .loading-spinner { text-align: center; }
.loading-overlay .spinner-border { width: 3rem; height: 3rem; }

.file-types .type-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    background: var(--bg-light);
    margin-bottom: .3rem;
}
.file-types .type-label { font-size: .78rem; color: var(--text-secondary); }

.rating-stars { color: #ecc94b; font-size: .9rem; }
.rating-stars .star { cursor: pointer; transition: var(--transition); }
.rating-stars .star:hover { transform: scale(1.2); }

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}
.user-avatar-sm { width: 32px; height: 32px; }
.user-avatar-lg { width: 72px; height: 72px; }
.user-avatar-xl { width: 100px; height: 100px; border: 4px solid var(--primary-light); }
.user-avatar-rounded { border-radius: var(--border-radius); }

.footer {
    background: #1a202c;
    color: rgba(255,255,255,.7);
    padding: 3rem 0 1.5rem;
    margin-top: 3rem;
}
.footer h5 {
    color: #fff;
    font-size: 1rem;
    margin-bottom: 1rem;
    font-weight: 600;
}
.footer a { color: rgba(255,255,255,.6); font-size: .88rem; }
.footer a:hover { color: #fff; }
.footer .footer-links { list-style: none; padding: 0; }
.footer .footer-links li { margin-bottom: .5rem; }
.footer .footer-bottom {
    border-top: 1px solid rgba(255,255,255,.1);
    padding-top: 1.5rem;
    margin-top: 2rem;
    font-size: .85rem;
    text-align: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}
@keyframes shimmer {
    0% { background-position: -200px 0; }
    100% { background-position: calc(200px + 100%) 0; }
}
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.animate-fade-in { animation: fadeIn .5s ease; }
.animate-fade-in-up { animation: fadeInUp .5s ease; }
.animate-slide-up { animation: slideUp .5s ease; }
.animate-pulse { animation: pulse 2s ease-in-out infinite; }

.skeleton {
    background: var(--bg-light);
    border-radius: var(--border-radius-sm);
    position: relative;
    overflow: hidden;
}
.skeleton::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.6), transparent);
    background-size: 200px 100%;
    animation: shimmer 1.5s ease-in-out infinite;
}
.skeleton-text { height: 14px; margin-bottom: 8px; width: 80%; }
.skeleton-text.short { width: 50%; }
.skeleton-text.long { width: 100%; }
.skeleton-avatar { width: 44px; height: 44px; border-radius: 50%; }
.skeleton-thumbnail { width: 100%; height: 140px; border-radius: var(--border-radius-sm); }
.skeleton-card { height: 200px; border-radius: var(--border-radius); }

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
}
.empty-state i { font-size: 3rem; color: var(--text-muted); margin-bottom: 1rem; display: block; }
.empty-state h5 { color: var(--text-secondary); font-size: 1.1rem; }
.empty-state p { color: var(--text-muted); font-size: .9rem; }

@media (max-width: 991.98px) {
    .header .search-box { width: 200px; }
    .hero-banner { padding: 3rem 0; min-height: auto; }
    .hero-banner .hero-title { font-size: 1.8rem; }
    .hero-banner .hero-stats .stat-item { margin-right: 1.5rem; }
    .hero-banner .hero-stats .stat-item .num { font-size: 1.4rem; }
}

@media (max-width: 767.98px) {
    .header .search-box { width: 100%; margin: .5rem 0; }
    .header .navbar-collapse { padding-top: .5rem; }
    .hero-banner { padding: 2.5rem 0; }
    .hero-banner .hero-title { font-size: 1.5rem; }
    .hero-banner .hero-desc { font-size: .95rem; }
    .hero-banner .hero-stats .stat-item { margin-right: 1rem; }
    .hero-banner .hero-stats .stat-item .num { font-size: 1.2rem; }
    .section { padding: 2rem 0; }
    .section .section-header h2 { font-size: 1.3rem; }
    .material-card { padding: 1rem; }
    .footer { padding: 2rem 0 1rem; }
}

@media (max-width: 575.98px) {
    .container { padding-left: 16px; padding-right: 16px; }
    .hero-banner .hero-title { font-size: 1.3rem; }
    .hero-banner .hero-search .form-control { height: 46px; font-size: .9rem; }
    .hero-banner .hero-search .btn { height: 38px; padding: 0 18px; font-size: .85rem; }
}

.login-page { min-height: 100vh; display: flex; align-items: center; background: var(--bg-body); }
.login-page .login-card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    padding: 2.5rem;
    border: 1px solid var(--border-color);
}
.login-page .login-card .login-header { text-align: center; margin-bottom: 2rem; }
.login-page .login-card .login-header h3 {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}
.login-page .login-bg {
    background: var(--gradient);
    border-radius: var(--border-radius);
    padding: 3rem;
    color: #fff;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.login-page .login-bg h2 { font-weight: 700; font-size: 2rem; }
.login-page .login-bg p { opacity: .85; }
