/* 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;
}/**
 * Dark Mode Theme - LimeSözlük Style
 * Deep navy blue theme with comfortable contrast
 */

/* ========== TRANSITION SETTINGS ========== */
:root {
    --transition-speed: 0.3s;
    --transition-timing: ease;
}

* {
    transition: background-color var(--transition-speed) var(--transition-timing),
        color var(--transition-speed) var(--transition-timing),
        border-color var(--transition-speed) var(--transition-timing);
}

/* ========== LIGHT THEME (DEFAULT) ========== */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;

    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-tertiary: #9ca3af;

    --border-color: #e5e7eb;
    --border-hover: #d1d5db;
}

/* ========== DARK THEME - LIMESÖZLÜK STYLE ========== */
.dark {
    /* Backgrounds - Deep navy blue tones */
    --bg-primary: #1a2332;
    /* Main background - deep navy */
    --bg-secondary: #212d3d;
    /* Cards, panels - slightly lighter navy */
    --bg-tertiary: #2a3749;
    /* Hover states - lighter blue-gray */

    /* Text - Clean whites and light blues */
    --text-primary: #e8eef5;
    /* Main text - soft white/blue */
    --text-secondary: #b8c5d6;
    /* Secondary - muted blue-gray */
    --text-tertiary: #8a9bad;
    /* Tertiary - deeper blue-gray */

    /* Borders - Subtle blue-gray */
    --border-color: #2f3d50;
    --border-hover: #3d4f68;
}

/* ========== GLOBAL ELEMENTS ========== */
.dark body {
    background-color: var(--bg-primary) !important;
    color: var(--text-primary) !important;
}

/* ========== BACKGROUNDS ========== */
.dark .bg-white,
.dark [class*="bg-white"] {
    background-color: var(--bg-secondary) !important;
}

.dark .bg-gray-50 {
    background-color: var(--bg-tertiary) !important;
}

.dark .bg-gray-100 {
    background-color: var(--bg-tertiary) !important;
}

.dark .bg-gray-200 {
    background-color: #3d4f68 !important;
}

.dark .bg-gray-900 {
    background-color: #151d2a !important;
}

/* Hover states */
.dark .hover\:bg-gray-50:hover,
.dark .hover\:bg-gray-100:hover {
    background-color: var(--bg-tertiary) !important;
}

/* ========== TEXT COLORS ========== */
.dark .text-gray-800,
.dark .text-gray-900 {
    color: var(--text-primary) !important;
}

.dark .text-gray-600,
.dark .text-gray-700 {
    color: var(--text-secondary) !important;
}

.dark .text-gray-500,
.dark .text-gray-400 {
    color: var(--text-tertiary) !important;
}

.dark .text-gray-300 {
    color: var(--text-secondary) !important;
}

/* ========== BORDERS ========== */
.dark .border-gray-100,
.dark .border-gray-200,
.dark .border-gray-300 {
    border-color: var(--border-color) !important;
}

.dark .border-b {
    border-color: var(--border-color) !important;
}

.dark .border-t {
    border-color: var(--border-color) !important;
}

.dark .border-l-4 {
    border-color: var(--border-hover) !important;
}

/* ========== INPUTS & FORMS ========== */
.dark input[type="text"],
.dark input[type="email"],
.dark input[type="password"],
.dark input[type="search"],
.dark input[type="number"],
.dark textarea,
.dark select {
    background-color: var(--bg-tertiary) !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
}

.dark input::placeholder,
.dark textarea::placeholder {
    color: var(--text-tertiary) !important;
}

.dark input:focus,
.dark textarea:focus,
.dark select:focus {
    border-color: #22c55e !important;
    background-color: #2a3749 !important;
}

/* ========== SPECIAL COMPONENTS ========== */

/* Purple theme for confessions */
.dark .bg-purple-50 {
    background-color: rgba(168, 85, 247, 0.12) !important;
}

.dark .border-purple-200 {
    border-color: rgba(168, 85, 247, 0.3) !important;
}

.dark .text-purple-600 {
    color: #c084fc !important;
}

/* Orange theme for events */
.dark .bg-orange-50 {
    background-color: rgba(251, 146, 60, 0.12) !important;
}

.dark .text-orange-500,
.dark .text-orange-600 {
    color: #fb923c !important;
}

/* Blue theme for businesses */
.dark .bg-blue-50 {
    background-color: rgba(59, 130, 246, 0.12) !important;
}

.dark .text-blue-500,
.dark .text-blue-600 {
    color: #60a5fa !important;
}

