:root {
    --background: #0d0b17;
    --background-2: #12101d;
    --surface: rgba(26, 22, 40, 0.75);
    --surface-solid: #1a1628;
    --surface-2: rgba(34, 29, 52, 0.65);
    --surface-2-solid: #221d34;
    --surface-hover: rgba(255, 255, 255, 0.03);
    --border: rgba(255, 255, 255, 0.07);
    --border-strong: rgba(167, 139, 250, 0.18);
    --foreground: #ece9f5;
    --muted: #9089a8;
    --muted-2: #605876;

    --accent: #a78bfa;
    --accent-2: #8b7ce6;
    --accent-3: #c4b5fd;
    --accent-soft-bg: rgba(167, 139, 250, 0.12);
    --accent-gradient: linear-gradient(135deg, #a78bfa 0%, #8b7ce6 100%);
    --accent-gradient-soft: linear-gradient(135deg, rgba(167, 139, 250, 0.14), rgba(139, 124, 230, 0.10));
    --accent-shadow: 0 8px 24px rgba(139, 92, 246, 0.22);

    --tone-amber: #f5c265;
    --tone-amber-soft-bg: rgba(245, 194, 101, 0.10);
    --tone-sky: #7dd3fc;
    --tone-sky-soft-bg: rgba(125, 211, 252, 0.10);
    --tone-pink: #f0a9d1;
    --tone-pink-soft-bg: rgba(240, 169, 209, 0.10);
    --tone-emerald: #86e3c3;
    --tone-emerald-soft-bg: rgba(134, 227, 195, 0.12);
    --tone-red: #f0839a;
    --tone-red-soft-bg: rgba(240, 131, 154, 0.12);

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.5);
    --radius: 14px;
    --radius-lg: 18px;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
    margin: 0;
    font-family: "Plus Jakarta Sans", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background:
        radial-gradient(1100px 700px at 12% -10%, rgba(167, 139, 250, 0.14), transparent 60%),
        radial-gradient(1000px 700px at 105% 10%, rgba(240, 169, 209, 0.08), transparent 60%),
        linear-gradient(180deg, #0d0b17 0%, #12101d 100%);
    background-attachment: fixed;
    color: var(--foreground);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    font-feature-settings: "cv02", "cv03", "cv04", "cv11";
}

/* Yumuşak arka plan lekeleri */
.glow-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}
.glow-bg::before,
.glow-bg::after {
    content: "";
    position: absolute;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.28;
    animation: floatGlow 22s ease-in-out infinite alternate;
}
.glow-bg::before {
    top: -180px;
    left: -180px;
    background: radial-gradient(circle, #a78bfa, transparent 70%);
}
.glow-bg::after {
    top: -100px;
    right: -180px;
    background: radial-gradient(circle, #f0a9d1, transparent 70%);
    animation-delay: -10s;
}
@keyframes floatGlow {
    0%   { transform: translate(0, 0) scale(1); }
    50%  { transform: translate(24px, 32px) scale(1.05); }
    100% { transform: translate(-16px, 20px) scale(0.96); }
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: rgba(167, 139, 250, 0.22);
    border-radius: 8px;
    border: 2px solid transparent;
    background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(167, 139, 250, 0.4);
    background-clip: padding-box;
}

a { color: var(--accent); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--accent-3); }

::selection { background: rgba(167, 139, 250, 0.3); color: #fff; }

.logo-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--accent-gradient);
    color: #fff;
    font-weight: 600;
    font-size: 17px;
    flex-shrink: 0;
    box-shadow: var(--accent-shadow);
    letter-spacing: -0.02em;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(24px) saturate(140%);
    -webkit-backdrop-filter: blur(24px) saturate(140%);
}

.field-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--muted);
    margin: 14px 0 6px;
}

