/**
 * AI Chat Modal Styles
 * Langfy AI Asistan
 */

/* Overlay */
.ai-chat-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.ai-chat-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Modal */
.ai-chat-modal {
    width: 100%;
    max-width: 480px;
    height: 90vh;
    max-height: 700px;
    background: #fff;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: translateY(20px) scale(0.95);
    transition: transform 0.3s ease;
}

.ai-chat-overlay.active .ai-chat-modal {
    transform: translateY(0) scale(1);
}

/* Header */
.ai-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.ai-chat-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ai-chat-avatar {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.ai-chat-header-text {
    display: flex;
    flex-direction: column;
}

.ai-chat-title {
    font-size: 18px;
    font-weight: 700;
}
.ai-chat-version {
    font-size: 10px;
    font-weight: 400;
    opacity: 0.6;
    margin-left: 4px;
    vertical-align: middle;
}

.ai-chat-subtitle {
    font-size: 12px;
    opacity: 0.8;
}

.ai-chat-header-actions {
    display: flex;
    gap: 8px;
}

.ai-chat-btn-icon {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 10px;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.ai-chat-btn-icon:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Messages Container */
.ai-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: #f8f9fa;
}

/* Message */
.ai-chat-message {
    display: flex;
    gap: 10px;
    max-width: 85%;
    animation: messageSlideIn 0.3s ease;
}

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

.ai-chat-message-bot {
    align-self: flex-start;
}

.ai-chat-message-user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.ai-chat-message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 14px;
}

.ai-chat-message-bot .ai-chat-message-avatar {
    background: #d54444;
    color: #fff;
}

.ai-chat-message-user .ai-chat-message-avatar {
    background: #3d618d;
    color: #fff;
}

.ai-chat-message-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}

.ai-chat-message-text {
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
}

.ai-chat-message-bot .ai-chat-message-text {
    background: #fff;
    color: #333;
    border-top-left-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.ai-chat-message-user .ai-chat-message-text {
    background: #3d618d;
    color: #fff;
    border-bottom-right-radius: 4px;
}

.ai-chat-message-error .ai-chat-message-text {
    background: #fff5f5;
    color: #c53030;
    border: 1px solid #feb2b2;
}

.ai-chat-message-time {
    font-size: 11px;
    color: #999;
    padding: 0 4px;
}

.ai-chat-message-user .ai-chat-message-time {
    text-align: right;
}

/* Code in messages */
.ai-chat-message-text code {
    background: rgba(0, 0, 0, 0.08);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 13px;
}

.ai-chat-message-user .ai-chat-message-text code {
    background: rgba(255, 255, 255, 0.2);
}

/* Typing Indicator */
.ai-chat-typing .ai-chat-typing-dots {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
}

.ai-chat-typing-dots span {
    width: 8px;
    height: 8px;
    background: #667eea;
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out both;
}

.ai-chat-typing-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.ai-chat-typing-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

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

/* Suggestions */
.ai-chat-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 0;
}

.ai-chat-suggestion {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px 4px 10px;
    background: #808080;
    /* border: 1px solid #e2e8f0; */
    border-radius: 7px;
    font-size: 13px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s;
}

.ai-chat-suggestion:hover {
    background: #667eea;
    color: #fff;
    border-color: #667eea;
}

.ai-chat-suggestion i {
    font-size: 12px;
}

/* Input Area */
.ai-chat-input-area {
    padding: 16px 20px;
    background: #fff;
    border-top: 1px solid #e2e8f0;
}

.ai-chat-input-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    background: #f8f9fa;
    border-radius: 16px;
    padding: 8px 8px 8px 16px;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}

.ai-chat-input-wrapper:focus-within {
    border-color: #667eea;
    background: #fff;
}

.ai-chat-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 14px;
    line-height: 1.5;
    resize: none;
    max-height: 120px;
    padding: 6px 0;
    font-family: inherit;
}

.ai-chat-input:focus {
    outline: none;
    color: #000;
}

.ai-chat-input::placeholder {
    color: #999;
}