/* Yellow/beige highlights */
.dark .bg-yellow-50 {
    background-color: rgba(250, 204, 21, 0.12) !important;
}

/* Green accents */
.dark .bg-green-50 {
    background-color: rgba(34, 197, 94, 0.12) !important;
}

.dark .text-green-600,
.dark .text-green-700 {
    color: #4ade80 !important;
}

/* Red highlights */
.dark .bg-red-50 {
    background-color: rgba(239, 68, 68, 0.12) !important;
}

.dark .text-red-600 {
    color: #f87171 !important;
}

/* ========== NAVIGATION ========== */
.dark header,
.dark nav {
    background-color: var(--bg-secondary) !important;
    border-color: var(--border-color) !important;
}

/* ========== CARDS & PANELS ========== */
.dark .rounded-lg,
.dark .rounded-xl {
    background-color: var(--bg-secondary);
}

.dark .shadow-sm {
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.4);
}

.dark .shadow-md {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
}

.dark .shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
}

/* ========== TABLES ========== */
.dark table {
    background-color: var(--bg-secondary);
}

.dark table thead {
    background-color: var(--bg-tertiary);
}

.dark table tbody tr:hover {
    background-color: var(--bg-tertiary);
}

/* ========== SCROLLBAR ========== */
.dark ::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.dark ::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

.dark ::-webkit-scrollbar-thumb {
    background: #2f3d50;
    border-radius: 5px;
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: #3d4f68;
}

/* ========== IMAGES ========== */
.dark img:not(.avatar):not(.logo):not([class*="icon"]) {
    opacity: 0.92;
}

.dark img:hover {
    opacity: 1;
}

/* ========== LINKS ========== */
.dark a:not([class*="bg-"]):not([class*="text-green"]):not([class*="text-purple"]):not([class*="text-blue"]):not([class*="text-cyan"]) {
    color: #60a5fa;
}

.dark a:hover {
    color: #93c5fd;
}

/* ========== BADGES & PILLS ========== */
.dark .bg-gray-100.text-gray-600,
.dark .bg-gray-100.text-gray-700 {
    background-color: var(--bg-tertiary) !important;
    color: var(--text-secondary) !important;
}

/* ========== DROPDOWNS ========== */
.dark [x-show] {
    background-color: var(--bg-secondary) !important;
}

/* ========== ADMIN PANEL ========== */
.dark .dark\:bg-gray-900 {
    background-color: #151d2a !important;
}

.dark .dark\:bg-gray-800 {
    background-color: var(--bg-secondary) !important;
}

.dark .dark\:bg-gray-700 {
    background-color: var(--bg-tertiary) !important;
}

.dark .dark\:text-gray-100,
.dark .dark\:text-gray-200 {
    color: var(--text-primary) !important;
}

.dark .dark\:text-gray-300,
.dark .dark\:text-gray-400 {
    color: var(--text-secondary) !important;
}

.dark .dark\:border-gray-700,
.dark .dark\:border-gray-600 {
    border-color: var(--border-color) !important;
}

/* ========== SPECIAL WIDGETS ========== */

/* Etkinlikler (Events) Header Box - SPECIFIC */
.dark .bg-gradient-to-r.from-orange-50.to-red-50 {
    background: var(--bg-secondary) !important;
    border-color: rgba(251, 146, 60, 0.3) !important;
}

.dark .bg-gradient-to-r.from-orange-50.to-red-50 h2,
.dark .bg-gradient-to-r.from-orange-50.to-red-50 p {
    color: var(--text-primary) !important;
}

/* City Guide Header Box - SPECIFIC */
.dark .bg-gradient-to-r.from-blue-50.to-purple-50 {
    background: var(--bg-secondary) !important;
    border-color: rgba(59, 130, 246, 0.3) !important;
}

.dark .bg-gradient-to-r.from-blue-50.to-purple-50 h2,
.dark .bg-gradient-to-r.from-blue-50.to-purple-50 p {
    color: var(--text-primary) !important;
}

/* Event Cards */
.dark .bg-white.rounded-lg.border.shadow-sm {
    background: var(--bg-secondary) !important;
    border-color: var(--border-color) !important;
}

/* İtiraflar Widget - Sidebar */
.dark .bg-gradient-to-br.from-purple-50.to-pink-50 {
    background: linear-gradient(to bottom right, rgba(168, 85, 247, 0.08), rgba(236, 72, 153, 0.08)) !important;
    background-color: var(--bg-secondary) !important;
}

