/* ============================================================
   Opinivo — Ana Stil Dosyası v2
   Koyu tema + Glassmorphism + Micro-animations
   Bug fixes: footer, search jump, star CSS
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ---------- CSS Değişkenleri ---------- */
:root {
    --bg-base:       #0a0f1e;
    --bg-surface:    #111827;
    --bg-card:       rgba(255,255,255,0.05);
    --bg-card-hover: rgba(255,255,255,0.09);
    --border:        rgba(255,255,255,0.08);
    --border-focus:  rgba(139,92,246,0.6);

    --text-primary:  #f1f5f9;
    --text-secondary:#94a3b8;
    --text-muted:    #475569;

    --accent:        #8b5cf6;
    --accent-hover:  #7c3aed;
    --accent-glow:   rgba(139,92,246,0.35);

    --color-red:     #ef4444;
    --color-orange:  #f97316;
    --color-green:   #22c55e;
    --color-grey:    #6b7280;

    --star-active:   #fbbf24;
    --star-inactive: #2d3748;

    --radius-sm:  8px;
    --radius-md:  12px;
    --radius-lg:  20px;
    --radius-full: 9999px;

    --shadow-sm:  0 2px 8px rgba(0,0,0,0.4);
    --shadow-md:  0 8px 32px rgba(0,0,0,0.5);
    --shadow-glow: 0 0 24px var(--accent-glow);

    --nav-h: 64px;
    --transition: 0.22s ease;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; height: 100%; }

/* FIX: Footer her zaman altta — flex column layout */
body {
    font-family: 'Inter', system-ui, sans-serif;
    background-color: var(--bg-base);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
    background-image:
        radial-gradient(ellipse 80% 60% at 20% 10%, rgba(139,92,246,0.12) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 80% 90%, rgba(34,197,94,0.07) 0%, transparent 60%);
    background-attachment: fixed;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }

/* ---------- Navbar ---------- */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(10,15,30,0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 0 1.5rem;
    flex-shrink: 0;
}
.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--nav-h);
}
.nav-brand {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-weight: 800;
    font-size: 1.3rem;
    letter-spacing: -0.02em;
}
.brand-icon { font-size: 1.4rem; animation: spin-slow 8s linear infinite; }
@keyframes spin-slow { to { transform: rotate(360deg); } }