input[type="text"], input[type="password"] {
    width: 100%;
    padding: 12px 14px;
    margin: 0 0 12px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: rgba(13, 11, 23, 0.55);
    color: var(--foreground);
    font-family: inherit;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
input[type="text"]:hover, input[type="password"]:hover { border-color: var(--border-strong); }
input[type="text"]:focus, input[type="password"]:focus {
    outline: none;
    border-color: rgba(167, 139, 250, 0.5);
    background: rgba(13, 11, 23, 0.8);
    box-shadow: 0 0 0 4px var(--accent-soft-bg);
}
input::placeholder { color: var(--muted-2); }

.btn-primary {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px 20px;
    background: var(--accent-gradient);
    border: 0;
    color: #fff;
    border-radius: 12px;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.01em;
    transition: transform 0.18s ease, box-shadow 0.25s ease, filter 0.2s ease;
    box-shadow: var(--accent-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.12);
    overflow: hidden;
    isolation: isolate;
}
.btn-primary::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.22) 50%, transparent 100%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
    z-index: -1;
}
.btn-primary:hover { filter: brightness(1.06); box-shadow: 0 12px 30px rgba(139, 92, 246, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.14); transform: translateY(-1px); }
.btn-primary:hover::before { transform: translateX(100%); }
.btn-primary:active { transform: translateY(0); filter: brightness(0.96); }
.btn-primary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.btn-primary:disabled { cursor: wait; opacity: 0.75; transform: none; filter: none; }
.btn-primary svg { width: 16px; height: 16px; flex-shrink: 0; transition: transform 0.2s ease; }
.btn-primary:hover svg.icon-arrow { transform: translateX(3px); }
.btn-primary .btn-spinner {
    width: 15px; height: 15px; border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    animation: spin 0.7s linear infinite;
    flex-shrink: 0;
}

/* Input with leading icon */
.input-group {
    position: relative;
    margin-bottom: 12px;
}
.input-group input[type="text"],
.input-group input[type="password"] {
    margin: 0;
    padding-left: 42px;
}
.input-group .input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--muted);
    pointer-events: none;
    transition: color 0.2s ease;
}
.input-group:focus-within .input-icon { color: var(--accent); }
.input-group .input-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.2s ease, color 0.2s ease;
}
.input-group .input-toggle:hover { background: rgba(255, 255, 255, 0.05); color: var(--foreground); }
.input-group .input-toggle svg { width: 16px; height: 16px; }

.btn-logout {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--tone-red);
    text-decoration: none;
    font-weight: 500;
    font-size: 13px;
    padding: 8px 14px;
    background: transparent;
    border: 1px solid rgba(240, 131, 154, 0.2);
    border-radius: 10px;
    transition: background 0.2s ease, border-color 0.2s ease;
}
.btn-logout:hover {
    background: var(--tone-red-soft-bg);
    border-color: rgba(240, 131, 154, 0.35);
}

.error, .profile-error {
    background: var(--tone-amber-soft-bg);
    color: var(--tone-amber);
    padding: 12px 15px;
    border-radius: 11px;
    font-size: 13px;
    margin-bottom: 14px;
    border: 1px solid rgba(245, 194, 101, 0.18);
}

