* {
    box-sizing: border-box
}

html,
body {
    height: 100%
}

body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    background: radial-gradient(1200px 700px at 20% 10%, rgba(160, 180, 255, .35), transparent 60%), radial-gradient(1000px 650px at 80% 0%, rgba(220, 160, 255, .25), transparent 55%), #0b0f1a;
    background-attachment: fixed;
    background-size: cover;
    color: #e9ecf6
}

a {
    color: inherit;
    text-decoration: none
}

img {
    max-width: 100%
}

button,
input,
textarea {
    font-family: inherit
}

:root {
    --bg: #0b0f1a;
    --card: rgba(255, 255, 255, .06);
    --card2: rgba(255, 255, 255, .08);
    --line: rgba(255, 255, 255, .18);
    --muted: rgba(233, 236, 246, .7);
    --muted2: rgba(233, 236, 246, .55);
    --brand: #9bb0ff;
    --good: #52d38a;
    --bad: #ff6b6b;
    --shadow: 0 10px 30px rgba(0, 0, 0, .4);
    --r: 18px;
    --th: 72px
}

body.light {
    background: radial-gradient(900px 600px at 20% 10%, rgba(140, 170, 255, .45), transparent 60%), radial-gradient(850px 560px at 80% 0%, rgba(255, 170, 230, .35), transparent 55%), #f5f7ff;
    background-attachment: fixed;
    background-size: cover;
    color: #151a2b
}

body.light {
    --bg: #f5f7ff;
    --card: #ffffff;
    --line: rgba(0, 0, 0, 0.14);
    --muted: rgba(21, 26, 43, 0.7);
    --muted2: rgba(21, 26, 43, 0.5);
}

body.light .item {
    background: rgba(0, 0, 0, 0.03);
}

body.light .item:hover {
    background: rgba(0, 0, 0, 0.05);
}

body.light .item.unread {
    background: rgba(155, 176, 255, 0.08);
}

.container {
    width: min(1120px, 100%);
    margin: 0 auto;
    padding: 14px 14px 26px
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(20px);
    background: rgba(10, 14, 25, .88);
    border-bottom: 1px solid var(--line);
    min-height: var(--th);
    display: flex;
    align-items: center;
}

body.light .topbar {
    background: rgba(255, 255, 255, .8);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.topbar .container {
    padding-top: 0;
    padding-bottom: 0;
}

.topbar .row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    min-height: var(--th);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: .2px
}

.logo {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: linear-gradient(135deg, #9bb0ff, #c8a9ff);
    box-shadow: 0 10px 30px rgba(155, 176, 255, .35)
}

.nav {
    display: flex;
    gap: 10px;
    flex-wrap: wrap
}

.nav a {
    padding: 8px 10px;
    border-radius: 999px;
    color: var(--muted);
    border: 1px solid transparent
}

.nav a:hover {
    background: rgba(255, 255, 255, .06);
    color: #fff
}

.nav a.active {
    background: rgba(155, 176, 255, .18);
    border-color: rgba(155, 176, 255, .35);
    color: #fff
}

body.light .nav a:hover {
    background: rgba(0, 0, 0, .04);
    color: #000;
}

body.light .nav a.active {
    background: #4a6fff;
    border-color: #4a6fff;
    color: #fff;
}

.actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    flex-wrap: wrap
}

.pill {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, .05);
    border-radius: 999px;
    padding: 8px 10px;
    min-width: 220px;
    flex: 1 1 220px
}

.pill input {
    border: none;
    outline: none;
    background: transparent;
    color: inherit;
    width: 100%;
    min-width: 0
}

.iconbtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, .05);
    cursor: pointer
}

.iconbtn:hover {
    background: rgba(255, 255, 255, .09)
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, .06);
    cursor: pointer;
    color: inherit
}

.btn:hover {
    background: rgba(255, 255, 255, .1)
}

.btn.primary {
    background: rgba(155, 176, 255, .22);
    border-color: rgba(155, 176, 255, .45)
}

.btn.primary:hover {
    background: rgba(155, 176, 255, .28)
}

.btn.bad {
    background: rgba(255, 107, 107, .18);
    border-color: rgba(255, 107, 107, .38)
}

.btn.bad:hover {
    background: rgba(255, 107, 107, .24)
}

body.light .btn {
    background: #fff;
    border-color: rgba(0, 0, 0, 0.08);
}

body.light .btn:hover {
    background: #f0f2f8;
}

body.light .btn.primary {
    background: #4a6fff;
    border-color: #4a6fff;
    color: #fff;
}

