/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    height: 100vh;
    display: flex;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

/* Sidebar Styles */
.sidebar {
    width: 300px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #333;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    border-right: 1px solid #dee2e6;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid #dee2e6;
}

.sidebar-header .btn {
    width: 100%;
    justify-content: center;
}

.chat-history {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
}

.chat-history h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: #6c757d;
    font-weight: 500;
}

.chat-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.chat-item {
    padding: 0.75rem;
    background: #ffffff;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.chat-item:hover {
    background: #f8f9fa;
    transform: translateX(5px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.chat-item.active {
    background: #d4edda;
    border-color: #c3e6cb;
    box-shadow: 0 2px 6px rgba(73, 74, 75, 0.3);
}

.chat-item-title {
    font-weight: 500;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.chat-item-time {
    font-size: 0.8rem;
    color: #6c757d;
}

.chat-item-content {
    flex: 1;
    min-width: 0;
}

.chat-item-menu {
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 4px;
    border-radius: 4px;
    cursor: pointer;
    color: #6c757d;
}

.chat-item:hover .chat-item-menu {
    opacity: 1;
}

.chat-item-menu:hover {
    background: #e9ecef;
    color: #333;
}

.context-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    min-width: 150px;
    overflow: hidden;
}

.context-menu-item {
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.context-menu-item:hover {
    background: #f8f9fa;
}

.context-menu-item.delete {
    color: #dc3545;
}

.context-menu-item.delete:hover {
    background: #f8d7da;
}

.context-menu-item.export {
    color: #28a745;
}

.context-menu-item.export:hover {
    background: #d4edda;
}

.context-menu-item.share {
    color: #6c757d;
}

.context-menu-item.share:hover {
    background: #cce7ff;
}

/* Code blocks */
.code-block {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin: 10px 0;
    overflow: hidden;
}

.code-header {
    background: #e9ecef;
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #dee2e6;
}

.code-language {
    font-size: 0.8rem;
    color: #6c757d;
    font-weight: 500;
    text-transform: uppercase;
}

.copy-code-btn {
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.copy-code-btn:hover {
    background: #dee2e6;
    color: #333;
}

.code-block pre {
    margin: 0;
    padding: 16px;
    background: #f8f9fa;
    overflow-x: auto;
}

.code-block code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #333;
    background: none;
    padding: 0;
    border: none;
    border-radius: 0;
}

.inline-code {
    background: #f1f3f4;
    color: #d73a49;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid #dee2e6;
}

.sidebar-footer .btn {
    width: 100%;
    justify-content: center;
}

/* Pricing Button Styles */
#pricingBtn {
    background: linear-gradient(135deg, #ffd700, #ffb347);
    color: #333;
    border: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

#pricingBtn:hover {
    background: linear-gradient(135deg, #ffb347, #ff8c00);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 215, 0, 0.4);
}

#pricingBtn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

#pricingBtn:hover::before {
    left: 100%;
}

#pricingBtn i {
    margin-right: 0.5rem;
    animation: sparkle 2s infinite;
}

@keyframes sparkle {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.1) rotate(180deg); }
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* Header Styles */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: white;
    color: #333;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid #e9ecef;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #6c757d;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.sidebar-toggle:hover {
    background: #f8f9fa;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo i {
    font-size: 2rem;
    color: #6c757d;
}

.logo-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 8px;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #333;
}

.header-actions {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    color: #333;
    border: 1px solid #dee2e6;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border: 1px solid #6c757d;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: #6c757d;
    border: 2px solid #6c757d;
}

.btn-outline:hover {
    background: #6c757d;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.4);
}

/* Chat Container */
.chat-container {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    background: #f8f9fa;
}

.chat-messages {
    max-width: 800px;
    margin: 0 auto;
    scroll-behavior: smooth;
    padding: 1rem 0;
}

.welcome-message {
    text-align: center;
    padding: 3rem 1rem;
    color: #666;
}

.welcome-icon {
    font-size: 4rem;
    color: #6c757d;
    margin-bottom: 1rem;
}

.welcome-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.welcome-message h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.welcome-message p {
    font-size: 1.1rem;
    color: #666;
}

/* Message Styles */
.message {
    margin-bottom: 1.5rem;
    display: flex;
    gap: 1rem;
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.user-message .message-avatar {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #333;
}

.ai-message .message-avatar {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    color: #333;
}

.message-avatar-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 50%;
}

.message-content {
    flex: 1;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 18px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
}