.dark .bg-white\/70 {
    background-color: rgba(54, 57, 63, 0.7) !important;
}

.dark .border-purple-100 {
    border-color: rgba(168, 85, 247, 0.2) !important;
}

.dark .hover\:border-purple-300:hover {
    border-color: rgba(168, 85, 247, 0.4) !important;
}

.dark .line-clamp-2 {
    color: var(--text-primary) !important;
}

/* Featured Entry Box */
.dark .bg-gradient-to-r.from-green-50.to-emerald-50 {
    background: linear-gradient(to right, rgba(34, 197, 94, 0.08), rgba(16, 185, 129, 0.08)) !important;
    background-color: var(--bg-secondary) !important;
}

.dark .border-green-100 {
    border-color: rgba(34, 197, 94, 0.2) !important;
}

.dark .bg-green-100 {
    background-color: rgba(34, 197, 94, 0.15) !important;
}

.dark .text-green-800,
.dark .text-green-900 {
    color: #4ade80 !important;
}

.dark .border-green-200 {
    border-color: rgba(34, 197, 94, 0.3) !important;
}

.dark .border-orange-200 {
    border-color: rgba(251, 146, 60, 0.3) !important;
}

.dark .border-blue-200 {
    border-color: rgba(59, 130, 246, 0.3) !important;
}


/* ========== SPECIAL STATES ========== */

/* Focus rings */
.dark *:focus {
    outline-color: #22c55e !important;
}

/* Disabled states */
.dark [disabled],
.dark .disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Selection */
.dark ::selection {
    background-color: rgba(34, 197, 94, 0.3);
    color: var(--text-primary);
}/**
 * Mobile & Responsive Improvements
 * Ensures great UX on all screen sizes
 */

/* ========== RESPONSIVE IMAGES ========== */
img {
    max-width: 100%;
    height: auto;
}

/* Prevent layout shift */
img[width][height] {
    height: auto;
}

/* ========== TOUCH TARGETS ========== */
/* Minimum 44x44px for touch accessibility */
button,
a.button,
input[type="button"],
input[type="submit"],
.btn {
    min-height: 44px;
    min-width: 44px;
    padding: 0.75rem 1rem;
}