.nav-links { display: flex; align-items: center; gap: 0.4rem; }
.nav-link {
    padding: .45rem .9rem;
    border-radius: var(--radius-sm);
    font-size: .88rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color var(--transition), background var(--transition);
    white-space: nowrap;
}
.nav-link:hover, .nav-link.active { color: var(--text-primary); background: var(--bg-card-hover); }
.nav-logout { color: #f87171; }
.nav-logout:hover { background: rgba(239,68,68,.12); color: #f87171; }

/* ---------- Butonlar ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    padding: .65rem 1.4rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: .9rem;
    border: none;
    transition: all var(--transition);
    outline: none;
    white-space: nowrap;
}
.btn-primary {
    background: linear-gradient(135deg, var(--accent), #6366f1);
    color: #fff;
    box-shadow: 0 4px 14px var(--accent-glow);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px var(--accent-glow); background: linear-gradient(135deg, var(--accent-hover), #4f46e5); }
.btn-primary:active { transform: translateY(0); }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text-primary); }
.btn-outline:hover { background: var(--bg-card-hover); border-color: var(--accent); }
.btn-sm { padding: .35rem .85rem; font-size: .8rem; }
.btn-xs { padding: .25rem .6rem; font-size: .75rem; }
.btn-block { width: 100%; }
.btn-danger { background: linear-gradient(135deg, #ef4444, #dc2626); color: #fff; box-shadow: 0 4px 14px rgba(239,68,68,.3); }
.btn-danger:hover { transform: translateY(-1px); }
.btn-success { background: linear-gradient(135deg, #22c55e, #16a34a); color: #fff; box-shadow: 0 4px 14px rgba(34,197,94,.3); }
.btn-success:hover { transform: translateY(-1px); }
.btn-ghost { background: transparent; border: none; color: var(--text-muted); padding: .3rem .5rem; }
.btn-ghost:hover { color: var(--color-red); }

/* ---------- Main — FIX: flex:1 so footer sticks to bottom ---------- */
.main-content {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 2.5rem 1.5rem 4rem;
    flex: 1;               /* ← bu satır footer'ı aşağı iter */
}

/* ---------- Footer — FIX ---------- */
.footer {
    flex-shrink: 0;
    border-top: 1px solid var(--border);
    background: rgba(10,15,30,0.6);
    padding: 1.5rem;
    text-align: center;
}
.footer-brand { font-weight: 700; font-size: 1rem; margin-bottom: .3rem; }
.footer-copy  { font-size: .8rem; color: var(--text-muted); }
.footer-note  { font-size: .75rem; color: var(--text-muted); margin-top: .2rem; }

/* ---------- Flash Mesajlar ---------- */
.flash {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .85rem 1.5rem;
    font-size: .9rem;
    font-weight: 500;
    animation: slideDown .3s ease;
    flex-shrink: 0;
}
@keyframes slideDown { from { transform: translateY(-100%); opacity:0; } to { transform:translateY(0); opacity:1; } }
.flash-success { background: rgba(34,197,94,.15); color: #4ade80; border-bottom: 2px solid #22c55e; }
.flash-error   { background: rgba(239,68,68,.15); color: #f87171; border-bottom: 2px solid #ef4444; }
.flash-info    { background: rgba(139,92,246,.15); color: #c4b5fd; border-bottom: 2px solid #8b5cf6; }
.flash-close   { background: none; border: none; color: inherit; font-size: 1rem; opacity: .7; cursor:pointer; }
.flash-close:hover { opacity: 1; }

/* ---------- Kartlar ---------- */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--shadow-md);
    transition: border-color var(--transition);
}
.card:hover { border-color: rgba(139,92,246,0.2); }

/* ---------- Sayfa Başlığı ---------- */
.page-header { margin-bottom: 2rem; text-align: center; }
.page-header h1 {
    font-size: 2.4rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #f1f5f9, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: .4rem;
}
.page-header p { color: var(--text-secondary); font-size: 1rem; }

/* ---------- Arama — FIX: min-height rezervasyonu ---------- */
.search-wrapper {
    position: relative;
    max-width: 560px;
    margin: 0 auto 2rem;
}
.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1rem;
    pointer-events: none;
    z-index: 1;
}
.search-input {
    width: 100%;
    padding: .9rem 1rem .9rem 2.9rem;
    background: rgba(255,255,255,0.07);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}
.search-input:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--accent-glow);
    background: rgba(255,255,255,0.1);
}
.search-input::placeholder { color: var(--text-muted); }

/* FIX: Arama alanı sabit yükseklik — sayfa zıplamasını önler */
#search-results {
    min-height: 0;
    transition: opacity .2s ease;
}
#search-results.loading { opacity: 0.6; }

/* ---------- Kullanıcı Grid ---------- */
.users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 1.2rem;
}
.user-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .85rem;
    text-align: center;
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
    cursor: pointer;
    backdrop-filter: blur(8px);
}
.user-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
    border-color: rgba(139,92,246,0.4);
}
.user-avatar {
    width: 72px; height: 72px;
    border-radius: 50%;
    border: 3px solid var(--border);
    background: var(--bg-surface);
    font-size: 2.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: border-color var(--transition), box-shadow var(--transition);
    flex-shrink: 0;
}
.user-avatar img { width:100%; height:100%; object-fit:cover; }
.user-avatar.rating-red    { border-color: var(--color-red);    box-shadow: 0 0 14px rgba(239,68,68,.4); }
.user-avatar.rating-orange { border-color: var(--color-orange); box-shadow: 0 0 14px rgba(249,115,22,.4); }
.user-avatar.rating-green  { border-color: var(--color-green);  box-shadow: 0 0 14px rgba(34,197,94,.4); }
.user-avatar.no-rating     { border-color: var(--color-grey); }
.user-name  { font-weight: 700; font-size: 1rem; }
.user-bio   { font-size: .8rem; color: var(--text-muted); line-height: 1.5; }

/* ---------- Yıldız Göstergesi ---------- */
.star-display { display: flex; gap: 2px; font-size: 1.05rem; justify-content: center; }
.star-display .star { transition: transform .1s; }
.star-display .star.filled  { color: var(--star-active); }
.star-display .star.empty   { color: var(--star-inactive); }