/* Dropdown */
.dropdown { position: relative; margin-bottom: 6px; }
.dropdown-btn {
    display: flex; align-items: center; justify-content: space-between;
    width: 100%; padding: 11px 14px; gap: 10px;
    border: 1px solid var(--border); border-radius: 11px;
    background: rgba(13, 11, 23, 0.55); color: var(--foreground);
    cursor: pointer; font-size: 14px; box-sizing: border-box; font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.dropdown-btn:hover { border-color: var(--border-strong); background: rgba(13, 11, 23, 0.8); }
.dropdown-btn:focus-visible, .dropdown-btn[aria-expanded="true"] {
    outline: none; border-color: rgba(167, 139, 250, 0.5); box-shadow: 0 0 0 4px var(--accent-soft-bg);
}
.dropdown-btn[aria-expanded="true"] .dropdown-arrow { transform: rotate(180deg); }
.dropdown-current { display: flex; align-items: center; gap: 10px; min-width: 0; }
.dropdown-current > span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flag-icon { width: 24px; height: 16px; object-fit: cover; border-radius: 3px; flex-shrink: 0; box-shadow: 0 1px 3px rgba(0,0,0,0.3); }
.option-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 26px; height: 26px; border-radius: 8px; flex-shrink: 0;
    background: var(--accent-soft-bg); color: var(--accent); font-size: 11px; font-weight: 600;
}
.dropdown-meta { font-size: 11px; color: var(--muted); font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace; flex-shrink: 0; letter-spacing: 0.02em; }
.dropdown-arrow { font-size: 10px; color: var(--muted); flex-shrink: 0; transition: transform 0.2s ease; }
.dropdown-listbox {
    position: absolute; z-index: 10; top: calc(100% + 6px); left: 0; right: 0;
    max-height: 280px; overflow-y: auto;
    background: rgba(26, 22, 40, 0.95);
    backdrop-filter: blur(22px) saturate(150%);
    -webkit-backdrop-filter: blur(22px) saturate(150%);
    border: 1px solid var(--border); border-radius: 12px;
    box-shadow: var(--shadow-lg);
    padding: 6px; margin: 0; list-style: none;
    animation: dropdownIn 0.2s ease-out;
}
@keyframes dropdownIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}
.dropdown-option {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    width: 100%; padding: 9px 10px; border: 0; background: none;
    color: var(--foreground); cursor: pointer; font-size: 14px; text-align: left; border-radius: 9px;
    font-family: inherit;
    transition: background 0.15s ease;
}
.dropdown-option:hover { background: rgba(255, 255, 255, 0.04); }
.dropdown-option.selected { background: var(--accent-soft-bg); color: var(--accent-3); }
.dropdown-option.selected .option-icon { background: rgba(255, 255, 255, 0.1); color: #fff; }
.dropdown-option-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.dropdown-option-left > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Navbar */
.navbar {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(13, 11, 23, 0.72);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    border-bottom: 1px solid var(--border);
}
.navbar-inner {
    max-width: 1040px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.navbar-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; flex-shrink: 0; }
.navbar-brand .logo-dot { width: 34px; height: 34px; font-size: 14px; margin-bottom: 0; border-radius: 10px; }
.navbar-title {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--foreground);
}
.navbar-title .navbar-tld {
    color: var(--muted);
    font-weight: 500;
}

.navbar-links { flex: 1; display: flex; align-items: center; justify-content: center; gap: 2px; }
.navbar-link {
    display: inline-flex; align-items: center; gap: 6px;
    color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 500;
    padding: 8px 14px; border-radius: 9px;
    transition: color 0.2s ease, background 0.2s ease;
}
.navbar-link:hover { color: var(--foreground); background: rgba(255, 255, 255, 0.04); }
.navbar-link.active {
    color: var(--accent-3);
    background: var(--accent-soft-bg);
}
.navbar-link .ext-arrow { font-size: 11px; opacity: 0.6; }

.navbar-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.navbar-lang {
    display: flex; align-items: center; gap: 2px;
    background: rgba(34, 29, 52, 0.55); border: 1px solid var(--border); border-radius: 9px; padding: 3px;
}
.navbar-lang a {
    padding: 5px 10px; border-radius: 6px; font-size: 11px; font-weight: 600;
    color: var(--muted); text-decoration: none; letter-spacing: 0.02em;
    transition: background 0.2s ease, color 0.2s ease;
}
.navbar-lang a:hover { color: var(--foreground); }
.navbar-lang a.active {
    background: var(--accent-gradient);
    color: #fff;
}
.navbar-pill {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 12px 5px 6px; border-radius: 999px;
    background: rgba(34, 29, 52, 0.55); border: 1px solid var(--border);
    font-size: 11px; font-weight: 500; color: var(--muted); letter-spacing: 0.02em;
}
.navbar-pill .flag-icon { width: 18px; height: 12px; }
.navbar-user { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.navbar-user strong { color: var(--foreground); font-weight: 500; }
.navbar-avatar {
    width: 30px; height: 30px; border-radius: 9px; object-fit: cover;
    border: 1px solid var(--border-strong);
}

@media (max-width: 720px) {
    .navbar-links { display: none; }
}

/* Alt sekmeler */
.subnav {
    background: rgba(13, 11, 23, 0.55);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
}
.subnav-inner {
    max-width: 1040px;
    margin: 0 auto;
    padding: 10px 24px;
    display: flex;
    gap: 4px;
}
.subnav-link {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 16px; border-radius: 9px;
    font-size: 14px; font-weight: 500;
    color: var(--muted); text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}
.subnav-link:hover { background: rgba(255, 255, 255, 0.04); color: var(--foreground); }
.subnav-link.active {
    background: var(--accent-soft-bg);
    color: var(--accent-3);
}
.subnav-icon { font-size: 12px; width: 14px; height: 14px; flex-shrink: 0; }
svg.subnav-icon { display: inline-block; }

.page-wrap { padding: 32px 20px; }

/* Dashboard container */
.container {
    max-width: 880px;
    margin: 0 auto;
    padding: 34px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(24px) saturate(140%);
    -webkit-backdrop-filter: blur(24px) saturate(140%);
}
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    padding-bottom: 18px;
    margin-bottom: 24px;
}
.header h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--foreground);
}