body.light .btn.primary:hover {
    background: #3b5bdb;
}

.btn.ghost {
    background: transparent
}

.chip {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    border: 1px solid var(--line);
    color: var(--muted);
    font-size: 12px
}

.chip.brand {
    border-color: rgba(155, 176, 255, .45);
    background: rgba(155, 176, 255, .12);
    color: #fff
}

.layout {
    display: grid;
    grid-template-columns: 260px 1fr 280px;
    gap: 14px;
    align-items: start
}

.layout.admin {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 24px;
    width: 100%;
    margin: 20px 0;
    align-items: start;
    padding: 0;
}

/* Force container to be full width for admin pages */
body[data-page^="mod"] .container,
body[data-page="adminSettings"] .container,
body[data-page="adminPages"] .container {
    max-width: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
}

/* Sidebar Layout */
.leftCol {
    position: sticky;
    top: calc(var(--th) + 40px);
    align-self: start;
}

.leftCol .card {
    border: none;
    background: transparent;
    box-shadow: none;
}

.leftCol .hd {
    padding: 0 0 12px 0;
    border-bottom: 2px solid var(--line);
    margin-bottom: 8px;
}

.leftCol .bd {
    padding: 0;
}

.leftCol .item {
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    padding: 8px 4px;
    gap: 8px;
}

.leftCol .item:hover {
    background: rgba(255, 255, 255, 0.02);
    padding-left: 8px;
}

.leftCol .item .h3 {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--fg);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.leftCol .item .small {
    font-size: 11px;
    opacity: 0.5;
}

body.light .leftCol .item {
    border-bottom-color: rgba(0, 0, 0, 0.04);
}

body.light .leftCol .item:hover {
    background: rgba(0, 0, 0, 0.02);
}


.layout.admin .centerCol {
    width: 100%;
    min-width: 0;
    /* Fix for grid overflow */
}

.admin-nav-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 12px;
    position: sticky;
    top: 80px;
    box-shadow: var(--shadow);
}

.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 14px;
    color: var(--muted);
    font-weight: 600;
    transition: all 0.2s;
    margin-bottom: 4px;
}

.admin-nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.admin-nav-item.active {
    background: rgba(155, 176, 255, 0.12);
    color: var(--brand);
    border: 1px solid rgba(155, 176, 255, 0.2);
}

.rightCol {
    position: sticky;
    top: calc(var(--th) + 40px);
    z-index: 10;
    align-self: start;
}

.admin-nav-item .icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

body.light .admin-nav-card {
    background: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

body.light .admin-nav-item:hover {
    background: rgba(0, 0, 0, 0.04);
    color: var(--brand);
}

body.light .admin-nav-item.active {
    background: rgba(155, 176, 255, 0.15);
    color: #4a69bd;
}


@media (max-width:980px) {
    .layout {
        grid-template-columns: 1fr
    }

    .leftCol {
        position: static;
        height: auto;
        max-height: 300px;
        /* Limit height on mobile if many topics */
        margin-bottom: 20px;
    }

    .actions {
        width: 100%
    }

    .pill {
        min-width: 0;
        flex: 1 1 100%
    }

    .nav {
        width: 100%
    }

    .actions {
        margin-left: 0;
        justify-content: space-between
    }
}

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--r);
    box-shadow: var(--shadow);
    overflow: hidden
}

.card .hd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--line)
}

.card .hd h2 {
    margin: 0;
    font-size: 15px;
    letter-spacing: .2px
}

.card .bd {
    padding: 12px 14px
}

.list {
    display: flex;
    flex-direction: column;
    gap: 10px
}

.item {
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, .04);
    display: flex;
    gap: 10px;
    align-items: flex-start;
    transition: background 0.2s;
}

.item.unread {
    background: rgba(155, 176, 255, 0.05);
}

.item:hover {
    background: rgba(255, 255, 255, .07)
}

.item .grow {
    flex: 1;
    min-width: 0
}

.h3 {
    margin: 0;
    font-weight: 800;
    font-size: 14px
}

.p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.4;
    overflow-wrap: anywhere
}

.kv {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center
}

.small {
    font-size: 12px;
    color: var(--muted2)
}

.ad {
    border: 1px dashed rgba(255, 255, 255, .25);
    border-radius: var(--r);
    padding: 14px;
    background: rgba(255, 255, 255, .04)
}

.ad-top {
    margin-bottom: 14px
}

.ad-right {
    min-height: 130px
}

.entry {
    padding: 12px 12px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, .04)
}