.rating-badge {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .3rem .8rem;
    border-radius: var(--radius-full);
    font-size: .8rem;
    font-weight: 700;
}
.rating-badge.rating-red    { background: rgba(239,68,68,.15); color: #f87171; border: 1px solid rgba(239,68,68,.3); }
.rating-badge.rating-orange { background: rgba(249,115,22,.15); color: #fb923c; border: 1px solid rgba(249,115,22,.3); }
.rating-badge.rating-green  { background: rgba(34,197,94,.15);  color: #4ade80; border: 1px solid rgba(34,197,94,.3); }
.rating-badge.no-rating     { background: rgba(107,114,128,.12); color: var(--color-grey); border: 1px solid rgba(107,114,128,.3); }

/* ---------- FIX: Yıldız Puanlama Widgeti ----------
   CSS sibling selector KALDIRILDI — tüm mantık JS'de
   ---------------------------------------------------------------- */
.stars-input {
    display: flex;
    gap: 4px;
    margin-bottom: 1rem;
    user-select: none;
}
.stars-input .star-btn {
    font-size: 2.4rem;
    background: none;
    border: none;
    color: var(--star-inactive);
    transition: transform .12s cubic-bezier(.34,1.56,.64,1), color .12s, filter .12s;
    line-height: 1;
    padding: 2px;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}
/* JS, .star-lit class ekler/çıkarır — CSS sibling combinator YOK */
.stars-input .star-btn.star-lit {
    color: var(--star-active);
    transform: scale(1.18);
    filter: drop-shadow(0 0 5px rgba(251,191,36,.65));
}

/* ---------- Profil Sayfası ---------- */
.profile-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 2.25rem;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border);
    border-radius: 20px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

/* Paylaş Butonu */
.profile-share-btn {
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    color: var(--text-primary);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.88rem;
    transition: background .2s, border-color .2s, transform .2s, color .2s;
    outline: none;
    flex-shrink: 0;
}
.profile-share-btn:hover {
    background: rgba(99,102,241,.12);
    border-color: rgba(99,102,241,.3);
    color: var(--accent);
    transform: scale(1.05);
}
.profile-share-btn:active {
    transform: scale(0.95);
}

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

.profile-avatar-lg {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    /* Gradient border using padding-box and border-box */
    background: linear-gradient(#111827, #111827) padding-box,
                linear-gradient(135deg, #2dd4bf, #6366f1) border-box;
    border: 4px solid transparent;
    box-shadow: 0 0 24px rgba(45, 212, 191, 0.2), 0 0 24px rgba(99, 102, 241, 0.2);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: transform .2s, box-shadow .2s;
}
.profile-avatar-lg:hover {
    transform: scale(1.03);
    box-shadow: 0 0 32px rgba(45, 212, 191, 0.35), 0 0 32px rgba(99, 102, 241, 0.35);
}
.profile-avatar-lg img { width:100%; height:100%; object-fit:cover; }

.avatar-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.58);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .2s;
    font-size: .8rem;
    font-weight: 600;
    color: #fff;
    flex-direction: column;
    gap: .2rem;
}
.profile-avatar-lg:hover .avatar-overlay { opacity: 1; }

.profile-info-text {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.profile-name {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.1;
}

.profile-username {
    color: var(--text-secondary);
    font-size: 1rem;
    margin: 0;
}

.profile-bio {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-top: 0.25rem;
    max-width: 420px;
}

/* Right column layout with CSS Grid alignment */
.hero-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.75rem;
    flex-shrink: 0;
}

.stats-grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    width: 330px;
}

.stat-item {
    text-align: center;
    padding: 0.75rem 0.25rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: background .18s, border-color .18s;
}
.stat-item:hover { background: rgba(99,102,241,.05); border-color: rgba(99,102,241,.15); }
.stat-num      { font-size: 1.6rem; font-weight: 800; line-height: 1.1; }
.stat-label    { font-size: .68rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .07em; margin-top: .2rem; }

.stars-container-box {
    grid-column: span 2;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
}
.stars-container-box .star-display {
    font-size: 1.4rem;
    display: flex;
    gap: 4px;
}

.rating-badge-box {
    grid-column: span 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 0.82rem;
    font-weight: 700;
    text-align: center;
    padding: 0.5rem 0.25rem;
    white-space: nowrap;
}
.rating-badge-box.rating-green {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.4);
    color: #4ade80;
}
.rating-badge-box.rating-orange {
    background: rgba(249, 115, 22, 0.1);
    border: 1px solid rgba(249, 115, 22, 0.4);
    color: #fb923c;
}
.rating-badge-box.rating-red {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #f87171;
}
.rating-badge-box.no-rating {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
}

.member-since-date {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* ---------- Yorum Bölümü ---------- */
.comments-section { margin-top: 2.5rem; }
.comments-section h2 { font-size: 1.2rem; font-weight: 700; margin-bottom: 1.25rem; border-bottom: 1px solid var(--border); padding-bottom: .75rem; }

.comments-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-top: 1.25rem;
}