/* Icon buttons */
button:not(.btn-text),
a.icon-button {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ========== MOBILE-FRIENDLY TABLES ========== */
@media (max-width: 768px) {
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    table thead {
        display: none;
        /* Hide headers on mobile, show data inline */
    }

    table tr {
        display: block;
        margin-bottom: 1rem;
        border: 1px solid #e5e7eb;
        border-radius: 0.5rem;
        padding: 0.75rem;
    }

    table td {
        display: block;
        text-align: right;
        padding: 0.5rem;
        border: none;
    }

    table td::before {
        content: attr(data-label);
        float: left;
        font-weight: bold;
        color: #6b7280;
    }
}

/* ========== CONTAINER FIXES ========== */
.container {
    width: 100%;
    max-width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 768px) {
    .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .container {
        max-width: 1280px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* ========== PREVENT HORIZONTAL SCROLL ========== */
body {
    overflow-x: hidden;
}

* {
    max-width: 100%;
}

/* Long words break */
.entry-content,
.topic-content,
.comment-content {
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
}

/* ========== MOBILE SPACING ========== */
@media (max-width: 768px) {

    /* Reduce spacing on mobile */
    .space-y-8>*+* {
        margin-top: 1.5rem;
    }

    .space-y-6>*+* {
        margin-top: 1rem;
    }

    /* Smaller padding */
    .p-6 {
        padding: 1rem;
    }

    .p-8 {
        padding: 1.5rem;
    }

    /* Smaller text */
    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .text-3xl {
        font-size: 1.75rem;
    }

    /* Responsive Typography for readability on mobile */
    .entry-content p,
    .message-bubble p,
    .standard-text {
        font-size: 15px;
        line-height: 1.65;
    }
}

/* ========== VERY SMALL SCREENS ========== */
@media (max-width: 480px) {

    .entry-content p,
    .message-bubble p,
    .standard-text {
        font-size: 14.5px;
        line-height: 1.7;
    }
}

/* ========== MOBILE NAVIGATION SPACING ========== */
@media (max-width: 768px) {

    /* Add bottom padding to prevent content hiding behind mobile nav */
    body {
        padding-bottom: 80px;
    }
}

/* ========== SAFE AREA INSETS (iPhone notch) ========== */
@supports (padding: max(0px)) {
    body {
        padding-left: max(0px, env(safe-area-inset-left));
        padding-right: max(0px, env(safe-area-inset-right));
    }

    @media (max-width: 768px) {
        body {
            padding-bottom: max(80px, env(safe-area-inset-bottom));
        }
    }
}

/* ========== SMOOTH SCROLLING ========== */
html {
    scroll-behavior: smooth;
}

/* Disable smooth scroll for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

/* ========== FOCUS VISIBLE (Accessibility) ========== */
*:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
}

*:focus-visible {
    outline: 2px solid #22c55e;
    outline-offset: 2px;
}

/* ========== LOADING SKELETON STYLES ========== */
.skeleton {
    background: linear-gradient(90deg,
            #f0f0f0 25%,
            #e0e0e0 50%,
            #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 0.375rem;
}

.dark .skeleton {
    background: linear-gradient(90deg,
            #2a3749 25%,
            #36393f 50%,
            #2a3749 75%);
    background-size: 200% 100%;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.skeleton-text {
    height: 1rem;
    margin-bottom: 0.5rem;
}

.skeleton-text:last-child {
    width: 80%;
}

.skeleton-avatar {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
}

.skeleton-card {
    height: 200px;
    width: 100%;
}

/* ========== RESPONSIVE UTILITY CLASSES ========== */
@media (max-width: 640px) {
    .sm\:hidden {
        display: none !important;
    }
}

@media (min-width: 768px) {
    .md\:block {
        display: block !important;
    }

    .md\:flex {
        display: flex !important;
    }
}/**
 * Mobile Bottom Navigation - Enhanced Edition
 * Modern, colorful, and animated bottom navigation bar
 */

/* ========== MOBILE NAV BASE ========== */
.mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    /* Glassmorphism effect */
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(229, 231, 235, 0.8);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0.75rem 0;
    padding-bottom: calc(0.75rem + env(safe-area-inset-bottom));
    z-index: 1000;
    /* Enhanced shadow for prominence */
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08), 0 -2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dark .mobile-nav {
    background: rgba(31, 41, 55, 0.95);
    border-top: 1px solid rgba(75, 85, 99, 0.6);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3), 0 -2px 8px rgba(0, 0, 0, 0.2);
}

/* Hide on desktop */
@media (min-width: 768px) {
    .mobile-nav {
        display: none;
    }
}

/* ========== NAV ITEMS ========== */
.mobile-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 0.25rem;
    color: #6b7280;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    flex: 1;
    max-width: 80px;
    border: none;
    background: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    border-radius: 12px;
}

.mobile-nav .nav-item:active {
    transform: scale(0.92);
}

/* Individual Icon Colors */
.mobile-nav .nav-item:nth-child(1) svg {
    color: #10b981;
    /* Home - Green */
}

.mobile-nav .nav-item:nth-child(2) svg {
    color: #f59e0b;
    /* Gundem - Amber */
}

.mobile-nav .nav-item:nth-child(3) svg {
    color: #3b82f6;
    /* Notifications - Blue */
}

.mobile-nav .nav-item:nth-child(4) svg {
    color: #8b5cf6;
    /* Messages - Purple */
}

.mobile-nav .nav-item:nth-child(5) svg {
    color: #ec4899;
    /* Profile - Pink */
}

.mobile-nav .nav-item:nth-child(6) svg {
    color: #6366f1;
    /* Settings - Indigo */
}

/* Icons */
.mobile-nav .nav-item svg {
    width: 24px;
    height: 24px;
    stroke-width: 2;
    flex-shrink: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Icon hover animation */
.mobile-nav .nav-item:active svg {
    transform: scale(1.1);
}

/* Labels */
.mobile-nav .nav-item span:not(.badge) {
    font-size: 0.65rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    line-height: 1.2;
    transition: all 0.2s ease;
}

.dark .mobile-nav .nav-item {
    color: #9ca3af;
}

/* ========== ACTIVE STATE ========== */
.mobile-nav .nav-item.active {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(16, 185, 129, 0.1));
    transform: translateY(-2px);
}

.mobile-nav .nav-item.active svg {
    stroke-width: 2.5;
    transform: scale(1.15);
    filter: drop-shadow(0 4px 8px rgba(34, 197, 94, 0.3));
}

/* Individual active colors */
.mobile-nav .nav-item.active:nth-child(1) {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(5, 150, 105, 0.1));
    color: #10b981;
}

.mobile-nav .nav-item.active:nth-child(2) {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(217, 119, 6, 0.1));
    color: #f59e0b;
}

