/* ============================================
   KomilUsmonDev - TO'LIQ STYLE.CSS (LIGHT THEME)
   BARCHA ELEMENTLAR HTML BILAN MOS
   ============================================ */

:root {
    /* ASOSIY RANGLAR */
    --primary-color: #1a3c6e;
    --primary-dark: #0f2647;
    --primary-light: #2a5ca0;
    --accent-color: #e8a817;
    --accent-hover: #c98f14;
    --text-dark: #1a1a1a;
    --text-light: #6c757d;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --bg-dark: #0a0f1a;
    --border-color: #e0e0e0;
    --success-color: #28a745;
    
    /* SHRIFTLAR */
    --font-primary: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-heading: 'Georgia', 'Times New Roman', serif;
    
    /* O'LCHAMLAR */
    --navbar-height: 80px;
    --container-max: 1200px;
    --border-radius: 12px;
    --transition: all 0.3s ease;
    
    /* KURS RANGLARI */
    --color-python: #3776AB;
    --color-web: #E34F26;
    --color-javascript: #F7DF1E;
    --color-sql: #336791;
    --color-ai: #8B5CF6;
    --color-flutter: #02569B;
    --color-cyber: #EF4444;
    --color-uxui: #F97316;
    
    /* DARAJA RANGLARI */
    --level-beginner: #10B981;
    --level-intermediate: #F59E0B;
    --level-advanced: #EF4444;
}

/* ============================================
   RESET VA UMUMIY SOZLAMALAR
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    color: var(--text-dark);
    line-height: 1.7;
    background-color: var(--bg-white);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--primary-dark);
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--accent-color);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   HEADER & NAVIGATSIYA
   ============================================ */
.header {
    background: rgba(10, 15, 26, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 2px 20px rgba(0,0,0,0.3);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    transition: var(--transition);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
    max-width: var(--container-max);
    margin: 0 auto;
    height: var(--navbar-height);
}

/* LOGO */
.logo h1 {
    font-size: 1.5em;
    font-weight: 900;
    background: linear-gradient(135deg, #ffffff 0%, #93C5FD 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    cursor: pointer;
    transition: var(--transition);
}

.logo h1:hover {
    transform: scale(1.05);
}

/* NAV LINKS */
.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-links a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 600;
    font-size: 15px;
    position: relative;
    padding: 8px 0;
    transition: var(--transition);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: var(--transition);
}

.nav-links a:hover {
    color: white;
}

.nav-links a:hover::after {
    width: 100%;
}

/* LOGIN BUTTON */
.btn-login {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 22px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(26, 60, 110, 0.3);
}

.btn-login:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(26, 60, 110, 0.5);
}

/* MOBIL MENU */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.mobile-menu-btn span {
    width: 28px;
    height: 3px;
    background: white;
    border-radius: 3px;
    transition: var(--transition);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #0d1b2a 50%, #1b2838 100%);
    padding: 120px 0 80px;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: rgba(26, 60, 110, 0.3);
    border-radius: 50%;
    filter: blur(60px);
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: -80px;
    width: 300px;
    height: 300px;
    background: rgba(232, 168, 23, 0.1);
    border-radius: 50%;
    filter: blur(80px);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
    margin: 0 auto;
    padding: 0 20px;
    animation: fadeInUp 1s ease;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 20px;
    color: white;
    text-shadow: 0 2px 20px rgba(0,0,0,0.5);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 35px;
    color: rgba(255, 255, 255, 0.85);
}

.cta-button {
    background: var(--accent-color);
    color: var(--primary-dark);
    border: none;
    padding: 16px 40px;
    font-size: 1.1rem;
    font-weight: 800;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 20px rgba(232, 168, 23, 0.4);
}

.cta-button:hover {
    background: var(--accent-hover);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(232, 168, 23, 0.6);
}

/* ============================================
   SECTION HEADER
   ============================================ */
.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--primary-dark);
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--accent-color);
    border-radius: 2px;
}