.user-message .message-content {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #333;
    margin-left: auto;
    max-width: 70%;
    border: 1px solid #dee2e6;
}

.ai-message .message-content {
    background: white;
    color: #333;
    max-width: 85%;
}

.message-text {
    line-height: 1.6;
    word-wrap: break-word;
}

.message-time {
    font-size: 0.8rem;
    opacity: 0.7;
    margin-top: 0.5rem;
    text-align: right;
}

/* Input Area */
.input-area {
    padding: 1rem 2rem 2rem;
    background: white;
    border-top: 1px solid #e9ecef;
}

.input-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    background: #f8f9fa;
    border-radius: 25px;
    padding: 0.5rem;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.input-container:focus-within {
    border-color: #dee2e6;
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.1);
}

#messageInput {
    flex: 1;
    border: none;
    background: transparent;
    padding: 1rem;
    font-size: 1rem;
    resize: none;
    outline: none;
    font-family: inherit;
    line-height: 1.5;
    max-height: 120px;
    min-height: 24px;
}

.send-btn {
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    flex-shrink: 0;
    border: 1px solid #dee2e6;
}

.send-btn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.4);
}

.send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.input-footer {
    max-width: 800px;
    margin: 0.5rem auto 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #666;
}

.char-count {
    font-weight: 500;
}