.comment-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: border-color var(--transition), background var(--transition), transform var(--transition);
    min-height: 160px;
    animation: fadeUp .3s ease;
}
@keyframes fadeUp { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }
.comment-card:hover {
    border-color: rgba(139,92,246,.25);
    background: rgba(255, 255, 255, 0.04);
    transform: translateY(-2px);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
    width: 100%;
}
.comment-header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.comment-avatar {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: var(--bg-surface);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid var(--border);
}
.comment-avatar img { width:100%; height:100%; object-fit:cover; }

.comment-header-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.comment-author { font-weight: 600; font-size: .95rem; color: var(--text-primary); line-height: 1.2; }
.comment-meta-row { display: flex; align-items: center; gap: 0.5rem; }
.comment-date   { font-size: .75rem; color: var(--text-muted); }
.comment-body   { display: flex; flex-direction: column; flex-grow: 1; }
.comment-text-content {
    font-size: .88rem;
    color: var(--text-secondary);
    line-height: 1.5;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-height: 4.5em; /* 3 lines * 1.5 line-height */
    transition: max-height 0.2s ease-out;
}
.comment-text-content.expanded {
    display: block;
    -webkit-line-clamp: none;
    overflow: visible;
    max-height: none;
}
.comment-expand-btn {
    background: none;
    border: none;
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    margin-top: 0.4rem;
    align-self: flex-end;
    transition: color var(--transition), transform var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 2px;
}
.comment-expand-btn:hover {
    color: #a78bfa;
    text-decoration: none;
    transform: translateX(2px);
}
.comment-delete-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: .85rem;
    cursor: pointer;
    padding: .25rem;
    border-radius: 4px;
    transition: color var(--transition), background var(--transition);
}
.comment-delete-btn:hover { color: var(--color-red); background: rgba(239,68,68,.1); }