.entryHead {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px
}

.userchip {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: linear-gradient(135deg, #9bb0ff, #c8a9ff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    overflow: hidden;
    flex-shrink: 0;
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-text {
    font-size: 14px;
    color: #fff;
}

.entry-topic-link {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

.entry-topic-link .chip {
    font-size: 11px;
    padding: 2px 8px;
    font-weight: 700;
}

.entryActions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    /* Reduced gap */
    margin-top: 10px;
}

.xbtn {
    display: flex;
    flex-direction: row;
    /* Yan yana olması için zorla */
    align-items: center;
    justify-content: center;
    padding: 3px 10px;
    background: #1c212d;
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 999px;
    color: #8c96ae;
    font-size: 11px;
    /* Smaller font */
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
    white-space: nowrap;
    /* Metin kaymasını engelle */
    gap: 4px;
    /* İşaret ve sayı arasındaki boşluk */
}

.xbtn:hover {
    background: #2a3245;
    color: #fff;
}

.xbtn.active {
    background: #2a3245;
    border-color: var(--brand);
    color: var(--brand);
}

.xbtn.active[data-act="fav"] {
    background: rgba(255, 185, 56, .1);
    border-color: #ffb938;
    color: #ffb938;
}

.xbtn[data-act="report"] {
    background: rgba(255, 107, 107, .05);
    border-color: rgba(255, 107, 107, .12);
    color: #ffa4a4;
}

.xbtn[data-act="report"]:hover {
    background: rgba(255, 107, 107, .1);
    border-color: rgba(255, 107, 107, .3);
    color: #ff6b6b;
}

body.light .xbtn {
    background: #fff;
    border-color: rgba(0, 0, 0, 0.08);
    color: #556080;
}

body.light .xbtn:hover {
    background: #f0f2f8;
    color: #151a2b;
}

body.light .xbtn.active {
    background: #eff3ff;
    border-color: #4a6fff;
    color: #4a6fff;
}

.form {
    display: flex;
    flex-direction: column;
    gap: 10px
}

.inp,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, .05);
    border-radius: 14px;
    padding: 10px 12px;
    color: inherit;
    outline: none
}

textarea {
    min-height: 110px;
    resize: vertical
}

select.inp,
select {
    cursor: pointer;
}

select option {
    background: var(--card);
    color: #1a1f2e;
}

body.light select option {
    background: #fff;
    color: #151a2b;
}

.grid2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px
}

@media (max-width:720px) {
    .grid2 {
        grid-template-columns: 1fr
    }
}

.modalBackdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .55);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 90
}

.modal {
    width: min(520px, 100%);
    background: rgba(15, 20, 36, .95);
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, .6);
    overflow: hidden
}

body.light .modal {
    background: rgba(245, 247, 255, .95)
}

.modal .hd {
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between
}

.modal .bd {
    padding: 14px 16px
}

.modalBackdrop.show {
    display: flex
}

.footer {
    margin-top: 16px;
    padding: 18px 0;
    color: var(--muted2);
    font-size: 12px;
    border-top: 1px solid var(--line)
}

/* Report Modal Styles */
.report-reasons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 10px 0;
}

.reason-item {
    padding: 12px 16px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
}

.reason-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 107, 107, 0.3);
    color: var(--bad);
}

.reason-item .icon {
    font-size: 18px;
    opacity: 0.7;
}


.notice {
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, .04);
    color: var(--muted)
}

.notice.good {
    border-color: rgba(82, 211, 138, .35);
    background: rgba(82, 211, 138, .12);
    color: #d8ffea
}

.notice.bad {
    border-color: rgba(255, 107, 107, .35);
    background: rgba(255, 107, 107, .12);
    color: #ffe0e0
}

/* Auth Pages Modernization */
.auth-layout {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 100px);
    padding: 20px;
}

.auth-card {
    width: min(440px, 100%);
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 28px;
    padding: 40px;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5);
    animation: authSlideUp 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes authSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-header .logo {
    margin: 0 auto 16px;
    width: 54px;
    height: 54px;
}