.mobile-nav .nav-item.active:nth-child(3) {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(37, 99, 235, 0.1));
    color: #3b82f6;
}

.mobile-nav .nav-item.active:nth-child(4) {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(124, 58, 237, 0.1));
    color: #8b5cf6;
}

.mobile-nav .nav-item.active:nth-child(5) {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.15), rgba(219, 39, 119, 0.1));
    color: #ec4899;
}

.mobile-nav .nav-item.active:nth-child(6) {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(79, 70, 229, 0.1));
    color: #6366f1;
}

.dark .mobile-nav .nav-item.active {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(16, 185, 129, 0.15));
}

/* ========== BADGE (Notification count) ========== */
.mobile-nav .nav-item .badge {
    position: absolute;
    top: 0.25rem;
    right: 0.5rem;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    font-size: 0.625rem;
    font-weight: 700;
    min-width: 1.125rem;
    height: 1.125rem;
    border-radius: 0.563rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.25rem;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
    }

    50% {
        transform: scale(1.1);
        box-shadow: 0 4px 12px rgba(239, 68, 68, 0.6);
    }
}

.dark .mobile-nav .nav-item .badge {
    border-color: #1f2937;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.5);
}

/* ========== HOVER EFFECTS (Desktop fallback) ========== */
@media (min-width: 769px) {
    .mobile-nav .nav-item:hover {
        background: rgba(34, 197, 94, 0.1);
        transform: translateY(-2px);
    }

    .mobile-nav .nav-item:hover svg {
        transform: scale(1.1);
    }
}

/* ========== SAFE AREA SUPPORT (iPhone) ========== */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .mobile-nav {
        padding-bottom: calc(0.75rem + env(safe-area-inset-bottom));
    }
}

/* ========== RIPPLE EFFECT ========== */
.mobile-nav .nav-item::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(34, 197, 94, 0.3), transparent);
    transform: translate(-50%, -50%);
    transition: width 0.5s ease, height 0.5s ease;
    pointer-events: none;
}

.mobile-nav .nav-item:active::before {
    width: 120%;
    height: 120%;
}

/* ========== SLIDE ANIMATIONS ========== */
@keyframes slideUpNav {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

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

@keyframes slideDownNav {
    from {
        transform: translateY(0);
        opacity: 1;
    }

    to {
        transform: translateY(100%);
        opacity: 0;
    }
}

.mobile-nav.slide-up {
    animation: slideUpNav 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav.slide-down {
    animation: slideDownNav 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========== ICON ENTRANCE ANIMATION ========== */
.mobile-nav .nav-item {
    animation: navItemFadeIn 0.5s ease backwards;
}

.mobile-nav .nav-item:nth-child(1) {
    animation-delay: 0.05s;
}

.mobile-nav .nav-item:nth-child(2) {
    animation-delay: 0.1s;
}

.mobile-nav .nav-item:nth-child(3) {
    animation-delay: 0.15s;
}

.mobile-nav .nav-item:nth-child(4) {
    animation-delay: 0.2s;
}

.mobile-nav .nav-item:nth-child(5) {
    animation-delay: 0.25s;
}

.mobile-nav .nav-item:nth-child(6) {
    animation-delay: 0.3s;
}

@keyframes navItemFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}/**
 * Modern Topic Page Styles
 * Minimal, flat UI design for topic detail page
 */

/* Entry Content Links */
.entry-content a {
    color: #3b82f6;
    transition: all 0.2s ease;
    text-decoration: none;
}

.entry-content a:hover {
    text-decoration: underline;
}

/* Interaction Button Animations */
.entry-card button {
    transition: all 0.2s ease;
}

.entry-card button:active {
    transform: scale(0.95);
}

/* Entry Card Hover Effect */
.entry-card {
    transition: all 0.3s ease;
}

/* Mobile Responsive */
@media (max-width: 640px) {

    /* Stack interaction buttons on very small screens */
    .entry-actions-mobile {
        flex-wrap: wrap;
    }

    /* Smaller avatars on mobile */
    .entry-card .w-9 {
        width: 32px;
        height: 32px;
    }

    /* Reduce padding on mobile */
    .entry-card {
        padding: 1rem;
    }
}

/* Icon hover effects */
.group:hover span {
    transform: scale(1.1);
}

/* Smooth transitions for all interactive elements */
* {
    transition-timing-function: ease-in-out;
}/**
 * Image Modal Styles
 */

/* Modal overlay */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: none;
}

.image-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
}