.ai-chat-send-btn {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: transform 0.2s, box-shadow 0.2s;
    flex-shrink: 0;
}

.ai-chat-send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.ai-chat-send-btn:active {
    transform: scale(0.95);
}

.ai-chat-input-info {
    display: flex;
    justify-content: space-between;
    padding: 8px 4px 0;
    font-size: 11px;
    color: #999;
}

.ai-chat-char-count {
    font-variant-numeric: tabular-nums;
}

.ai-chat-powered {
    opacity: 0.7;
}

/* FAB Button AI Style */
.fab-button-ai {
    background: #fff !important;
    color: #000 !important;
}
.fab-button-ai i{
    color: #000 !important;
}

/* Scrollbar */
.ai-chat-messages::-webkit-scrollbar {
    width: 6px;
}

.ai-chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.ai-chat-messages::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.ai-chat-messages::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .ai-chat-modal {
        max-width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }

    .ai-chat-header {
        padding: 14px 16px;
    }

    .ai-chat-messages {
        padding: 16px;
    }

    .ai-chat-message {
        max-width: 90%;
    }

    .ai-chat-input-area {
        padding: 12px 16px;
    }

    .ai-chat-suggestions {
        gap: 6px;
    }

    .ai-chat-suggestion {
        padding: 6px 12px;
        font-size: 12px;
    }

    /* Mobil için içerik kartları */
    .ai-content-card {
        padding: 12px 14px;
        gap: 10px;
        margin: 10px 0;
    }

    .ai-content-card-icon {
        font-size: 26px;
        width: 42px;
        height: 42px;
        border-radius: 10px;
    }

    .ai-content-card-title {
        font-size: 14px;
    }

    .ai-content-card-type {
        font-size: 9px;
    }

    .ai-content-card-arrow {
        width: 30px;
        height: 30px;
    }

    .ai-content-card-arrow i {
        font-size: 12px;
    }
}

/* ================================
   İÇERİK KARTLARI VE LİNKLER
   ================================ */

/* Normal linkler */
.ai-chat-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    background: rgba(102, 126, 234, 0.08);
    border-radius: 6px;
    margin: 2px 0;
}

.ai-chat-link:hover {
    color: #fff;
    background: #667eea;
    text-decoration: none;
}

.ai-chat-link i {
    font-size: 11px;
    opacity: 0.8;
}

/* İçerik Kartları - Yeni Tasarım */
.ai-content-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    margin: 12px 0;
    background: var(--card-bg, linear-gradient(135deg, #667eea, #764ba2));
    border-radius: 14px;
    text-decoration: none !important;
    color: #fff !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

.ai-content-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%);
    pointer-events: none;
}

.ai-content-card:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
}

.ai-content-card-icon {
    font-size: 32px;
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
}

.ai-content-card-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ai-content-card-type {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    opacity: 0.85;
}

.ai-content-card-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ai-content-card-arrow {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.ai-content-card-arrow i {
    font-size: 14px;
    transition: transform 0.3s ease;
}

.ai-content-card:hover .ai-content-card-arrow {
    background: rgba(255, 255, 255, 0.35);
}

.ai-content-card:hover .ai-content-card-arrow i {
    transform: translateX(3px);
}

/* Markdown Başlıklar */
.ai-chat-h2 {
    font-size: 18px;
    font-weight: 700;
    margin: 16px 0 8px;
    color: #1a1a2e;
}

.ai-chat-h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 12px 0 6px;
    color: #374151;
}

.ai-chat-h4 {
    font-size: 14px;
    font-weight: 600;
    margin: 10px 0 4px;
    color: #4b5563;
}

/* Liste stilleri */
.ai-chat-list {
    margin: 8px 0;
    padding-left: 20px;
    list-style: none;
}

.ai-chat-list li {
    position: relative;
    padding: 4px 0;
    padding-left: 8px;
}

.ai-chat-list li::before {
    content: "•";
    position: absolute;
    left: -12px;
    color: #667eea;
    font-weight: bold;
}

/* Kod bloğu */
.ai-chat-message-text code {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 13px;
}