.auth-header h1 {
    margin: 0;
    font-size: 26px;
    font-weight: 900;
    background: linear-gradient(135deg, #fff, #9bb0ff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-header p {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.input-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    margin-left: 4px;
}

.auth-inp {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 14px 18px;
    color: #fff;
    font-size: 15px;
    transition: all 0.3s ease;
    outline: none;
}

.auth-inp:focus {
    background: rgba(255, 255, 255, 0.07);
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(155, 176, 255, 0.15);
}

.auth-btn {
    margin-top: 10px;
    padding: 14px;
    font-weight: 700;
    font-size: 15px;
    background: linear-gradient(135deg, #9bb0ff, #7a94ff);
    color: #0b0f1a;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(155, 176, 255, 0.3);
}

.auth-btn:active {
    transform: translateY(0);
}

.auth-footer {
    margin-top: 24px;
    text-align: center;
    font-size: 14px;
    color: var(--muted);
}

.auth-footer a {
    color: var(--brand);
    font-weight: 600;
    margin-left: 4px;
}

.auth-footer a:hover {
    text-decoration: underline;
}

body.light .auth-card {
    background: rgba(255, 255, 255, 0.6);
    border-color: rgba(0, 0, 0, 0.05);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.05);
}

body.light .auth-header h1 {
    background: linear-gradient(135deg, #151a2b, #4a6fff);
    -webkit-background-clip: text;
    background-clip: text;
}

body.light .auth-inp {
    background: #fff;
    border-color: rgba(0, 0, 0, 0.08);
    color: #000;
}

body.light .auth-inp:focus {
    background: #fff;
    border-color: var(--brand);
}

/* Profile Page Modernization */
.profile-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.profile-cover {
    height: 120px;
    background: linear-gradient(135deg, rgba(155, 176, 255, 0.2), rgba(200, 169, 255, 0.2));
    position: relative;
}

.profile-info {
    padding: 0 24px 24px;
    margin-top: -45px;
    position: relative;
}

.profile-avatar-large {
    width: 90px;
    height: 90px;
    border-radius: 24px;
    background: linear-gradient(135deg, #9bb0ff, #c8a9ff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: 900;
    color: #0b0f1a;
    border: 4px solid var(--bg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.profile-details {
    margin-top: 16px;
}

.profile-details h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 900;
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-details .email {
    color: var(--muted);
    font-size: 14px;
    margin-top: 4px;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

.stat-item {
    text-align: center;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-value {
    display: block;
    font-size: 18px;
    font-weight: 800;
    color: #fff;
}

.stat-label {
    display: block;
    font-size: 11px;
    color: var(--muted2);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
}

.profile-meta {
    margin-top: 20px;
    font-size: 13px;
    color: var(--muted2);
    display: flex;
    align-items: center;
    gap: 6px;
}

.profile-meta svg {
    width: 16px;
    height: 16px;
    opacity: 0.6;
}

.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 14px 18px;
    border-radius: 14px;
    background: rgba(15, 20, 36, .95);
    border: 1px solid var(--line);
    box-shadow: 0 10px 40px rgba(0, 0, 0, .4);
    z-index: 100;
    animation: toastSlide 0.3s ease;
    max-width: 320px;
}

@keyframes toastSlide {
    from {
        transform: translateX(400px);
        opacity: 0;
    }

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

.toast.good {
    border-color: rgba(82, 211, 138, .45);
    background: rgba(82, 211, 138, .15);
    color: #d8ffea;
}

.toast.bad {
    border-color: rgba(255, 107, 107, .45);
    background: rgba(255, 107, 107, .15);
    color: #ffe0e0;
}

body.light .toast {
    background: rgba(255, 255, 255, .98);
    border-color: rgba(0, 0, 0, 0.15);
    color: #151a2b;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .15);
}

body.light .toast.good {
    border-color: rgba(34, 139, 34, .6);
    background: rgba(34, 139, 34, .1);
    color: #0d5c0d;
}

body.light .toast.bad {
    border-color: rgba(220, 38, 38, .6);
    background: rgba(220, 38, 38, .1);
    color: #991b1b;
}

#toastHost {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--muted);
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.empty-state-text {
    font-size: 16px;
    font-weight: 600;
}

.loading {
    text-align: center;
    padding: 40px;
    color: var(--muted);
}

.spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 16px;
    border: 3px solid rgba(255, 255, 255, .1);
    border-top-color: var(--brand);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Admin Mode UI */
.topbar.admin-bar {
    background: rgba(15, 20, 36, 0.85);
    border-bottom: 2px solid var(--brand);
}

body.light .topbar.admin-bar {
    background: rgba(245, 247, 255, 0.9);
}

.brand .badge {
    font-size: 10px;
    background: var(--brand);
    color: var(--bg);
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: 800;
    margin-left: 4px;
    vertical-align: middle;
}

/* Profile Avatar Styles */
.profile-avatar-wrapper {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 24px;
    background: linear-gradient(135deg, #9bb0ff, #c8a9ff);
    margin-right: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    flex-shrink: 0;
}

.profile-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-avatar-large {
    font-size: 36px;
    font-weight: 900;
    color: #fff;
}

.avatar-edit-btn {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    border: none;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
    cursor: pointer;
}

.profile-avatar-wrapper:hover .avatar-edit-btn {
    opacity: 1;
}

.avatar-edit-btn:hover {
    background: rgba(0, 0, 0, 0.6);
}

.profile-info {
    display: flex;
    align-items: flex-start;
}

@media (max-width: 600px) {
    .profile-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .profile-avatar-wrapper {
        margin-right: 0;
        margin-bottom: 20px;
    }
}

/* Profile Tabs Styles */
.profile-tabs {
    margin-top: 24px;
    border-bottom: 1px solid var(--line);
    display: flex;
    gap: 4px;
    padding: 0 4px;
    overflow-x: auto;
    scrollbar-width: none;
    /* Hide scrollbar for Firefox */
}

.profile-tabs::-webkit-scrollbar {
    display: none;
    /* Hide scrollbar for Chrome/Safari */
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--muted);
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    position: relative;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    display: flex;
    align-items: center;
}

.tab-btn:hover {
    color: var(--fg);
}

.tab-btn::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 20px;
    right: 20px;
    height: 3px;
    background: var(--brand);
    border-radius: 10px 10px 0 0;
    opacity: 0;
    transform: scaleX(0);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.tab-btn.active {
    color: var(--brand);
}

.tab-btn.active::after {
    opacity: 1;
    transform: scaleX(1);
}

.tab-count {
    font-size: 11px;
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 8px;
    border-radius: 8px;
    margin-left: 8px;
    font-weight: 800;
    color: var(--muted);
    transition: all 0.2s;
}

.tab-btn.active .tab-count {
    background: rgba(155, 176, 255, 0.15);
    color: var(--brand);
}

body.light .tab-count {
    background: rgba(0, 0, 0, 0.05);
}

body.light .tab-btn.active .tab-count {
    background: rgba(155, 176, 255, 0.2);
}

/* =================================================
   THEME BUTTON – GARANTİ ÇÖZÜM (Osman özel)
   Dark  : BEYAZ GÜNEŞ
   Light : SİYAH AY
   ================================================= */

/* ikon svg'leri net görünsün */
#themeBtn svg{
  width:20px;
  height:20px;
  stroke-width:2.2;
}

/* ===== DARK (varsayılan) ===== */
#themeBtn{
  color:#ffffff !important;   /* güneş beyaz */
}

#themeBtn .themeIcon--sun{
  display:flex !important;
}

#themeBtn .themeIcon--moon{
  display:none !important;
}

/* ===== LIGHT ===== */
body.light #themeBtn{
  color:#000000 !important;   /* ay siyah */
}

body.light #themeBtn .themeIcon--sun{
  display:none !important;
}

body.light #themeBtn .themeIcon--moon{
  display:flex !important;
}

