/* KKU Sözlük - Ana Stil Dosyası */
/* ================================== */

/* CSS Değişkenleri */
:root {
    /* Yeşil Tema Renkleri */
    --color-primary: #22c55e;
    --color-primary-dark: #16a34a;
    --color-primary-light: #dcfce7;

    /* Cyan Vurgular */
    --color-accent: #06b6d4;
    --color-accent-dark: #0891b2;

    /* Gri Tonları - Açık Metalik */
    --color-bg: #f0f2f5;
    --color-surface: rgba(255, 255, 255, 0.95);
    --color-border: #e0e4e8;
    --color-text: #1f2937;
    --color-text-muted: #6b7280;

    /* Gölge */
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);

    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-full: 9999px;
}

/* Dark Mode Değişkenleri */
.dark {
    --color-bg: #111827;
    --color-surface: #1f2937;
    --color-border: #374151;
    --color-text: #f9fafb;
    --color-text-muted: #9ca3af;
}

/* Temel Stiller */
* {
    box-sizing: border-box;
}

/* ===== TİPOGRAFİ STANDARTLARI ===== */

/* İçerik metinleri için standart font ailesi */
body,
.entry-content,
.message-content,
.entry-text,
p {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Başlıklar için ayrı font ailesi */
h1, h2, h3, h4, h5, h6,
.font-heading {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Standart metin boyutu: Entry içerikleri ve mesajlar */
.entry-content p,
.message-bubble p,
.standard-text {
    font-size: 15px;      /* Daha okunabilir bir boyut */
    line-height: 1.6;     /* İyi satır aralığı */
    color: var(--color-text);
}

/* Dark mode metin rengi */
.dark .entry-content p,
.dark .message-bubble p,
.dark .standard-text {
    color: var(--color-text);
}

body {
    background: var(--color-bg) !important;
    min-height: 100vh;
    color: var(--color-text);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

/* Glass Efekti - Temiz Beyaz Tasarım */
.glass {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(10px);
}

.glass-strong {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(10px);
}

/* Tailwind bg-white override for glassmorphism */
.bg-white {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(10px);
}

/* Scrollbar Stilleri */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb {
    background: var(--color-primary);
    border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary-dark);
}

/* Dark mode scrollbar */
.dark ::-webkit-scrollbar-track {
    background: #374151;
}

/* Geçiş Animasyonları */
.transition-all {
    transition: all 0.3s ease;
}

.transition-colors {
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

/* Hover Efektleri */
.hover-lift:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.hover-scale:hover {
    transform: scale(1.02);
}

/* Entry Kartları Animasyonu */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.entry-card {
    animation: slideIn 0.3s ease forwards;
}

.fade-in {
    animation: fadeIn 0.3s ease forwards;
}

/* Yeşil Tema Sınıfları */
.text-lime {
    color: var(--color-primary);
}

.bg-lime {
    background-color: var(--color-primary);
}

.hover-lime:hover {
    background-color: var(--color-primary-light);
}

.border-lime {
    border-color: var(--color-primary);
}

/* Buton Stilleri */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    font-size: 0.875rem;
}

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

.btn-primary:hover {
    background-color: var(--color-primary-dark);
}

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

.btn-accent:hover {
    background-color: var(--color-accent-dark);
}

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

.btn-outline:hover {
    background-color: var(--color-bg);
}

/* Kart Stilleri */
.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

/* Form Elemanları */
.input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background-color: var(--color-surface);
    color: var(--color-text);
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.input::placeholder {
    color: var(--color-text-muted);
}

/* Dark mode input */
.dark .input {
    background-color: #374151;
    border-color: #4b5563;
}

/* Avatar Stilleri */
.avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    font-weight: 700;
    text-transform: uppercase;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    color: white;
}

.avatar-sm {
    width: 2rem;
    height: 2rem;
    font-size: 0.75rem;
}

.avatar-md {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 0.875rem;
}

.avatar-lg {
    width: 4rem;
    height: 4rem;
    font-size: 1.5rem;
}

.avatar-xl {
    width: 6rem;
    height: 6rem;
    font-size: 2rem;
}

/* Rozet/Badge Stilleri */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: var(--radius-full);
}

.badge-success {
    background-color: #dcfce7;
    color: #166534;
}

.badge-warning {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-danger {
    background-color: #fee2e2;
    color: #991b1b;
}

.badge-info {
    background-color: #e0f2fe;
    color: #075985;
}

/* Tooltip */
.tooltip {
    position: relative;
}

.tooltip-content {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem 0.75rem;
    background-color: #1f2937;
    color: white;
    font-size: 0.75rem;
    border-radius: var(--radius-md);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 50;
}

.tooltip:hover .tooltip-content {
    opacity: 1;
    visibility: visible;
}

/* Loading Spinner */
.spinner {
    width: 1.5rem;
    height: 1.5rem;
    border: 2px solid var(--color-border);
    border-top-color: var(--color-primary);
    border-radius: var(--radius-full);
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Gradient Arka Planlar */
.gradient-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
}

.gradient-surface {
    background: linear-gradient(135deg, #f0fdf4, #ecfeff);
}

/* Dark mode gradient */
.dark .gradient-surface {
    background: linear-gradient(135deg, #064e3b, #164e63);
}

/* Link Stilleri */
a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    color: var(--color-primary);
}

/* Utility Sınıfları */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.font-bold {
    font-weight: 700;
}

.font-semibold {
    font-weight: 600;
}

.font-medium {
    font-weight: 500;
}

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Responsive Container */
.container-custom {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Selection Color */
::selection {
    background-color: var(--color-primary-light);
    color: var(--color-primary-dark);
}

/* Focus Ring */
*:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    body {
        background: white;
    }

    .no-print {
        display: none !important;
    }
}

/* Mobil Responsive */
@media (max-width: 640px) {
    .card {
        padding: 1rem;
    }

    .btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8125rem;
    }

    /* Mobil Overflow Koruması */
    body {
        overflow-x: hidden;
    }

    .container {
        /* overflow-x: hidden; Removed to fix dropdown clipping */
    }

    /* Kelime Kırma */
    p,
    div,
    span,
    a {
        word-wrap: break-word;
        overflow-wrap: break-word;
        word-break: break-word;
    }

    /* Uzun Metin Koruması */
    .text-gray-800,
    .text-gray-700,
    .text-gray-600 {
        word-wrap: break-word;
        overflow-wrap: anywhere;
        hyphens: auto;
    }
}

/* Global Overflow Koruması */
html,
body {
    overflow-x: hidden;
    max-width: 100vw;
}

/* Responsive Container Koruması */
.container {
    max-width: 100%;
    /* overflow-x: hidden; Removed to fix dropdown clipping */
}

/* Break-word Utility Class */
.break-words {
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
}

.overflow-wrap-anywhere {
    overflow-wrap: anywhere;
}