/* Ayırıcı */
.ai-chat-divider {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, #e5e7eb, transparent);
    margin: 12px 0;
}

/* Aksiyon butonları (inline) */
.ai-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    margin: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
}

.ai-action-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.ai-action-btn i {
    font-size: 12px;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .ai-chat-modal {
        background: #1a1a2e;
    }

    .ai-chat-messages {
        background: #16213e;
    }

    .ai-chat-message-bot .ai-chat-message-text {
        background: #1a1a2e;
        color: #e2e8f0;
    }

    .ai-chat-suggestion {
        background: #1a1a2e;
        border-color: #4a5568;
        color: #a78bfa;
    }

    .ai-chat-input-area {
        background: #1a1a2e;
        border-top-color: #2d3748;
    }

    .ai-chat-input-wrapper {
        background: #16213e;
    }

    .ai-chat-input {
        color: #e2e8f0;
    }

    .ai-chat-link {
        color: #a78bfa;
    }

    .ai-chat-link:hover {
        color: #c4b5fd;
    }

    .ai-chat-h2,
    .ai-chat-h3,
    .ai-chat-h4 {
        color: #e2e8f0;
    }

    .ai-chat-message-text code {
        background: rgba(167, 139, 250, 0.15);
        color: #a78bfa;
    }

    .ai-chat-divider {
        background: linear-gradient(90deg, transparent, #4a5568, transparent);
    }
}

/* Dil Değiştirme Dropdown */
.ai-chat-lang-selector {
    position: relative;
}

/* Sistem Mesajı */
.ai-chat-message-system {
    align-self: center;
    max-width: 100%;
}

.ai-chat-system-text {
    padding: 8px 16px;
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
    border-radius: 20px;
    font-size: 13px;
    color: #667eea;
    text-align: center;
    border: 1px solid #667eea30;
}

.ai-chat-lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    width: 200px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 100;
    overflow: hidden;
}

.ai-chat-lang-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.ai-chat-lang-dropdown-header {
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.ai-chat-lang-list {
    max-height: 250px;
    overflow-y: auto;
}

.ai-chat-lang-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.15s ease;
    color: #334155;
}

.ai-chat-lang-item:hover {
    background: #f1f5f9;
}

.ai-chat-lang-item.active {
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
    color: #667eea;
}

.ai-chat-lang-item.active i {
    color: #667eea;
    margin-left: auto;
}

.ai-chat-lang-flag {
    font-size: 20px;
    line-height: 1;
}

.ai-chat-lang-name {
    font-size: 14px;
    font-weight: 500;
    flex: 1;
}