/* ============================================
   THEME BUTTON ICON – GARANTİ (CSS ile çiz)
   Dark  : BEYAZ GÜNEŞ
   Light : SİYAH AY
   ============================================ */

/* Butonun içindeki olası SVG/ikonları kapat (karışmasın) */
#themeBtn svg,
#themeBtn i,
#themeBtn .themeIcon{
  display: none !important;
}

/* Dark (varsayılan): BEYAZ GÜNEŞ */
#themeBtn::before{
  content:"";
  display:block;
  width:20px;
  height:20px;
  background-repeat:no-repeat;
  background-position:center;
  background-size:contain;
  /* beyaz güneş svg */
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='5'/%3E%3Cline x1='12' y1='1' x2='12' y2='3'/%3E%3Cline x1='12' y1='21' x2='12' y2='23'/%3E%3Cline x1='4.22' y1='4.22' x2='5.64' y2='5.64'/%3E%3Cline x1='18.36' y1='18.36' x2='19.78' y2='19.78'/%3E%3Cline x1='1' y1='12' x2='3' y2='12'/%3E%3Cline x1='21' y1='12' x2='23' y2='12'/%3E%3Cline x1='4.22' y1='19.78' x2='5.64' y2='18.36'/%3E%3Cline x1='18.36' y1='5.64' x2='19.78' y2='4.22'/%3E%3C/svg%3E");
}

/* Light tema: SİYAH AY */
body.light #themeBtn::before{
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23000000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z'/%3E%3C/svg%3E");
}