.sentiment-badge {
    font-size: .68rem;
    font-weight: 700;
    padding: .15rem .5rem;
    border-radius: var(--radius-full);
}
.sentiment-positive { background: rgba(34,197,94,.1); color: #4ade80; border: 1px solid rgba(34,197,94,.3); }
.sentiment-negative { background: rgba(239,68,68,.1);  color: #f87171; border: 1px solid rgba(239,68,68,.3); }
.sentiment-neutral  { background: rgba(249,115,22,.1); color: #fb923c; border: 1px solid rgba(249,115,22,.3); }
.comment-rating-badge {
    font-size: .72rem;
    font-weight: 700;
    padding: .2rem .5rem;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    gap: 3px;
    white-space: nowrap;
}
.comment-rating-badge.rating-red {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #f87171;
}
.comment-rating-badge.rating-orange {
    background: rgba(249, 115, 22, 0.08);
    border: 1px solid rgba(249, 115, 22, 0.35);
    color: #fb923c;
}
.comment-rating-badge.rating-green {
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.35);
    color: #4ade80;
}

/* ---------- Form Elemanları ---------- */
.form-group { margin-bottom: 1.15rem; }
.form-label {
    display: block;
    font-size: .82rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: .35rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.form-control {
    width: 100%;
    padding: .75rem 1rem;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: .95rem;
    font-family: inherit;
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}
.form-control:focus { border-color: var(--border-focus); box-shadow: 0 0 0 3px var(--accent-glow); }
.form-control::placeholder { color: var(--text-muted); }

textarea.form-control {
    resize: none;
    min-height: 100px;
    background: #060b16 !important;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.85rem 1rem;
}
textarea.form-control:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-control.is-error { border-color: var(--color-red) !important; box-shadow: 0 0 0 3px rgba(239,68,68,.2) !important; }
.form-control.is-success { border-color: var(--color-green); }

/* Sentiment Radio Buttons styling to match mockup */
.sentiment-radio-label {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 0.85rem 0.5rem;
    background: rgba(255,255,255,0.02);
    border: 1.5px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 600;
    transition: all 0.2s ease;
}
.sentiment-radio-label[data-sentiment="positive"] {
    border-color: rgba(34, 197, 94, 0.2);
    color: rgba(74, 222, 128, 0.6);
}
.sentiment-radio-label[data-sentiment="negative"] {
    border-color: rgba(239, 68, 68, 0.2);
    color: rgba(248, 113, 113, 0.6);
}
.sentiment-radio-label[data-sentiment="neutral"] {
    border-color: rgba(249, 115, 22, 0.2);
    color: rgba(251, 146, 60, 0.6);
}

.sentiment-radio-label.active[data-sentiment="positive"] {
    border-color: #22c55e !important;
    background: rgba(34, 197, 94, 0.08) !important;
    color: #4ade80 !important;
    box-shadow: 0 0 15px rgba(34, 197, 94, 0.3);
    transform: translateY(-2px);
}
.sentiment-radio-label.active[data-sentiment="negative"] {
    border-color: #ef4444 !important;
    background: rgba(239, 68, 68, 0.08) !important;
    color: #f87171 !important;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.3);
    transform: translateY(-2px);
}
.sentiment-radio-label.active[data-sentiment="neutral"] {
    border-color: #f97316 !important;
    background: rgba(249, 115, 22, 0.08) !important;
    color: #fb923c !important;
    box-shadow: 0 0 15px rgba(249, 115, 22, 0.3);
    transform: translateY(-2px);
}

.field-error {
    font-size: .78rem;
    color: #f87171;
    margin-top: .3rem;
    display: flex;
    align-items: center;
    gap: .3rem;
    animation: fadeIn .2s ease;
}

/* Checkbox / Consent */
.consent-box {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding: .9rem 1.1rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: .65rem;
    transition: border-color var(--transition), background var(--transition);
    cursor: pointer;
}
.consent-box:has(input:checked) {
    border-color: rgba(139,92,246,0.5);
    background: rgba(139,92,246,0.07);
}
.consent-box.is-error { border-color: var(--color-red); background: rgba(239,68,68,.05); }
.consent-box input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); margin-top: 2px; flex-shrink: 0; }
.consent-text { font-size: .87rem; color: var(--text-secondary); line-height: 1.5; }
.consent-text strong { color: var(--text-primary); }
.consent-required { color: var(--color-red); font-size: .73rem; font-weight: 700; margin-left: .3rem; }
.consent-optional { color: var(--color-green); font-size: .73rem; font-weight: 700; margin-left: .3rem; }
.kvkk-link { color: var(--accent); text-decoration: underline; cursor: pointer; background:none; border:none; font:inherit; font-size:.87rem; }

/* ---------- Auth Sayfaları ---------- */
.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 2.5rem 1rem 4rem;
    flex: 1;
}
.auth-card {
    width: 100%;
    max-width: 500px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow-md), var(--shadow-glow);
    animation: cardIn .4s ease;
}
@keyframes cardIn { from { opacity:0; transform:translateY(16px) scale(.97); } to { opacity:1; transform:translateY(0) scale(1); } }
.auth-title    { font-size: 1.8rem; font-weight: 800; letter-spacing: -0.03em; margin-bottom: .35rem; }
.auth-subtitle { color: var(--text-muted); font-size: .9rem; margin-bottom: 1.75rem; }
.auth-footer   { text-align: center; margin-top: 1.5rem; font-size: .87rem; color: var(--text-muted); }
.auth-footer a { color: var(--accent); font-weight: 600; }
.auth-footer a:hover { text-decoration: underline; }

/* Adım göstergesi */
.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .75rem;
    margin-bottom: 2rem;
}
.step-pill {
    display: flex;
    align-items: center;
    gap: .4rem;
    padding: .35rem .9rem;
    border-radius: var(--radius-full);
    font-size: .78rem;
    font-weight: 600;
    border: 1px solid var(--border);
    color: var(--text-muted);
    background: transparent;
    transition: all .3s;
}
.step-pill.active  { background: rgba(139,92,246,.18); border-color: var(--accent); color: var(--text-primary); }
.step-pill.done    { background: rgba(34,197,94,.15); border-color: var(--color-green); color: #4ade80; }
.step-connector    { height: 1px; width: 24px; background: var(--border); }

/* ---------- KVKK Modal (native dialog) ---------- */
dialog.kvkk-dialog {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    padding: 0;
    max-width: 680px;
    width: calc(100% - 2rem);
    max-height: 85vh;
    box-shadow: 0 24px 80px rgba(0,0,0,.7);
    overflow: hidden;
    /* Perfect screen centering */
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
}
dialog.kvkk-dialog::backdrop {
    background: rgba(0,0,0,.65);
    backdrop-filter: blur(4px);
}
.dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.75rem;
    border-bottom: 1px solid var(--border);
}
.dialog-header h2 { font-size: 1.1rem; font-weight: 700; }
.dialog-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    padding: .25rem .5rem;
    border-radius: 6px;
    transition: color var(--transition);
}
.dialog-close:hover { color: var(--text-primary); }
.dialog-body {
    padding: 1.5rem 1.75rem;
    overflow-y: auto;
    max-height: calc(85vh - 130px);
    font-size: .88rem;
    color: var(--text-secondary);
    line-height: 1.75;
}
.dialog-body h3 { color: var(--text-primary); font-size: .95rem; margin: 1.25rem 0 .4rem; }
.dialog-footer {
    padding: 1rem 1.75rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: .75rem;
}