/* Dark mode için dil dropdown */
@media (prefers-color-scheme: dark) {
    .ai-chat-lang-dropdown {
        background: #1e293b;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    }

    .ai-chat-lang-dropdown-header {
        color: #94a3b8;
        border-bottom-color: #334155;
        background: #0f172a;
    }

    .ai-chat-lang-item {
        color: #e2e8f0;
    }

    .ai-chat-lang-item:hover {
        background: #334155;
    }

    .ai-chat-lang-item.active {
        background: linear-gradient(135deg, #667eea25 0%, #764ba225 100%);
        color: #a78bfa;
    }

    .ai-chat-lang-item.active i {
        color: #a78bfa;
    }
}

/* ================================
   SWIPE CAROUSEL
   ================================ */

.ai-swipe-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 16px;
    margin: 12px 0;
}

.ai-swipe-track {
    display: flex;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.ai-swipe-card {
    flex: 0 0 100%;
    min-width: 100%;
    padding: 4px;
    box-sizing: border-box;
}

.ai-swipe-card-inner {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: var(--card-bg, linear-gradient(135deg, #667eea, #764ba2));
    border-radius: 14px;
    text-decoration: none !important;
    color: #fff !important;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.ai-swipe-card-inner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 50%);
    pointer-events: none;
}

.ai-swipe-card-inner:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.ai-swipe-card-icon {
    font-size: 36px;
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 14px;
}

.ai-swipe-card-body {
    flex: 1;
    min-width: 0;
}

.ai-swipe-card-type {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    opacity: 0.9;
    margin-bottom: 4px;
}

.ai-swipe-card-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 4px;
}

.ai-swipe-card-desc {
    font-size: 12px;
    opacity: 0.85;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Navigation Arrows */
.ai-swipe-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 10;
    transition: all 0.2s ease;
    color: #333;
}

.ai-swipe-nav:hover {
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: translateY(-50%) scale(1.1);
}

.ai-swipe-prev {
    left: 8px;
}

.ai-swipe-next {
    right: 8px;
}

.ai-swipe-nav i {
    font-size: 12px;
}

/* Dots */
.ai-swipe-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 10px;
}

.ai-swipe-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(102, 126, 234, 0.3);
    cursor: pointer;
    transition: all 0.2s ease;
}

.ai-swipe-dot.active {
    background: #667eea;
    width: 20px;
    border-radius: 4px;
}

.ai-swipe-dot:hover {
    background: rgba(102, 126, 234, 0.6);
}

/* Mobil için swipe carousel */
@media (max-width: 768px) {
    .ai-swipe-card-inner {
        padding: 14px 16px;
        gap: 12px;
    }

    .ai-swipe-card-icon {
        font-size: 28px;
        width: 48px;
        height: 48px;
    }

    .ai-swipe-card-title {
        font-size: 14px;
    }

    .ai-swipe-nav {
        width: 28px;
        height: 28px;
    }

    .ai-swipe-nav i {
        font-size: 10px;
    }
}

/* ================================
   MOD TABS (Header altında)
   ================================ */

/* Eski mod tabs - artık kullanılmıyor, gizle */
.ai-chat-mode-tabs {
    display: none !important;
}

/* ================================
   MOD SEÇİM EKRANI
   ================================ */

.ai-chat-mode-select {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}

.ai-chat-mode-select-title {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 24px;
    text-align: center;
}

.ai-chat-mode-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    width: 100%;
    max-width: 320px;
}

.ai-chat-mode-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 16px;
    background: #fff;
    border-radius: 16px;
    border: 2px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.ai-chat-mode-card:hover {
    border-color: #667eea;
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(102, 126, 234, 0.15);
}

.ai-chat-mode-card-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #fff;
    margin-bottom: 12px;
}