.section-header p {
    color: var(--text-light);
    font-size: 1.1rem;
    margin-top: 15px;
}

/* ============================================
   SEARCH & FILTER
   ============================================ */
.search-filter {
    background: white;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 80px;
    z-index: 99;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

.search-filter .container {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.search-filter input {
    flex: 1;
    min-width: 250px;
    padding: 12px 20px 12px 42px;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    font-size: 14px;
    color: var(--text-dark);
    outline: none;
    transition: var(--transition);
}

.search-filter input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(26, 60, 110, 0.08);
}

.search-filter input::placeholder {
    color: var(--text-light);
}

.search-filter select {
    padding: 12px 20px;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    font-size: 14px;
    color: var(--text-dark);
    outline: none;
    cursor: pointer;
    transition: var(--transition);
    min-width: 220px;
}

.search-filter select:focus {
    border-color: var(--primary-color);
}

/* ============================================
   YANGILIKLAR BO'LIMI
   ============================================ */
.news-section {
    padding: 80px 0;
    background: var(--bg-light);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 30px;
}

.news-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    border-color: var(--primary-light);
}

.news-card-image {
    height: 200px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: white;
    background-color: var(--primary-light);
}

.news-card-placeholder {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: white;
}

.news-card-body {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.news-date {
    font-size: 12px;
    color: var(--text-light);
}

.news-card-body h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-dark);
    line-height: 1.4;
}

.news-card-body p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
    flex: 1;
}

.news-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    font-size: 13px;
    color: var(--text-light);
}

.read-more {
    color: var(--primary-color);
    font-weight: 700;
    transition: var(--transition);
}

.news-card:hover .read-more {
    color: var(--accent-color);
}

/* ============================================
   KURSLAR BO'LIMI
   ============================================ */
.courses {
    padding: 80px 0;
    background: var(--bg-white);
}

.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

/* Video Card */
.video-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 15px rgba(0,0,0,0.04);
}

.video-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-light);
}

.video-thumbnail {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, #e9ecef, #dee2e6);
}

.video-thumbnail-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.video-card:hover .video-thumbnail-img {
    transform: scale(1.05);
}

.video-thumbnail-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
}

.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.play-overlay span {
    font-size: 40px;
    background: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
}

.video-card:hover .play-overlay {
    opacity: 1;
}

.duration-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.video-info {
    padding: 20px;
}

.video-info h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-dark);
    line-height: 1.4;
}

.video-info p {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 12px;
}

.video-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.category-badge {
    background: rgba(26, 60, 110, 0.1);
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
}

.date {
    font-size: 12px;
    color: var(--text-light);
}

.level-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    margin-top: 8px;
}

.level-beginner {
    background: rgba(16, 185, 129, 0.1);
    color: var(--level-beginner);
}

.level-intermediate {
    background: rgba(245, 158, 11, 0.1);
    color: var(--level-intermediate);
}

.level-advanced {
    background: rgba(239, 68, 68, 0.1);
    color: var(--level-advanced);
}

/* ============================================
   BIZ HAQIMIZDA BO'LIMI
   ============================================ */
.about-section {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--primary-dark), #1a2a3a);
    text-align: center;
    color: white;
}

.about-content {
    max-width: 700px;
    margin: 0 auto;
}

.about-content h2 {
    color: white;
    font-size: 2.2rem;
    margin-bottom: 20px;
}

.about-content h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--accent-color);
    margin: 15px auto;
    border-radius: 2px;
}

.about-content p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.1rem;
    line-height: 1.8;
}

/* ============================================
   MODAL (UMUMIY)
   ============================================ */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    margin: 40px auto;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 900px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.3);
    animation: slideUp 0.4s ease;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.close-modal {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 30px;
    font-weight: bold;
    color: var(--text-light);
    cursor: pointer;
    z-index: 10;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--bg-light);
    transition: var(--transition);
    border: none;
}