/* ---------- Avatar Upload ---------- */
.avatar-upload-area {
    border: 2px dashed var(--border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    text-align: center;
    cursor: pointer;
    transition: border-color var(--transition), background var(--transition);
    position: relative;
}
.avatar-upload-area:hover,
.avatar-upload-area.drag-over { border-color: var(--accent); background: rgba(139,92,246,.06); }
.avatar-upload-area input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}
.avatar-preview { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; border: 3px solid var(--accent); margin: 0 auto .75rem; display:none; }

/* ---------- Şifre güç göstergesi ---------- */
.pw-strength-bar-wrap {
    height: 4px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
    margin-top: .5rem;
}
#pw-strength-bar { height: 100%; width: 0; transition: width .3s, background .3s; border-radius: 4px; }

/* ---------- Loading Spinner ---------- */
.spinner {
    width: 22px; height: 22px;
    border: 2px solid rgba(255,255,255,.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .6s linear infinite;
    display: inline-block;
    vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Empty State ---------- */
.empty-state { text-align: center; padding: 3.5rem 2rem; color: var(--text-muted); }
.empty-state-icon { font-size: 3.5rem; margin-bottom: .75rem; opacity: .45; }
.empty-state h3   { font-size: 1rem; color: var(--text-secondary); margin-bottom: .4rem; }
.empty-state p    { font-size: .85rem; }

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.text-muted  { color: var(--text-muted); }
.text-danger { color: #f87171; }
.text-success{ color: #4ade80; }
.d-flex      { display: flex; }
.gap-1       { gap: .5rem; }
.gap-2       { gap: 1rem; }
.mt-1        { margin-top: .5rem; }
.mt-2        { margin-top: 1rem; }
.mt-3        { margin-top: 1.5rem; }
.mb-1        { margin-bottom: .5rem; }
.mb-2        { margin-bottom: 1rem; }
.mb-3        { margin-bottom: 1.5rem; }
.fw-600      { font-weight: 600; }
.fw-700      { font-weight: 700; }
.fs-sm       { font-size: .85rem; }

.profile-middle-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
    align-items: stretch;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .comments-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .profile-hero { flex-direction: column; text-align: center; }
    .hero-left { flex-direction: column; text-align: center; }
    .hero-right { align-items: center; }
    .stats-grid-container { margin: 0 auto; }
    .profile-middle-grid { grid-template-columns: 1fr; }
    .profile-bio { text-align: center; }
    .comments-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    .comment-card {
        padding: 0.85rem;
        min-height: auto;
    }
    .comment-avatar {
        width: 36px;
        height: 36px;
        font-size: 0.95rem;
    }
    .comment-author {
        font-size: 0.88rem;
    }
    .sentiment-badge {
        font-size: 0.65rem;
        padding: 0.1rem 0.35rem;
    }
    .comment-date {
        font-size: 0.7rem;
    }
    .main-content  { padding: 1.5rem 1rem 3rem; }
}
@media (max-width: 640px) {
    .page-header h1 { font-size: 1.8rem; }
    .auth-card { padding: 1.75rem 1.25rem; }
    .users-grid { grid-template-columns: 1fr 1fr; }
    .nav-link span.nav-label { display: none; }
    .comments-grid { grid-template-columns: 1fr; }
}
@media (max-width: 400px) {
    .users-grid { grid-template-columns: 1fr; }
}

/* ---------- Pagination (Sayfalama) ---------- */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin-top: 2rem;
}
.page-numbers {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.page-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--border);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all var(--transition);
}
.page-num:hover {
    border-color: var(--accent);
    color: var(--text-primary);
    background: var(--bg-card-hover);
}
.page-num.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.page-dots {
    color: var(--text-muted);
    font-size: 0.85rem;
    padding: 0 0.25rem;
}

/* ---------- Uzun Metin & Kullanıcı Adı Taşma Düzeltmesi ---------- */
.user-name,
.profile-name,
.profile-username,
.profile-bio,
.comment-author,
.user-card,
.admin-badge {
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
}