/* Modal content */
.image-modal-content {
    position: relative;
    max-width: 1200px;
    max-height: 90vh;
    margin: 2rem auto;
    background: #fff;
    border-radius: 0.75rem;
    overflow: hidden;
    z-index: 10000;
}

.dark .image-modal-content {
    background: #212d3d;
}

/* Close button */
.image-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    font-size: 2rem;
    cursor: pointer;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-modal-close:hover {
    background: rgba(0, 0, 0, 0.7);
}

/* Modal body */
.image-modal-body {
    height: 80vh;
    /* Fixed height for consistency */
    overflow: hidden;
    /* Content scrolls inside containers */
}

/* Flex Container for Desktop */
.modal-flex-container {
    display: flex;
    height: 100%;
}

/* Media Container */
.modal-media-container {
    flex: 0 0 auto;
    /* Don't grow, don't shrink */
    width: 60%;
    /* Roughly space for the image */
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.image-wrapper {
    position: relative;
    max-width: 100%;
    max-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#modal-image {
    max-width: 100%;
    max-height: 80vh;
    /* Keep within modal body */
    object-fit: contain;
    display: block;
    /* Request 400x400 logical size suggestion */
    min-width: 400px;
    min-height: 400px;
    background: #111;
    /* Placeholder bg */
}

/* Sidebar Container */
.modal-sidebar {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-left: 1px solid #e5e7eb;
    height: 100%;
    min-width: 320px;
    /* Minimum width for comments */
}

.dark .modal-sidebar {
    background: #212d3d;
    border-color: #2f3d50;
}

/* Image Info */
.image-info {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    color: #6b7280;
    background: #f9fafb;
    flex-shrink: 0;
}

.dark .image-info {
    border-color: #2f3d50;
    background: #1a2332;
    color: #b8c5d6;
}

/* Comments Section */
.comments-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
    /* Inner scroll */
}

.comments-section h3 {
    margin: 0;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-bottom: 1px solid #e5e7eb;
    background: #fff;
}

.dark .comments-section h3 {
    border-color: #2f3d50;
    background: #212d3d;
}

#comments-list {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    margin-bottom: 0;
}

.image-comment {
    padding: 0.75rem;
    border-radius: 0.5rem;
    background: #f3f4f6;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.dark .image-comment {
    background: #2a3749;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.25rem;
    font-size: 0.85rem;
}

/* Comment Form */
#image-comment-form {
    padding: 1rem;
    border-top: 1px solid #e5e7eb;
    background: #fff;
    flex-shrink: 0;
    display: flex;
    gap: 0.5rem;
}

.dark #image-comment-form {
    border-color: #2f3d50;
    background: #212d3d;
}

#image-comment-form textarea {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 1.5rem;
    resize: none;
    height: 42px;
    /* Single line height */
    line-height: 1.4;
    overflow: hidden;
}

#image-comment-form textarea:focus {
    outline: none;
    border-color: #22c55e;
    box-shadow: 0 0 0 2px #22c55e;
}

.dark #image-comment-form textarea {
    background: #1a2332;
    border-color: #2f3d50;
    color: #e8eef5;
}

#image-comment-form button {
    padding: 0.5rem 1rem;
    background: transparent;
    color: #22c55e;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s;
}

#image-comment-form button:hover {
    color: #16a34a;
    background: transparent;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .image-modal-content {
        margin: 0;
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
    }

    .image-modal-body {
        height: 100%;
        overflow-y: auto;
        /* Scroll whole body on mobile */
    }

    .modal-flex-container {
        flex-direction: column;
        height: auto;
        /* Allow auto height */
    }

    .modal-media-container {
        width: 100%;
        height: auto;
        min-height: auto;
        background: #000;
        padding: 0;
    }

    #modal-image {
        min-width: auto;
        min-height: auto;
        max-height: 60vh;
        /* Limit image height on mobile */
        width: 100%;
        height: auto;
    }

    .modal-sidebar {
        width: 100%;
        min-width: auto;
        height: auto;
        border-left: none;
        border-top: 1px solid #e5e7eb;
    }

    #comments-list {
        max-height: none;
        overflow: visible;
    }

    .comments-section {
        overflow: visible;
    }

    /* Hide close button on mobile, assume back/overlay click */
    .image-modal-close {
        top: 0.5rem;
        right: 0.5rem;
        width: 2.5rem;
        height: 2.5rem;
        background: rgba(0, 0, 0, 0.6);
    }
}