.close-modal:hover {
    background: #EF4444;
    color: white;
}

/* Video Modal */
.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-details {
    padding: 25px;
}

.video-details h2 {
    color: var(--primary-dark);
    margin-bottom: 15px;
    font-size: 1.5rem;
    font-weight: 800;
}

.video-details p {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 15px;
}

/* Yangilik Modal */
.news-modal-content {
    max-width: 700px;
}

.news-modal-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.news-modal-body {
    padding: 25px;
}

.news-modal-body h2 {
    color: var(--primary-dark);
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 15px;
    line-height: 1.3;
}

.news-modal-meta {
    display: flex;
    gap: 20px;
    margin: 15px 0;
    color: var(--text-light);
    font-size: 14px;
    flex-wrap: wrap;
}

.news-modal-text {
    line-height: 1.8;
    color: var(--text-dark);
    font-size: 16px;
    margin-top: 20px;
}

.news-modal-text p {
    margin-bottom: 15px;
}

/* Login Modal */
.login-modal {
    max-width: 450px;
    padding: 40px;
}

.login-modal h2 {
    text-align: center;
    color: var(--primary-dark);
    margin-bottom: 30px;
    font-size: 1.5rem;
    font-weight: 800;
}

.login-modal input {
    width: 100%;
    padding: 12px 15px;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 15px;
    color: var(--text-dark);
    margin-bottom: 15px;
    outline: none;
    transition: var(--transition);
}

.login-modal input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(26, 60, 110, 0.1);
}

.login-modal button {
    width: 100%;
    padding: 14px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.login-modal button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.success-message {
    background: rgba(16, 185, 129, 0.1);
    color: var(--level-beginner);
    padding: 12px;
    border-radius: 10px;
    margin-top: 15px;
    text-align: center;
    font-weight: 700;
}

.error-message {
    background: rgba(239, 68, 68, 0.1);
    color: var(--level-advanced);
    padding: 12px;
    border-radius: 10px;
    margin-top: 15px;
    text-align: center;
    font-weight: 700;
}

/* ============================================
   LOADING & BO'SH HOLATLAR
   ============================================ */
.loading, .no-videos, .no-news {
    text-align: center;
    padding: 60px 0;
    color: var(--text-light);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    margin: 0 auto 15px;
    animation: spin 1s linear infinite;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--bg-dark);
    color: rgba(255, 255, 255, 0.7);
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    font-size: 1.3rem;
    font-weight: 800;
    color: white;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--accent-color);
    border-radius: 2px;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.8;
    font-size: 0.95rem;
}

.footer-section a {
    display: block;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 10px;
    font-size: 0.95rem;
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--accent-color);
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.9rem;
}

/* ============================================
   SCROLL TO TOP
   ============================================ */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: var(--transition);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
}

/* ============================================
   ANIMATSIYALAR
   ============================================ */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: var(--primary-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-color); }

::selection { background: var(--primary-color); color: white; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .hero h1 { font-size: 2.5rem; }
    .videos-grid, .news-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .mobile-menu-btn { display: flex; }
    
    .nav-links {
        display: none;
        position: absolute;
        top: 80px;
        left: 0;
        right: 0;
        background: rgba(10, 15, 26, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 30px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.5);
        gap: 15px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .nav-links.active { display: flex; }
    
    .hero { padding: 100px 0 60px; min-height: 70vh; }
    .hero h1 { font-size: 2rem; }
    
    .videos-grid, .news-grid { grid-template-columns: 1fr; }
    .search-filter .container { flex-direction: column; }
    
    .section-header h2 { font-size: 1.8rem; }
    
    .footer-content { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 1.5rem; }
    .hero p { font-size: 1rem; }
    .cta-button { padding: 12px 30px; font-size: 1rem; }
    .section-header h2 { font-size: 1.5rem; }
    .login-modal { padding: 25px; }
    .logo h1 { font-size: 1.2rem; }
}