.ai-chat-mode-card-icon.pratik { background: linear-gradient(135deg, #10b981, #059669); }
.ai-chat-mode-card-icon.analiz { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.ai-chat-mode-card-icon.rehber { background: linear-gradient(135deg, #f59e0b, #d97706); }
.ai-chat-mode-card-icon.quiz { background: linear-gradient(135deg, #ef4444, #dc2626); }

.ai-chat-mode-card-title {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 4px;
}

.ai-chat-mode-card-desc {
    font-size: 12px;
    color: #64748b;
}

/* ================================
   SEVİYE SEÇİM EKRANI (Quiz için)
   ================================ */

.ai-chat-level-select {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: linear-gradient(180deg, #fef2f2 0%, #fff 100%);
}

.ai-chat-level-select-title {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 24px;
    text-align: center;
}

.ai-chat-level-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    width: 100%;
    max-width: 320px;
}

.ai-chat-level-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 12px;
    background: #fff;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ai-chat-level-card:hover {
    border-color: #ef4444;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(239, 68, 68, 0.15);
}

.ai-chat-level-badge {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 8px;
}

.ai-chat-level-badge.a1 { background: linear-gradient(135deg, #22c55e, #16a34a); }
.ai-chat-level-badge.a2 { background: linear-gradient(135deg, #84cc16, #65a30d); }
.ai-chat-level-badge.b1 { background: linear-gradient(135deg, #eab308, #ca8a04); }
.ai-chat-level-badge.b2 { background: linear-gradient(135deg, #f97316, #ea580c); }
.ai-chat-level-badge.c1 { background: linear-gradient(135deg, #ef4444, #dc2626); }
.ai-chat-level-badge.c2 { background: linear-gradient(135deg, #a855f7, #9333ea); }

.ai-chat-level-name {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
}

/* ================================
   SOHBET EKRANI
   ================================ */

.ai-chat-screen {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Aktif Mod Göstergesi */
.ai-chat-active-mode {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: linear-gradient(90deg, var(--mode-color, #667eea)10, transparent);
    border-bottom: 1px solid #e2e8f0;
}

.ai-chat-active-mode-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #fff;
}

.ai-chat-active-mode-text {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
}

/* Header Dil Badge */
.ai-chat-lang-badge {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    margin-left: 8px;
}

/* Geri Butonu */
.ai-chat-back-btn {
    background: rgba(255, 255, 255, 0.25) !important;
}

/* ================================
   DARK MODE
   ================================ */

@media (prefers-color-scheme: dark) {
    .ai-chat-mode-select {
        background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    }

    .ai-chat-mode-select-title,
    .ai-chat-level-select-title {
        color: #e2e8f0;
    }

    .ai-chat-mode-card {
        background: #1e293b;
        border-color: #334155;
    }

    .ai-chat-mode-card:hover {
        border-color: #667eea;
    }

    .ai-chat-mode-card-title {
        color: #e2e8f0;
    }

    .ai-chat-mode-card-desc {
        color: #94a3b8;
    }

    .ai-chat-level-select {
        background: linear-gradient(180deg, #1f1315 0%, #1e293b 100%);
    }

    .ai-chat-level-card {
        background: #1e293b;
        border-color: #334155;
    }

    .ai-chat-level-card:hover {
        border-color: #ef4444;
    }

    .ai-chat-level-name {
        color: #94a3b8;
    }

    .ai-chat-active-mode {
        border-bottom-color: #334155;
    }

    .ai-chat-active-mode-text {
        color: #e2e8f0;
    }
}

/* ================================
   MOD DROPDOWN (Header içinde)
   ================================ */

.ai-chat-mode-selector {
    position: relative;
}

.ai-chat-mode-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    width: 220px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 100;
    overflow: hidden;
}

.ai-chat-mode-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.ai-chat-mode-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    cursor: pointer;
    transition: all 0.15s ease;
    border-bottom: 1px solid #f1f5f9;
}

.ai-chat-mode-item:last-child {
    border-bottom: none;
}

.ai-chat-mode-item:hover {
    background: #f8fafc;
}

.ai-chat-mode-item.active {
    background: linear-gradient(135deg, #667eea10 0%, #764ba210 100%);
}

.ai-chat-mode-item.active i {
    color: #667eea;
}

.ai-chat-mode-item i {
    font-size: 18px;
    color: #64748b;
    width: 24px;
    text-align: center;
}

.ai-chat-mode-info {
    flex: 1;
}

.ai-chat-mode-name {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
}

.ai-chat-mode-desc {
    display: block;
    font-size: 11px;
    color: #64748b;
    margin-top: 2px;
}

/* ================================
   MOD INTRO KARTI
   ================================ */

.ai-chat-mode-intro {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 16px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
    border-radius: 16px;
    border: 1px solid #667eea20;
}

.ai-chat-mode-intro-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ai-chat-mode-intro-icon i {
    font-size: 24px;
    color: #fff;
}

.ai-chat-mode-intro-text {
    flex: 1;
}

.ai-chat-mode-intro-title {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 4px;
}

.ai-chat-mode-intro-desc {
    font-size: 13px;
    color: #64748b;
    line-height: 1.5;
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
    .ai-chat-mode-tabs {
        background: #0f172a;
        border-bottom-color: #1e293b;
    }

    .ai-chat-mode-tab {
        color: #94a3b8;
    }

    .ai-chat-mode-tab:hover {
        background: rgba(167, 139, 250, 0.1);
        color: #a78bfa;
    }

    .ai-chat-mode-tab.active {
        color: #a78bfa;
        border-bottom-color: #a78bfa;
        background: rgba(167, 139, 250, 0.15);
    }

    .ai-chat-mode-dropdown {
        background: #1e293b;
    }

    .ai-chat-mode-item {
        border-bottom-color: #334155;
    }

    .ai-chat-mode-item:hover {
        background: #334155;
    }

    .ai-chat-mode-name {
        color: #e2e8f0;
    }

    .ai-chat-mode-desc {
        color: #94a3b8;
    }

    .ai-chat-mode-intro {
        background: linear-gradient(135deg, #667eea20 0%, #764ba220 100%);
        border-color: #667eea30;
    }

    .ai-chat-mode-intro-title {
        color: #e2e8f0;
    }

    .ai-chat-mode-intro-desc {
        color: #94a3b8;
    }
}

/* ================================
   QUIZ ŞIKLARI
   ================================ */

.ai-quiz-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
    width: 100%;
}

.ai-quiz-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    font-size: 14px;
    color: #1e293b;
}

.ai-quiz-option:hover:not(.disabled) {
    background: #f1f5f9;
    border-color: #667eea;
    transform: translateX(4px);
}

.ai-quiz-option.selected {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: #fff;
}

.ai-quiz-option.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.ai-quiz-option-letter {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.ai-quiz-option.selected .ai-quiz-option-letter {
    background: rgba(255, 255, 255, 0.2);
}

.ai-quiz-option-text {
    flex: 1;
    line-height: 1.4;
}

/* ================================
   MOBİL İYİLEŞTİRMELER
   ================================ */

@media (max-width: 480px) {
    /* Modal tam ekran */
    .ai-chat-overlay {
        padding: 0;
    }

    .ai-chat-modal {
        max-width: 100%;
        width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
        margin: 0;
    }

    /* Header daha kompakt */
    .ai-chat-header {
        padding: 12px 14px;
        min-height: auto;
    }

    .ai-chat-avatar {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .ai-chat-title {
        font-size: 15px;
    }

    .ai-chat-subtitle {
        font-size: 10px;
    }

    .ai-chat-btn-icon {
        width: 32px;
        height: 32px;
    }

    /* Topbar - Mod/Dil */
    .ai-chat-topbar {
        padding: 8px 12px;
    }

    .ai-chat-mode-selector,
    .ai-chat-lang-selector-wrapper {
        padding: 6px 10px;
        font-size: 11px;
    }

    /* Mesaj alanı */
    .ai-chat-messages {
        padding: 12px;
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .ai-chat-message-content {
        max-width: calc(100% - 40px);
    }

    .ai-chat-message-text {
        font-size: 13px;
    }

    /* Quiz şıkları mobil */
    .ai-quiz-options {
        gap: 8px;
        margin-top: 12px;
    }

    .ai-quiz-option {
        padding: 12px 14px;
        font-size: 13px;
        gap: 10px;
    }

    .ai-quiz-option-letter {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    /* Swipe carousel mobil - yükseklik 2x */
    .ai-swipe-carousel {
        min-height: 240px;
    }

    .ai-swipe-card {
        min-height: 200px;
    }

    .ai-swipe-card-inner {
        min-height: 180px;
        padding: 16px;
    }

    /* Input alanı */
    .ai-chat-input-area {
        padding: 10px 12px;
    }

    .ai-chat-input-wrapper {
        padding: 8px 12px;
    }

    .ai-chat-input-wrapper input {
        font-size: 14px;
    }

    /* Mod seçim ekranı */
    .ai-chat-mode-select {
        padding: 16px;
    }

    .ai-chat-mode-select-title {
        font-size: 17px;
        margin-bottom: 16px;
    }

    .ai-chat-mode-grid {
        gap: 12px;
    }

    .ai-chat-mode-card {
        padding: 16px 12px;
    }

    .ai-chat-mode-card-icon {
        width: 44px;
        height: 44px;
    }

    .ai-chat-mode-card-icon i {
        font-size: 18px;
    }

    .ai-chat-mode-card-title {
        font-size: 13px;
    }

    .ai-chat-mode-card-desc {
        font-size: 10px;
    }
}

/* Swipe carousel yüksekliği artırma */
.ai-swipe-carousel {
    min-height: 200px;
}

.ai-swipe-card {
    min-height: 180px;
}

.ai-swipe-card-inner {
    min-height: 160px;
}
