:root {
    --bg-primary: #0a0d14;
    --bg-secondary: #111622;
    --bg-tertiary: #182030;
    --bg-card: rgba(22, 29, 44, 0.7);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.16);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-glow: rgba(99, 102, 241, 0.25);
    
    --accent: #06b6d4;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* Modal Stilleri */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 13, 20, 0.85);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.25s ease-out;
}

.modal-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 440px;
    padding: 32px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 40px var(--primary-glow);
}

.modal-header {
    text-align: center;
    margin-bottom: 24px;
}

.modal-header h2, .modal-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-top: 12px;
}

.modal-header p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: 4px;
}

.logo-box {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto;
    box-shadow: 0 8px 16px var(--primary-glow);
}

.logo-box.success {
    background: linear-gradient(135deg, var(--success), #059669);
    color: white;
    font-size: 24px;
    font-weight: bold;
}

/* Form Elemanları */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 0.825rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

input[type="text"],
input[type="password"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.925rem;
    transition: var(--transition);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-row {
    display: flex;
    gap: 16px;
}

.flex-1 { flex: 1; }

/* Butonlar */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 10px 18px;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #4f46e5);
    color: white;
    box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-outline:hover {
    border-color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background: var(--danger);
    color: white;
}

.btn-block { width: 100%; }
.btn-sm { padding: 6px 12px; font-size: 0.8rem; }
.btn-xs { padding: 4px 8px; font-size: 0.75rem; border-radius: var(--radius-sm); }

/* Ana Sayfa Düzeni */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 24px 16px;
    position: sticky;
    top: 0;
    height: 100vh;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.brand-logo {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.brand-info h1 {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.2;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: var(--transition);
}

.nav-item:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
}

.nav-item.active {
    color: var(--text-primary);
    background: var(--bg-tertiary);
    border-left: 3px solid var(--primary);
    font-weight: 600;
}

.nav-icon { font-size: 1.1rem; }

.sidebar-footer {
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.status-indicator .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 8px var(--success);
}

/* Ana İçerik */
.main-content {
    flex: 1;
    padding: 32px 40px;
    overflow-y: auto;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}

.topbar-left h2 {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.domain-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
}

.avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary);
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.username {
    font-size: 0.85rem;
    font-weight: 600;
}

/* Metrik Kartları */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.metric-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    backdrop-filter: blur(12px);
    transition: var(--transition);
}

.metric-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.metric-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.metric-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
}

.metric-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-top: 2px;
}

/* Kartlar */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(12px);
    overflow: hidden;
}

.card-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h3 {
    font-size: 1.05rem;
    font-weight: 600;
}

.card-body {
    padding: 24px;
}

.grid-2-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* İlerleme Çubukları */
.resource-bar-group .bar-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-bottom: 6px;
    color: var(--text-secondary);
}

.progress-bar {
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #8b5cf6);
    border-radius: var(--radius-full);
    transition: width 0.5s ease-in-out;
}

.progress-fill.warning {
    background: linear-gradient(90deg, var(--warning), #ea580c);
}

.progress-fill.success {
    background: linear-gradient(90deg, var(--success), #059669);
}

/* Bilgi Listesi */
.info-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-list li {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.info-key { color: var(--text-muted); }
.info-val { font-weight: 500; }
.info-val.highlight {
    color: var(--primary);
    font-weight: 700;
}

/* Tablolar */
.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    text-align: left;
}

.data-table th {
    padding: 12px 16px;
    color: var(--text-muted);
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.775rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.data-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* Rozetler (Badges) */
.badge {
    padding: 3px 8px;
    border-radius: var(--radius-full);
    font-size: 0.725rem;
    font-weight: 600;
}

.badge-server { background: rgba(99, 102, 241, 0.15); color: #818cf8; }
.badge-success { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.badge-info { background: rgba(6, 182, 212, 0.15); color: #38bdf8; }
.badge-warning { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.badge-danger { background: rgba(239, 68, 68, 0.15); color: #f87171; }

/* Playground */
.playground-layout {
    display: flex;
    gap: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    min-height: 580px;
}

.playground-sidebar {
    width: 260px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pg-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: var(--transition);
}

.pg-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.pg-btn.active {
    background: var(--bg-tertiary);
    border-color: var(--primary);
    color: var(--text-primary);
    font-weight: 600;
}

.playground-main {
    flex: 1;
    padding: 24px 32px;
}

.pg-tool { display: none; }
.pg-tool.active { display: block; animation: fadeIn 0.2s ease-out; }

.subtitle {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: 4px;
    margin-bottom: 20px;
}

.result-area {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
}

.result-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 8px;
}

pre {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: #38bdf8;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

.result-box {
    font-size: 0.95rem;
    color: var(--text-primary);
    line-height: 1.6;
}

/* Chat Kutusu */
.chat-container {
    display: flex;
    flex-direction: column;
    height: 440px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.chat-history {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-bubble {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    line-height: 1.4;
}

.chat-bubble.bot {
    align-self: flex-start;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
}

.chat-bubble.user {
    align-self: flex-end;
    background: var(--primary);
    color: white;
}

.chat-input-row {
    padding: 12px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 10px;
}

/* Model Tavsiye Kartları */
.model-rec-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.model-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 18px;
    position: relative;
}

.model-card.active {
    border-color: var(--primary);
    box-shadow: 0 0 16px var(--primary-glow);
}

.model-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    background: var(--primary);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.model-card h4 {
    font-size: 1.1rem;
    margin-bottom: 6px;
}

.model-card p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

/* Toast Bildirim */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 2000;
}

.toast {
    padding: 12px 18px;
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 0.85rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.4);
    animation: slideUp 0.25s ease-out;
}

.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--danger); }

/* Yardımcı Sınıflar */
.hidden { display: none !important; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.text-center { text-align: center; }
.text-warning { color: var(--warning); font-size: 0.85rem; }

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* API Anahtarları ve Modallar Özel Stilleri */
.modal-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

.key-display-box {
    display: flex;
    gap: 10px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 8px;
    margin-top: 16px;
}

.key-display-box input {
    background: transparent;
    border: none;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem;
    color: #38bdf8;
    padding: 8px;
    width: 100%;
    outline: none;
}

.key-display-box input:focus {
    box-shadow: none;
}

code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    padding: 3px 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.06);
    color: #38bdf8;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.key-row-prefix {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'JetBrains Mono', monospace;
    background: rgba(99, 102, 241, 0.1);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.25);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.825rem;
}

.keys-guide-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(6, 182, 212, 0.05));
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius-lg);
    padding: 18px 24px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.keys-guide-info h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.keys-guide-info p {
    font-size: 0.825rem;
    color: var(--text-secondary);
}

.keys-guide-code {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 8px 14px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: #e2e8f0;
}

.badge-sahne-pro { background: rgba(147, 51, 234, 0.15); color: #c084fc; border: 1px solid rgba(147, 51, 234, 0.3); }
.badge-bimenu { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-iot { background: rgba(6, 182, 212, 0.15); color: #38bdf8; border: 1px solid rgba(6, 182, 212, 0.3); }
.badge-default { background: rgba(99, 102, 241, 0.15); color: #818cf8; border: 1px solid rgba(99, 102, 241, 0.3); }

