/* Fast Exam - Mobile CSS */

:root {
    --primary-color: #0B5FFF;
    --accent-color: #FF7A59;
    --neutral-bg: #F6F8FB;
    --text-muted: #6B7280;
    --border-color: #E5E7EB;
}

* {
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    background-color: var(--neutral-bg);
    padding-bottom: 70px;
}

/* Top Header */
.top-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0847B3 100%);
    color: white;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.top-header .logo {
    color: white;
    text-decoration: none;
    font-size: 1.25rem;
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 140px);
    padding-top: 10px;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.bottom-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.75rem;
    padding: 4px 12px;
    min-width: 44px;
    min-height: 44px;
    transition: all 0.2s;
}

.bottom-nav .nav-item i {
    font-size: 1.5rem;
    margin-bottom: 2px;
}

.bottom-nav .nav-item.active {
    color: var(--primary-color);
}

.bottom-nav .nav-item:hover {
    color: var(--primary-color);
}

/* Quick Link Cards */
.quick-link-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 12px;
    padding: 20px;
    text-decoration: none;
    color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
    min-height: 100px;
}

.quick-link-card i {
    font-size: 2rem;
    margin-bottom: 8px;
}

.quick-link-card span {
    font-size: 0.875rem;
    font-weight: 500;
}

.quick-link-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(11, 95, 255, 0.15);
}

/* Feature Cards with Colored Icons */
.feature-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 5px;
    padding: 10px 15px;
    text-decoration: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    min-height: 140px;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--card-color, #0B5FFF), var(--card-color-light, #4A90FF));
    opacity: 0;
    transition: opacity 0.3s;
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.feature-icon-wrapper {
    width: 55px;
    height: 55px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    transition: transform 0.3s;
}

.feature-card:hover .feature-icon-wrapper {
    transform: scale(1.1);
}

.feature-icon-wrapper img {
    width: 45px;
    height: 45px;
    object-fit: contain;
}

.feature-card-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
    text-align: center;
    margin: 0;
    line-height: 1.3;
}

/* Category Scroll */
.category-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.category-scroll::-webkit-scrollbar {
    display: none;
}

.category-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    text-decoration: none;
    color: #374151;
    font-size: 0.875rem;
    white-space: nowrap;
    transition: all 0.2s;
}

.category-chip:hover,
.category-chip.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Course Cards */
.course-scroll {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.course-scroll::-webkit-scrollbar {
    display: none;
}

.course-card-horizontal {
    flex: 0 0 280px;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
}

.course-card-horizontal:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.course-card-horizontal img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.course-card-horizontal .course-info {
    padding: 12px;
}

.course-card-horizontal a {
    text-decoration: none;
    color: inherit;
}

.course-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
}

.course-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.course-card a {
    text-decoration: none;
    color: inherit;
}

.course-thumbnail {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
}

.course-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.badge-discount {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--accent-color);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-level {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
}

.course-body {
    padding: 16px;
}

.course-body h6 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.4;
}

.rating {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.875rem;
    font-weight: 500;
}

.price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

.original-price {
    font-size: 0.875rem;
    text-decoration: line-through;
    color: var(--text-muted);
    margin-left: 8px;
}

/* Course Header */
.course-header {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.course-header img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.course-header-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 20px 0;
}

/* Sticky Purchase Bar */
.sticky-purchase-bar {
    position: fixed;
    bottom: 70px;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid var(--border-color);
    padding: 12px 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 999;
}

/* Avatar */
.avatar-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.125rem;
}

.avatar-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 2.5rem;
    overflow: hidden;
}

.avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Auth Page */
.auth-page {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0847B3 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-container {
    background: white;
    border-radius: 16px;
    padding: 32px 24px;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

/* Cards */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Buttons */
.btn {
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 500;
    min-height: 44px;
}

.btn-primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background: #0847B3;
    border-color: #0847B3;
}

/* Form Controls */
.form-control,
.form-select {
    border-radius: 8px;
    border: 1px solid var(--border-color);
    padding: 10px 14px;
    min-height: 44px;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(11, 95, 255, 0.15);
}

/* Carousel */
.carousel-item img {
    height: 200px;
    object-fit: cover;
}

.carousel-caption {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    bottom: 0;
    left: 0;
    right: 0;
    padding-bottom: 20px;
}

/* Responsive */
@media (min-width: 768px) {
    body {
        padding-bottom: 0;
    }
    
    .bottom-nav {
        display: none;
    }
    
    .sticky-purchase-bar {
        bottom: 0;
    }
    
    .course-thumbnail {
        height: 200px;
    }
}

/* Utilities */
.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.text-muted {
    color: var(--text-muted) !important;
}

/* Course Card Small */
.course-card-sm {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.course-card-sm img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.course-card-sm a {
    text-decoration: none;
    color: inherit;
}

/* Filter Bar */
.filter-bar {
    background: white;
    padding: 12px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* File Icon */
.file-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}
