@font-face {
    font-family: 'UKIJ Esliye';
    src: url('../fonts/UKIJEsliye.woff2') format('woff2'),
         url('../fonts/UKIJEsliye.woff') format('woff'),
         url('../fonts/UKI') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'UKIJ Tuz';
    src: url('../fonts/UKI') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'ALKATIP Tor';
    src: url('../fonts/ALKATIP_Tor') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* ئاساسىي ئۇسلۇب */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'UKIJ Esliye', 'UKIJ Tuz', 'ALKATIP Tor', 'Microsoft Uighur', 'Noto Sans SC', 'Microsoft YaHei', 'SimHei', 'PingFang SC', 'Hiragino Sans GB', 'WenQuanYi Micro Hei', Arial, sans-serif; direction: rtl; background: #f0f4f8; color: #1a202c; line-height: 1.6; unicode-bidi: plaintext; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body[dir="ltr"] { direction: ltr; font-family: 'Noto Sans SC', 'Microsoft YaHei', 'SimHei', 'PingFang SC', 'Hiragino Sans GB', 'WenQuanYi Micro Hei', 'Microsoft Uighur', 'UKIJ Esliye', 'UKIJ Tuz', Arial, sans-serif; }
a { text-decoration: none; color: inherit; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Navbar */
.navbar { background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.08); position: sticky; top: 0; z-index: 100; }
.navbar .container { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.nav-brand a { font-size: 24px; font-weight: bold; color: #0d9488; }
.nav-menu { display: flex; gap: 20px; align-items: center; }
.nav-menu a { color: #475569; font-size: 15px; transition: color 0.2s; }
.nav-menu a:hover { color: #0d9488; }
.nav-lang { display: flex; align-items: center; gap: 8px; margin-left: 12px; padding: 6px 12px; background: #f8fafc; border-radius: 20px; border: 1px solid #e2e8f0; }
.nav-lang .lang-btn { padding: 7px 16px; font-size: 15px; border: 1px solid #cbd5e1; border-radius: 12px; cursor: pointer; transition: all 0.2s; font-weight: 600; font-family: 'Noto Sans SC', 'Microsoft YaHei', 'SimHei', 'Microsoft Uighur', 'UKIJ Tuz', Arial, sans-serif !important; line-height: 1.4; }
.nav-lang .lang-btn.active { background: #0d9488 !important; color: #fff !important; border-color: #0d9488 !important; }
.nav-lang .lang-btn:not(.active) { background: #fff !important; color: #334155 !important; border-color: #cbd5e1 !important; }
.nav-lang .lang-btn:not(.active):hover { background: #f0fdf4 !important; color: #0d9488 !important; border-color: #0d9488 !important; }
.nav-links { display: flex; align-items: center; gap: 16px; }

/* Buttons */
.btn-primary { background: #0d9488; color: #fff !important; padding: 8px 20px; border-radius: 8px; border: none; cursor: pointer; font-size: 14px; transition: background 0.2s; display: inline-block; }
.btn-primary:hover { background: #0f766e; }
.btn-logout { color: #ef4444 !important; }
.btn-large { padding: 12px 32px; font-size: 16px; }
.btn-block { display: block; width: 100%; text-align: center; }
.btn-outline { background: transparent; border: 2px solid #0d9488; color: #0d9488 !important; }
.btn-outline:hover { background: #0d9488; color: #fff !important; }

/* Hero */
.hero { background: linear-gradient(135deg, #0d9488, #14b8a6); color: #fff; padding: 60px 0; text-align: center; }
.hero h1 { font-size: 36px; margin-bottom: 12px; }
.hero p { font-size: 18px; opacity: 0.9; }

/* Categories */
.categories { padding: 40px 0; }
.categories h2 { text-align: center; font-size: 24px; margin-bottom: 24px; }
.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.category-card { background: #fff; border-radius: 12px; padding: 20px 12px; text-align: center; box-shadow: 0 2px 8px rgba(0,0,0,0.06); transition: transform 0.2s, box-shadow 0.2s; }
.category-card:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,0.1); }
.category-icon { margin-bottom: 8px; }
.category-icon svg { width: 36px; height: 36px; color: #0d9488; }
.category-name { font-size: 14px; font-weight: bold; color: #1a202c; }
.category-count { font-size: 12px; color: #94a3b8; margin-top: 4px; }

/* Contracts */
.contracts { padding: 40px 0; }
.contracts h2 { text-align: center; font-size: 24px; margin-bottom: 24px; }
.contract-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.contract-card { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.06); transition: transform 0.2s; }
.contract-card:hover { transform: translateY(-2px); }
.contract-banner { background: linear-gradient(135deg, #0d9488, #14b8a6); height: 80px; display: flex; align-items: center; justify-content: center; }
.contract-icon { font-size: 32px; }
.contract-info { padding: 16px; }
.contract-category { display: inline-block; background: #f0fdf4; color: #0d9488; padding: 2px 10px; border-radius: 12px; font-size: 12px; margin-bottom: 8px; }
.contract-info h3 { font-size: 16px; margin-bottom: 6px; }
.contract-info p { font-size: 13px; color: #64748b; margin-bottom: 12px; }
.contract-meta { display: flex; gap: 12px; font-size: 12px; color: #94a3b8; margin-bottom: 12px; }
.contract-footer { display: flex; justify-content: space-between; align-items: center; }
.contract-price { font-size: 20px; font-weight: bold; color: #0d9488; }

/* Ad Banner */
.ad-banner { padding: 16px 0; text-align: center; }
.ad-banner img { max-width: 100%; border-radius: 8px; }
.ad-text { background: #fef3c7; padding: 12px; border-radius: 8px; color: #92400e; }

/* Footer */
.footer { background: #1e293b; color: #94a3b8; padding: 24px 0; text-align: center; font-size: 14px; margin-top: 40px; }

/* Form */
.form-container { max-width: 480px; margin: 40px auto; background: #fff; padding: 32px; border-radius: 16px; box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.form-container h2 { text-align: center; margin-bottom: 24px; font-size: 24px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: bold; font-size: 14px; color: #1e293b; }
.form-group input, .form-group textarea, .form-group select { width: 100%; padding: 10px 14px; border: 1px solid #e2e8f0; border-radius: 8px; font-size: 14px; direction: rtl; text-align: right; color: #1e293b; font-family: 'Microsoft Uighur', 'UKIJ Tuz', 'Scheherazade', Arial, sans-serif; background: #fff; }
.form-group input::placeholder, .form-group textarea::placeholder { color: #94a3b8; }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: #0d9488; box-shadow: 0 0 0 3px rgba(13,148,136,0.1); }
.form-error { color: #ef4444; font-size: 13px; margin-top: 4px; }
.form-success { color: #10b981; font-size: 13px; margin-top: 4px; }

/* Profile */
.profile-container { max-width: 800px; margin: 40px auto; }
.profile-header { background: #fff; padding: 24px; border-radius: 16px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); margin-bottom: 20px; display: flex; align-items: center; gap: 20px; }
.profile-avatar { width: 80px; height: 80px; border-radius: 50%; background: linear-gradient(135deg, #0d9488, #14b8a6); display: flex; align-items: center; justify-content: center; font-size: 32px; color: #fff; }
.profile-info h2 { font-size: 22px; }
.profile-info p { color: #64748b; font-size: 14px; }
.profile-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.stat-card { background: #fff; padding: 20px; border-radius: 12px; text-align: center; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.stat-card .stat-value { font-size: 28px; font-weight: bold; color: #0d9488; }
.stat-card .stat-label { font-size: 13px; color: #64748b; }

/* VIP */
.vip-container { max-width: 900px; margin: 40px auto; }
.vip-header { text-align: center; padding: 40px 20px; background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff; border-radius: 16px; margin-bottom: 24px; }
.vip-header h1 { font-size: 32px; margin-bottom: 8px; }
.vip-plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.vip-plan { background: #fff; border-radius: 16px; padding: 24px; text-align: center; box-shadow: 0 2px 8px rgba(0,0,0,0.06); border: 2px solid transparent; transition: border-color 0.2s; }
.vip-plan.featured { border-color: #f59e0b; transform: scale(1.05); }
.vip-plan h3 { font-size: 20px; margin-bottom: 8px; }
.vip-plan .price { font-size: 36px; font-weight: bold; color: #f59e0b; }
.vip-plan .period { font-size: 14px; color: #64748b; }
.vip-plan ul { list-style: none; margin: 16px 0; text-align: right; }
.vip-plan ul li { padding: 6px 0; font-size: 14px; color: #475569; }
.vip-plan ul li::before { content: "✓ "; color: #10b981; }

/* Contract Detail */
.detail-container { max-width: 900px; margin: 40px auto; display: grid; grid-template-columns: 1fr 300px; gap: 24px; }
.detail-main { background: #fff; border-radius: 16px; padding: 24px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.detail-sidebar { position: sticky; top: 80px; }
.detail-title { font-size: 24px; margin-bottom: 16px; }
.detail-meta { display: flex; gap: 16px; color: #64748b; font-size: 14px; margin-bottom: 20px; }
.detail-content { background: #f8fafc; padding: 20px; border-radius: 12px; font-size: 15px; line-height: 1.8; white-space: pre-wrap; position: relative; overflow: hidden; }
.detail-price-box { background: #fff; border-radius: 16px; padding: 24px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.detail-price { font-size: 32px; font-weight: bold; color: #0d9488; text-align: center; margin-bottom: 16px; }
.watermark { position: absolute; top: 0; left: 0; right: 0; bottom: 0; pointer-events: none; z-index: 1; }
.watermark-text { position: absolute; font-size: 48px; color: rgba(13,148,136,0.15); transform: rotate(-30deg); white-space: nowrap; }

/* Upload */
.upload-container { max-width: 700px; margin: 40px auto; background: #fff; padding: 32px; border-radius: 16px; box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.upload-container h2 { text-align: center; margin-bottom: 24px; }
.upload-area { border: 2px dashed #e2e8f0; border-radius: 12px; padding: 40px; text-align: center; cursor: pointer; transition: border-color 0.2s; margin-bottom: 20px; }
.upload-area:hover { border-color: #0d9488; }
.upload-area p { color: #64748b; }

/* Admin */
.admin-container { display: flex; min-height: 100vh; }
.admin-sidebar { width: 220px; background: #1e293b; color: #fff; padding: 20px 0; position: fixed; right: 0; top: 0; bottom: 0; }
.admin-sidebar a { display: block; padding: 12px 20px; color: #94a3b8; font-size: 14px; transition: all 0.2s; }
.admin-sidebar a:hover, .admin-sidebar a.active { background: #334155; color: #fff; }
.admin-main { margin-right: 220px; flex: 1; padding: 24px; }
.admin-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.admin-stat { background: #fff; padding: 20px; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.admin-stat .value { font-size: 28px; font-weight: bold; color: #0d9488; }
.admin-stat .label { font-size: 13px; color: #64748b; }

/* Modal */
.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); z-index: 200; display: flex; align-items: center; justify-content: center; }
.modal { background: #fff; border-radius: 16px; padding: 32px; max-width: 480px; width: 90%; max-height: 80vh; overflow-y: auto; }
.modal h3 { margin-bottom: 16px; text-align: center; }

/* Responsive - تېلفۇن ماسلىشىش */
@media (max-width: 768px) {
    /* Navbar */
    .navbar .container { height: auto; padding: 10px 12px; flex-wrap: wrap; gap: 8px; }
    .nav-brand a { font-size: 20px; }
    .nav-menu { gap: 6px; font-size: 12px; flex-wrap: wrap; justify-content: center; width: 100%; order: 3; }
    .nav-menu a { padding: 4px 8px; font-size: 13px; }
    .nav-lang { margin-left: 0; padding: 4px 8px; }
    .nav-lang .lang-btn { padding: 5px 10px; font-size: 13px; }
    .nav-links { gap: 10px; }

    /* Hero */
    .hero { padding: 30px 16px; }
    .hero h1 { font-size: 24px; }
    .hero p { font-size: 14px; }

    /* Categories */
    .category-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .category-card { padding: 14px 8px; }
    .category-icon svg { width: 28px; height: 28px; }
    .category-name { font-size: 12px; }
    .category-count { font-size: 10px; }

    /* Contracts */
    .contract-grid { grid-template-columns: 1fr; gap: 12px; }
    .contract-info { padding: 12px; }
    .contract-info h3 { font-size: 15px; }
    .contract-info p { font-size: 12px; }
    .contract-price { font-size: 18px; }

    /* VIP */
    .vip-plans { grid-template-columns: 1fr; }
    .vip-plan.featured { transform: none; }
    .vip-header h1 { font-size: 24px; }

    /* Detail */
    .detail-container { grid-template-columns: 1fr; gap: 16px; }
    .detail-title { font-size: 20px; }
    .detail-content { font-size: 14px; padding: 14px; }
    .detail-price { font-size: 26px; }

    /* Profile */
    .profile-header { flex-direction: column; text-align: center; padding: 16px; }
    .profile-stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .stat-card { padding: 14px; }
    .stat-card .stat-value { font-size: 22px; }

    /* Upload */
    .upload-container { padding: 20px; margin: 20px auto; }
    .upload-area { padding: 24px; }

    /* Form */
    .form-container { padding: 20px; margin: 20px auto; }
    .form-container h2 { font-size: 20px; }

    /* Admin */
    .admin-stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .admin-stat { padding: 14px; }
    .admin-stat .value { font-size: 22px; }
    .admin-sidebar { width: 100%; position: static; }
    .admin-main { margin-right: 0; padding: 16px; }

    /* Search */
    .search-box { margin: 16px auto 0 !important; }
    .search-box input { font-size: 14px !important; padding: 10px 40px 10px 14px !important; }
    .search-box button { padding: 6px 12px !important; font-size: 12px !important; }

    /* Footer */
    .footer { padding: 16px 0; font-size: 12px; }

    /* Table */
    .table th, .table td { padding: 8px 6px; font-size: 12px; }

    /* Banner slider */
    .banner-slider { border-radius: 8px !important; }
    .banner-prev, .banner-next { width: 32px !important; height: 32px !important; font-size: 16px !important; }
}

/* كىچىك تېلفۇن */
@media (max-width: 480px) {
    .category-grid { grid-template-columns: repeat(2, 1fr); }
    .nav-menu a { font-size: 12px; padding: 3px 6px; }
    .hero h1 { font-size: 20px; }
    .hero p { font-size: 13px; }
    .contract-footer { flex-direction: column; gap: 8px; align-items: stretch; }
    .contract-footer .btn-primary { text-align: center; }
    .profile-stats { grid-template-columns: repeat(2, 1fr); }
    .admin-stats { grid-template-columns: 1fr; }
}

/* Privacy notice */
.privacy-notice { background: #fef3c7; border: 1px solid #f59e0b; border-radius: 12px; padding: 16px; margin: 16px 0; }
.privacy-notice h4 { color: #92400e; margin-bottom: 8px; }
.privacy-notice ul { margin-right: 20px; color: #78350f; font-size: 13px; }

/* Rating stars */
.stars { color: #f59e0b; font-size: 18px; }
.stars .empty { color: #e2e8f0; }

/* Tabs */
.tabs { display: flex; gap: 8px; margin-bottom: 20px; border-bottom: 2px solid #e2e8f0; }
.tab { padding: 10px 20px; cursor: pointer; font-size: 14px; color: #64748b; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all 0.2s; }
.tab.active { color: #0d9488; border-bottom-color: #0d9488; }

/* Table */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 12px; text-align: right; border-bottom: 1px solid #e2e8f0; font-size: 14px; }
.table th { background: #f8fafc; font-weight: bold; color: #475569; }