.ai-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ai-info::before {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    background-image: url('../uploads/logo.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-overlay.show {
    display: flex;
}

.loading-spinner {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.loading-spinner i {
    font-size: 3rem;
    color: #6c757d;
    margin-bottom: 1rem;
}

.loading-spinner p {
    color: #666;
    font-size: 1.1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        z-index: 1000;
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .sidebar-toggle {
        display: block;
    }
    
    .main-content {
        width: 100%;
    }
    
    .header {
        padding: 1rem;
    }
    
    .header-actions {
        gap: 0.5rem;
    }
    
    .btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .chat-container {
        padding: 0.5rem;
    }
    
    .input-area {
        padding: 1rem;
    }
    
    .user-message .message-content,
    .ai-message .message-content {
        max-width: 90%;
    }
    
    .logo h1 {
        font-size: 1.5rem;
    }
    
    .sidebar {
        width: 280px;
    }
}

@media (max-width: 480px) {
    .header-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .welcome-message h2 {
        font-size: 1.5rem;
    }
    
    .welcome-icon {
        font-size: 3rem;
    }
}

/* Scrollbar Styling */
.chat-container::-webkit-scrollbar {
    width: 6px;
}

.chat-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.chat-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.chat-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Typing Animation */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: white;
    border-radius: 18px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    max-width: 85%;
}

.typing-dots {
    display: flex;
    gap: 0.3rem;
}

.typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f8f9fa;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* User Profile Styles */
.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.user-profile:hover {
    background-color: #f8f9fa;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

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

.user-avatar i {
    font-size: 18px;
    color: #6c757d;
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.user-name {
    font-weight: 600;
    font-size: 14px;
    color: #333;
    line-height: 1.2;
}

.user-details {
    font-size: 12px;
    color: #6c757d;
    line-height: 1.2;
}

.user-menu {
    position: relative;
}

.user-menu-toggle {
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.2s ease;
}

.user-menu-toggle:hover {
    color: #333;
}

.user-menu-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 280px;
    z-index: 1000;
    display: none;
    margin-top: 8px;
}

.user-menu-dropdown.show {
    display: block;
}

.user-menu-header {
    padding: 16px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-menu-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

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

.user-menu-avatar i {
    font-size: 24px;
    color: #6c757d;
}

.user-menu-info {
    flex: 1;
}

.user-menu-name {
    font-weight: 600;
    font-size: 16px;
    color: #333;
    margin-bottom: 4px;
}

.user-menu-email,
.user-menu-phone {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 2px;
}

.user-menu-actions {
    padding: 8px 0;
}

.user-menu-item {
    width: 100%;
    background: none;
    border: none;
    padding: 12px 16px;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #dc3545;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

.user-menu-item:hover {
    background-color: #f8f9fa;
}

.user-menu-item i {
    width: 16px;
    text-align: center;
}

/* Mobile responsive for user profile */
@media (max-width: 768px) {
    .user-profile {
        gap: 8px;
    }
    
    .user-info {
        display: none;
    }
    
    .user-menu-dropdown {
        min-width: 250px;
        right: -10px;
    }
}

/* Avatar Upload Progress Styles */
.avatar-upload-progress {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 20px 30px;
    border-radius: 10px;
    z-index: 10000;
    text-align: center;
    min-width: 300px;
}

.avatar-upload-progress .progress-bar {
    width: 100%;
    height: 8px;
    background: #333;
    border-radius: 4px;
    overflow: hidden;
    margin: 10px 0;
}

.avatar-upload-progress .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.avatar-upload-progress .progress-text {
    font-size: 14px;
    margin-top: 10px;
    color: #ccc;
}

.avatar-upload-progress .progress-icon {
    font-size: 24px;
    margin-bottom: 10px;
    color: #4CAF50;
}

/* Error Message Styles */
.avatar-error-message {
    background: #fee2e2;
    color: #991b1b;
    padding: 15px;
    border-radius: 8px;
    margin: 10px 0;
    border: 1px solid #fecaca;
    display: none;
}

.avatar-error-message.show {
    display: block;
}

.avatar-error-message .error-icon {
    margin-right: 8px;
    color: #dc2626;
}

/* Success Message Styles */
.avatar-success-message {
    background: #d1fae5;
    color: #065f46;
    padding: 15px;
    border-radius: 8px;
    margin: 10px 0;
    border: 1px solid #a7f3d0;
    display: none;
}

.avatar-success-message.show {
    display: block;
}

.avatar-success-message .success-icon {
    margin-right: 8px;
    color: #059669;
}

/* Pricing Page Styles */
/* --- Google Fonts - Poppins (Agar avval qo'shmagan bo'lsangiz kerak bo'ladi) --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* --- Tariflar sahifasi uchun asosiy fon va konteyner --- */
/* Bu qism body uslubini o'zgartirmaslik uchun alohida klass orqali berilishi mumkin,
   lekin soddalik uchun pricing.php ga alohida body klassini qo'shish yaxshiroq.
   Hozircha, mavjud body foningizni saqlab qolamiz. */

/* --- Konteyner --- */
.pricing-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem; /* Padding qo'shildi */
    background: #ffffff; /* Oq fon */
    min-height: 100vh; /* To'liq balandlik */
}

/* --- Sarlavha --- */
.pricing-header {
    text-align: center;
    margin-bottom: 3rem;
}

.pricing-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #333333; /* Qora rang */
    text-shadow: none; /* Text shadow olib tashlandi */
}

.pricing-header h1 .fa-crown {
    color: #ffd700;
}

.pricing-header p {
    font-size: 1.1rem;
    color: #666666; /* Kulrang rang */
    max-width: 600px;
    margin: 0 auto;
}

/* --- Xabarnomalar (Muvaffaqiyatli va Joriy tarif) --- */
.success-message,
.current-plan {
    padding: 1.2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    text-align: center;
    font-size: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
}

.success-message {
    background: rgba(40, 167, 69, 0.2);
    color: #28a745;
    border-color: rgba(40, 167, 69, 0.5);
}

.success-message strong {
    color: #34ce57;
}

.current-plan {
    color: #333333; /* Joriy tarif matni qora rangda */
}

.current-plan strong {
    color: #ffd700;
    font-weight: 600;
}

/* --- Tariflar Setkasi --- */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

/* --- Tarif Kartasi --- */
.pricing-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    color: #333333; /* Karta ichidagi matn rangi qora */
}

.pricing-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

/* --- Maxsus Kartalar --- */
.pricing-card.popular {
    border-color: #007bff;
    box-shadow: 0 0 25px rgba(0, 123, 255, 0.3);
}

.pricing-card.premium-plan {
    border-color: #8a3ffc;
    box-shadow: 0 0 25px rgba(138, 63, 252, 0.3);
}

.pricing-card.current-plan-highlight {
    border: 3px solid #ffd700;
    background: rgba(255, 215, 0, 0.05);
}

/* --- Kartadagi NISHON (Badge) --- */
.plan-badge {
    position: absolute;
    top: 15px;
    right: -30px;
    background: #007bff;
    color: white;
    padding: 5px 30px;
    font-size: 0.8rem;
    font-weight: 600;
    transform: rotate(45deg);
    text-transform: uppercase;
}

.plan-badge.premium-badge {
    background: #8a3ffc;
}
.plan-badge.free-badge {
    background: #28a745;
}

/* --- Karta Elementlari --- */
.plan-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #007bff;
}