.form-group { margin-bottom: 20px; }
.form-group > label { display: block; font-weight: 500; margin-bottom: 8px; color: var(--muted); font-size: 13px; }
select {
    width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: 11px;
    font-size: 14px; background: rgba(13, 11, 23, 0.55); color: var(--foreground); box-sizing: border-box;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
select:hover { border-color: var(--border-strong); }
select:focus { outline: none; border-color: rgba(167, 139, 250, 0.5); box-shadow: 0 0 0 4px var(--accent-soft-bg); }

/* Terminal */
.terminal {
    margin-top: 22px;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--border);
    font-family: "JetBrains Mono", "SFMono-Regular", Consolas, "Cascadia Code", monospace;
    font-size: 13px;
    animation: successPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: var(--shadow-md);
}

.terminal-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 11px 14px;
    background: #1a1727;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.terminal-dot {
    width: 12px; height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}
.terminal-dot--red    { background: #f0839a; }
.terminal-dot--yellow { background: #f5c265; }
.terminal-dot--green  { background: #86e3c3; }
.terminal-title {
    margin-left: 8px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.35);
    letter-spacing: 0.4px;
    flex: 1;
    text-align: center;
}

.terminal-body {
    background: #0a0812;
    padding: 16px 18px 14px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-height: 80px;
}
.terminal-line {
    line-height: 1.65;
    white-space: pre-wrap;
    word-break: break-all;
}

.t-prompt  { color: #a78bfa; font-weight: 600; margin-right: 6px; }
.t-cmd     { color: #ece9f5; }
.t-arg     { color: #86e3c3; }
.t-muted   { color: #605876; font-size: 12px; }
.t-time    { margin-left: 10px; color: #443c58; font-size: 11px; }
.t-success { color: #86e3c3; font-weight: 600; }
.t-error   { color: #f0839a; font-weight: 600; }
.t-raw     { color: #7a708f; font-size: 11px; margin-top: 4px; }
.t-blink   { animation: blink 1s step-end infinite; }

.terminal-cursor::after {
    content: '█';
    color: #a78bfa;
    animation: blink 1.1s step-end infinite;
}
@keyframes blink {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0; }
}

.response-box {
    background: #0a0812; color: #d4cfe2; padding: 15px; border-radius: 12px;
    font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace; font-size: 13px;
    overflow-x: auto; margin-top: 15px; white-space: pre-wrap; border: 1px solid var(--border);
}
.status { font-weight: 500; margin-top: 22px; color: var(--muted); font-size: 13px; }
.badge {
    background: var(--accent-soft-bg);
    color: var(--accent-3);
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-family: "JetBrains Mono", monospace;
    font-weight: 500;
}
hr.divider { border: 0; border-top: 1px solid var(--border); margin: 25px 0; }

/* Anim success banner */
.anim-success {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 22px;
    padding: 18px 20px;
    border-radius: 14px;
    background: rgba(134, 227, 195, 0.08);
    border: 1px solid rgba(134, 227, 195, 0.22);
    animation: successPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes successPop {
    from { opacity: 0; transform: scale(0.97) translateY(6px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}
.anim-success-icon {
    font-size: 30px;
    flex-shrink: 0;
    opacity: 0.9;
}
.anim-success-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--tone-emerald);
    letter-spacing: -0.01em;
}
.anim-success-sub {
    font-size: 13px;
    color: var(--muted);
    margin-top: 3px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

/* Profil kartı */
.profile-card {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-bottom: 22px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--border);
}
.profile-avatar {
    width: 76px;
    height: 76px;
    border-radius: 16px;
    object-fit: cover;
    background: var(--surface-2-solid);
    flex-shrink: 0;
    border: 1px solid var(--border-strong);
}
.profile-info h3 {
    margin: 0 0 3px 0;
    font-size: 21px;
    color: var(--foreground);
    font-weight: 600;
    letter-spacing: -0.02em;
}
.profile-info .profile-tag { color: var(--muted); font-size: 13px; }
.profile-info .profile-uuid {
    color: var(--muted-2);
    font-size: 11px;
    font-family: "JetBrains Mono", monospace;
    margin-top: 4px;
}
.profile-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 26px;
}
.stat-box {
    background: rgba(34, 29, 52, 0.5);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 16px;
    transition: border-color 0.2s ease, background 0.2s ease;
}
.stat-box:hover {
    border-color: var(--border-strong);
    background: rgba(34, 29, 52, 0.75);
}
.stat-box .stat-label {
    font-size: 12px;
    color: var(--muted);
    font-weight: 500;
}
.stat-box .stat-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--foreground);
    margin-top: 4px;
    letter-spacing: -0.01em;
}

.profile-avatar--placeholder, .user-result-avatar--placeholder {
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    background: var(--accent-gradient);
    font-weight: 600;
}
.profile-avatar--placeholder { font-size: 26px; }

.xp-bar-track {
    height: 6px;
    border-radius: 999px;
    background: rgba(13, 11, 23, 0.7);
    overflow: hidden;
    margin-top: 10px;
    border: 1px solid var(--border);
}
.xp-bar-fill {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 999px;
}

/* ── Avatar upload sayfası ────────────────────────────── */
.avatar-sub {
    margin: 6px 0 0;
    font-size: 13.5px;
    color: var(--muted);
}
.avatar-grid {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: 18px;
    margin-bottom: 22px;
}
.drop-zone {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 34px 20px;
    border: 1.5px dashed rgba(167, 139, 250, 0.28);
    border-radius: var(--radius-lg);
    background: rgba(13, 11, 23, 0.35);
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
    text-align: center;
    min-height: 260px;
}
.drop-zone:hover,
.drop-zone:focus-visible {
    border-color: rgba(167, 139, 250, 0.55);
    background: rgba(26, 22, 40, 0.65);
    outline: none;
}
.drop-zone.is-dragging {
    border-color: var(--accent);
    background: var(--accent-soft-bg);
    transform: scale(1.01);
}
.drop-zone.has-file {
    border-style: solid;
    border-color: rgba(167, 139, 250, 0.35);
    background: rgba(26, 22, 40, 0.55);
}
.drop-zone-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    max-width: 260px;
}
.drop-icon {
    width: 46px;
    height: 46px;
    color: var(--accent);
    opacity: 0.85;
    padding: 12px;
    border-radius: 14px;
    background: var(--accent-soft-bg);
    box-sizing: content-box;
}
.drop-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--foreground);
    letter-spacing: -0.01em;
}
.drop-meta {
    font-size: 12px;
    color: var(--muted-2);
    font-family: "JetBrains Mono", monospace;
}
.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(167, 139, 250, 0.08);
    border: 1px solid rgba(167, 139, 250, 0.22);
    color: var(--accent-3);
    border-radius: 10px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.btn-ghost:hover {
    background: rgba(167, 139, 250, 0.14);
    border-color: rgba(167, 139, 250, 0.38);
    color: #fff;
}
.btn-ghost svg { width: 14px; height: 14px; }
.btn-ghost--danger {
    background: rgba(240, 131, 154, 0.08);
    border-color: rgba(240, 131, 154, 0.22);
    color: var(--tone-red);
}
.btn-ghost--danger:hover {
    background: rgba(240, 131, 154, 0.14);
    border-color: rgba(240, 131, 154, 0.38);
    color: #fff;
}

.preview-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 22px 18px;
    background: rgba(34, 29, 52, 0.5);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    min-height: 260px;
}
.preview-label {
    font-size: 12px;
    color: var(--muted);
    letter-spacing: 0.02em;
    font-weight: 500;
    align-self: flex-start;
}
.preview-imgwrap {
    position: relative;
    width: 140px;
    height: 140px;
    border-radius: 20px;
    overflow: hidden;
    background: rgba(13, 11, 23, 0.6);
    border: 1px solid var(--border-strong);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}
.preview-imgwrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.preview-placeholder {
    width: 60px;
    height: 60px;
    color: var(--muted-2);
    display: flex;
    align-items: center;
    justify-content: center;
}
.preview-placeholder svg { width: 100%; height: 100%; }
.preview-meta {
    font-size: 12px;
    color: var(--muted);
    text-align: center;
    word-break: break-all;
    min-height: 16px;
    font-family: "JetBrains Mono", monospace;
    letter-spacing: -0.01em;
}

@media (max-width: 720px) {
    .avatar-grid { grid-template-columns: 1fr; gap: 12px; }
    .drop-zone   { min-height: 200px; padding: 26px 16px; }
    .preview-card{ min-height: unset; }
    .preview-imgwrap { width: 120px; height: 120px; }
}

/* Search */
.search-form { display: flex; gap: 10px; margin-bottom: 22px; }
.search-form input[type="text"] { margin-bottom: 0; }
.search-form .btn-primary { width: auto; white-space: nowrap; padding-left: 22px; padding-right: 22px; }

.search-results-count { font-size: 13px; color: var(--muted); margin-bottom: 12px; }

.user-result-list { list-style: none; margin: 0 0 24px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.user-result {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 12px 14px; background: rgba(34, 29, 52, 0.5); border: 1px solid var(--border); border-radius: 12px;
    transition: border-color 0.2s ease, background 0.2s ease;
}
.user-result:hover {
    border-color: var(--border-strong);
    background: rgba(34, 29, 52, 0.8);
}
.user-result-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.user-result-avatar { width: 42px; height: 42px; border-radius: 11px; object-fit: cover; flex-shrink: 0; background: var(--surface-2-solid); font-size: 16px; border: 1px solid var(--border); }
.user-result-info { min-width: 0; }
.user-result-name { font-weight: 600; color: var(--foreground); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: -0.01em; }
.user-result-id { font-size: 11px; color: var(--muted); font-family: "JetBrains Mono", monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.lookup-btn {
    flex-shrink: 0; width: 36px; height: 36px; border-radius: 10px;
    border: 1px solid var(--border); background: rgba(13, 11, 23, 0.55); color: var(--accent);
    font-size: 14px; cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.lookup-btn:hover {
    background: var(--accent-soft-bg);
    border-color: rgba(167, 139, 250, 0.35);
    color: var(--accent-3);
}

.detail-panel { border-top: 1px solid var(--border); padding-top: 22px; margin-top: 4px; }
.state-pill {
    margin-left: auto; padding: 4px 12px; border-radius: 999px; font-size: 11px; font-weight: 600;
    background: var(--tone-emerald-soft-bg); color: var(--tone-emerald); flex-shrink: 0;
    border: 1px solid rgba(134, 227, 195, 0.2);
}
.state-pill--banned, .state-pill--suspended, .state-pill--closed {
    background: var(--tone-red-soft-bg); color: var(--tone-red); border-color: rgba(240, 131, 154, 0.22);
}
.state-pill--inactive {
    background: var(--tone-amber-soft-bg); color: var(--tone-amber); border-color: rgba(245, 194, 101, 0.22);
}

.detail-subheading {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    margin: 22px 0 12px;
    letter-spacing: 0.02em;
}
.login-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--foreground); }
.login-list li { display: flex; align-items: center; gap: 10px; }

.friend-chip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.friend-chip-form { display: inline-block; }
.friend-chip {
    padding: 7px 14px; border-radius: 999px; border: 1px solid var(--border); background: rgba(34, 29, 52, 0.5);
    color: var(--foreground); font-size: 13px; cursor: pointer; font-family: inherit; font-weight: 500;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.friend-chip:hover {
    background: var(--accent-soft-bg);
    color: var(--accent-3);
    border-color: rgba(167, 139, 250, 0.28);
}

/* US panel */
.subnav-search-wrapper {
    position: relative;
    cursor: pointer;
    user-select: none;
}
.subnav-search-wrapper .subnav-label { pointer-events: none; }

.us-panel {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 340px;
    background: rgba(26, 22, 40, 0.96);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    padding: 14px;
    z-index: 100;
    backdrop-filter: blur(22px) saturate(150%);
    -webkit-backdrop-filter: blur(22px) saturate(150%);
}
.us-panel--open { display: block; animation: usSlideIn .2s ease-out; }
@keyframes usSlideIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.us-input-row { display: flex; gap: 8px; }
.us-input-row input[type="text"] {
    flex: 1; margin: 0; padding: 10px 12px; border-radius: 10px; font-size: 13px;
}
.us-search-btn {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 0;
    background: var(--accent-gradient);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: filter 0.2s ease, transform 0.15s ease;
    box-shadow: var(--accent-shadow);
}
.us-search-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }

.us-results { margin-top: 12px; }
.us-results.hidden { display: none; }

.us-count {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 8px;
    font-weight: 500;
}
.us-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 260px; overflow-y: auto; }
.us-item {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 10px; border-radius: 11px;
    border: 1px solid var(--border); background: rgba(34, 29, 52, 0.5);
    transition: border-color 0.2s ease, background 0.2s ease;
}
.us-item:hover { border-color: var(--border-strong); background: rgba(34, 29, 52, 0.8); }

.us-avatar {
    width: 38px; height: 38px; border-radius: 9px;
    object-fit: cover; flex-shrink: 0;
    background: var(--surface-2-solid); border: 1px solid var(--border);
}
.us-avatar--placeholder {
    display: flex; align-items: center; justify-content: center;
    color: #fff; background: var(--accent-gradient);
    font-weight: 600; font-size: 15px;
}
.us-info { flex: 1; min-width: 0; }
.us-name { display: block; font-weight: 600; color: var(--foreground); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: -0.01em; }
.us-uid  { display: block; font-size: 10px; color: var(--muted); font-family: "JetBrains Mono", monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.us-lookup-btn {
    flex-shrink: 0; width: 34px; height: 34px; border-radius: 9px;
    border: 1px solid var(--border); background: rgba(13, 11, 23, 0.55);
    color: var(--accent); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s ease, border-color 0.2s ease;
}
.us-lookup-btn:hover {
    background: var(--accent-soft-bg);
    border-color: rgba(167, 139, 250, 0.35);
}

.us-loading, .us-error, .us-empty {
    display: flex; align-items: center; gap: 8px;
    padding: 12px; font-size: 13px; color: var(--muted); border-radius: 10px;
}
.us-error { color: var(--tone-red); background: var(--tone-red-soft-bg); border: 1px solid rgba(240, 131, 154, 0.2); }

/* Modal */
.modal {
    position: fixed; inset: 0; z-index: 200;
    display: flex; align-items: center; justify-content: center;
}
.modal.hidden { display: none; }

.modal-overlay {
    position: absolute; inset: 0;
    background: rgba(5, 4, 10, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.modal-content {
    position: relative; z-index: 1;
    background: rgba(26, 22, 40, 0.97);
    border: 1px solid var(--border);
    border-radius: 20px;
    width: 100%;
    max-width: 560px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    animation: modalIn 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
    backdrop-filter: blur(24px) saturate(150%);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
}
@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(8px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 22px 14px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.modal-title { margin: 0; font-size: 16px; font-weight: 600; color: var(--foreground); letter-spacing: -0.01em; }
.modal-close-btn {
    width: 30px; height: 30px; border-radius: 9px;
    border: 1px solid var(--border); background: transparent;
    color: var(--muted); cursor: pointer; font-size: 18px; line-height: 1;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s ease, color 0.2s ease;
}
.modal-close-btn:hover {
    background: var(--tone-red-soft-bg);
    color: var(--tone-red);
    border-color: rgba(240, 131, 154, 0.28);
}

.modal-body {
    padding: 22px;
    overflow-y: auto;
    flex: 1;
}
.modal-loading {
    display: flex; align-items: center; gap: 10px;
    color: var(--muted); font-size: 14px; padding: 20px 0;
}

/* Spinner */
.spinner {
    width: 18px; height: 18px; border-radius: 50%;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    animation: spin 0.75s linear infinite;
    flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Responsive */
@media (max-width: 720px) {
    .navbar-inner { padding: 10px 16px; gap: 8px; }
    .navbar-title { font-size: 14px; }
    .navbar-brand .logo-dot { width: 30px; height: 30px; font-size: 12px; }
    .navbar-right { gap: 8px; }
    .navbar-pill { display: none; }
    .navbar-lang { display: none; }
    .navbar-user { font-size: 12px; }
    .navbar-avatar { width: 26px; height: 26px; }
    .btn-logout { padding: 6px 10px; font-size: 12px; }

    .subnav-inner { padding: 8px 16px; gap: 4px; }
    .subnav-link  { padding: 8px 12px; font-size: 13px; }

    .container { padding: 22px 18px; border-radius: 16px; }
    .page-wrap  { padding: 20px 12px; }

    .profile-card { flex-direction: column; align-items: flex-start; gap: 14px; }
    .profile-avatar { width: 64px; height: 64px; }
    .profile-info h3 { font-size: 18px; }

    .profile-stats { grid-template-columns: repeat(2, 1fr); gap: 8px; }

    .search-form { flex-direction: column; gap: 8px; }
    .search-form .btn-primary { width: 100%; }

    .user-result { padding: 10px 12px; gap: 10px; }
    .user-result-avatar { width: 38px; height: 38px; }
    .user-result-name { font-size: 13px; }
    .user-result-id   { font-size: 10px; }

    .friend-chip-list { gap: 6px; }
    .friend-chip { padding: 6px 12px; font-size: 12px; }

    .modal-content {
        max-width: 100%;
        max-height: 92vh;
        border-radius: 18px 18px 0 0;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        margin: 0;
    }
    .modal { align-items: flex-end; }
    .modal-header { padding: 14px 18px 12px; }
    .modal-body   { padding: 18px; }

    .header { flex-direction: column; align-items: flex-start; gap: 8px; }

    .dropdown-listbox { max-height: 220px; }
}

@media (max-width: 480px) {
    .navbar-user strong { display: none; }
    .navbar-avatar      { display: block; }
    .navbar-inner       { padding: 8px 12px; }

    .subnav-inner { padding: 6px 12px; }
    .subnav-icon  { font-size: 11px; }
    .subnav-link  { padding: 7px 10px; font-size: 12px; gap: 5px; }

    .container  { padding: 16px 14px; border-radius: 14px; }
    .page-wrap  { padding: 12px 8px; }

    .profile-stats { grid-template-columns: repeat(2, 1fr); }

    .profile-card     { margin-bottom: 16px; padding-bottom: 16px; }
    .profile-avatar   { width: 56px; height: 56px; border-radius: 12px; }
    .profile-info h3  { font-size: 17px; }
    .profile-tag      { font-size: 12px; }
    .profile-uuid     { font-size: 10px; }

    .stat-box         { padding: 10px 12px; }
    .stat-box .stat-label { font-size: 11px; }
    .stat-box .stat-value { font-size: 14px; }

    .xp-bar-track { margin-top: 8px; }

    .btn-primary { font-size: 13px; padding: 11px; }
    .btn-logout  { padding: 5px 10px; font-size: 11px; }
    .lookup-btn  { width: 34px; height: 34px; font-size: 13px; }

    .user-result        { padding: 8px 10px; }
    .user-result-avatar { width: 34px; height: 34px; border-radius: 9px; font-size: 13px; }

    .login-list li { font-size: 12px; gap: 6px; }
    .badge         { font-size: 11px; padding: 2px 8px; }

    .detail-subheading { font-size: 11px; margin: 16px 0 8px; }

    .dropdown-btn   { padding: 10px 12px; font-size: 13px; }
    .dropdown-meta  { display: none; }

    .modal-content  { border-radius: 14px 14px 0 0; max-height: 95vh; }
    .modal-title    { font-size: 15px; }
}