.pricing-card.premium-plan .plan-icon { color: #8a3ffc; }
.pricing-card.free-plan .plan-icon { color: #28a745; }
.pricing-card .fa-graduation-cap { color: #ff9800; }

.plan-name {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333333; /* Nomi qora rangda */
}

.plan-description {
    color: #666666; /* Kulrang rang */
    font-size: 0.9rem;
    min-height: 40px;
    margin-bottom: 1.5rem;
}

.plan-price {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
    color: #333333; /* Narxi qora rangda */
}

.plan-period {
    color: #666666; /* Kulrang rang */
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

/* --- Xususiyatlar Ro'yxati --- */
.plan-features {
    list-style: none;
    text-align: left;
    margin-bottom: 2rem;
    flex-grow: 1;
    padding: 0; /* Eski uslublardan tozalash */
}

.plan-features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    padding: 0; /* Eski uslublardan tozalash */
}

.plan-features .fa-check {
    color: #28a745;
}

.plan-features .fa-times {
    color: #dc3545;
}

.plan-features li i {
    margin-right: 0.75rem; /* Bo'sh joy */
    width: auto; /* Avtomatik kenglik */
}

.plan-features .unavailable {
    text-decoration: line-through;
    color: #6c757d;
}

/* --- Tanlash Tugmasi --- */
.select-plan-btn {
    display: block; /* a tegi uchun o'zgartirildi */
    background: #007bff;
    color: white;
    text-decoration: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease;
    border: none;
    cursor: pointer;
    margin-top: auto;
    width: 100%; /* Kengligi to'liq */
    text-align: center; /* Matn markazda */
}
.select-plan-btn:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
    box-shadow: none; /* Eski soyani olib tashlash */
}
.pricing-card.premium-plan .select-plan-btn {
    background: #8a3ffc;
}
.pricing-card.premium-plan .select-plan-btn:hover {
    background: #702bd9;
}
.pricing-card.current-plan-highlight .select-plan-btn {
    background: #6c757d;
    cursor: not-allowed;
}

/* --- Chatga Qaytish --- */
.back-to-chat {
    text-align: center;
    margin-top: 3rem;
}

.back-to-chat a {
    color: #007bff; /* Ko'k rang */
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    display: inline-flex;
    background: rgba(0, 123, 255, 0.1); /* Ko'k fon */
    padding: 1rem 2rem;
    border-radius: 10px;
    border: 2px solid #007bff; /* Ko'k chegarasi */
}

.back-to-chat a:hover {
    color: #ffffff; /* Oq rang hover da */
    background: #007bff; /* Ko'k fon hover da */
    transform: translateY(-2px);
    border-color: #0056b3; /* To'q ko'k chegarasi hover da */
}

/* --- Fayl Yuklash Stil --- */
.file-upload-area {
    border: 2px dashed #007bff;
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    margin-bottom: 1rem;
    background: rgba(0, 123, 255, 0.05);
    transition: all 0.3s ease;
}

.file-upload-area:hover {
    border-color: #0056b3;
    background: rgba(0, 123, 255, 0.1);
}

.file-upload-content i {
    font-size: 3rem;
    color: #007bff;
    margin-bottom: 1rem;
}

.file-upload-content p {
    color: #666;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.file-types {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.file-type {
    background: #007bff;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: 500;
}

.selected-files {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.selected-files-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.clear-files-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 0.3rem 0.8rem;
    border-radius: 5px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.clear-files-btn:hover {
    background: #c82333;
}

.files-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.file-item {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.file-item i {
    color: #007bff;
}

.file-item .remove-file {
    color: #dc3545;
    cursor: pointer;
    margin-left: 0.5rem;
}

.file-item .remove-file:hover {
    color: #c82333;
}

.input-container {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    padding: 0.5rem;
    transition: border-color 0.3s ease;
}

.input-container:focus-within {
    border-color: #007bff;
}

.file-btn {
    background: #f8f9fa;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #6c757d;
    transition: all 0.3s ease;
}

.file-btn:hover {
    background: #007bff;
    color: white;
}

/* --- Mobilga Moslashuv --- */
@media (max-width: 768px) {
    .pricing-header h1 {
        font-size: 2rem;
    }
    .pricing-header p {
        font-size: 1rem;
    }
    .pricing-grid {
        grid-template-columns: 1fr;
    }
    .pricing-card.popular {
        transform: none; /* Mobil qurilmada kattalashtirishni bekor qilish */
    }
}