/* ── Okita's Hub Theme ─────────────────────────────────────────────── */
:root {
    --bg:          #111111;
    --panel:       #171717;
    --panel2:      #1d1d1d;
    --border:      #2a2a2a;
    --text:        #e8e8e8;
    --muted:       #7e7e7e;
    --accent:      #e056a0;
    --accent-dim:  #a03870;
    --accent-glow: #ff70c0;
    --gold:        #ffd700;
    --green:       #8BE16D;
    --log-bg:      #0d0d0d;
}

/* ── Reset & Base ─────────────────────────────────────────────────── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: Consolas, "Courier New", monospace;
    min-height: 100vh;
    line-height: 1.6;
    position: relative;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.08;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
    background-repeat: repeat;
}

body > * {
    position: relative;
    z-index: 1;
}

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

/* ── Layout ───────────────────────────────────────────────────────── */
.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 40px 20px 80px;
}

/* ── Two-Column Layout ────────────────────────────────────────────── */
.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: start;
}

@media (max-width: 700px) {
    .two-col {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

/* ── Navigation ───────────────────────────────────────────────────── */
nav {
    background: var(--panel);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav .nav-inner {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
}

nav .nav-brand {
    font-size: 16px;
    font-weight: bold;
    color: var(--accent);
}

nav .nav-links {
    display: flex;
    gap: 24px;
}

nav .nav-links a {
    color: var(--muted);
    font-size: 13px;
    transition: color 0.2s;
}
nav .nav-links a:hover,
nav .nav-links a.active {
    color: var(--accent);
}

/* ── Profile Header ───────────────────────────────────────────────── */
.profile {
    text-align: center;
    margin-bottom: 48px;
}

.profile-pic {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px solid var(--accent);
    object-fit: cover;
    margin-bottom: 16px;
    box-shadow: 0 0 20px rgba(224, 86, 160, 0.3);
    animation: pfp-glow 3s ease-in-out infinite;
}

@keyframes pfp-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(224, 86, 160, 0.3); }
    50% { box-shadow: 0 0 35px rgba(224, 86, 160, 0.6), 0 0 60px rgba(224, 86, 160, 0.2); }
}

.profile h1 {
    font-size: 28px;
    color: var(--text);
    margin-bottom: 4px;
}

.profile .tagline {
    color: var(--muted);
    font-size: 14px;
}

/* ── Section Headers ──────────────────────────────────────────────── */
.section-title {
    font-size: 14px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title::before {
    content: "";
    display: inline-block;
    width: 3px;
    height: 16px;
    background: var(--accent);
    border-radius: 2px;
}

/* ── Link Cards ───────────────────────────────────────────────────── */
.links-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 48px;
}

.link-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: all 0.25s ease;
    cursor: pointer;
    text-decoration: none;
    color: var(--text);
}

.link-card:hover {
    border-color: var(--accent);
    background: var(--panel2);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(224, 86, 160, 0.15);
    color: var(--text);
}

.link-card .link-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.link-card .link-icon svg {
    width: 28px;
    height: 28px;
    fill: var(--accent);
    transition: fill 0.2s;
}

.link-card:hover .link-icon svg {
    fill: var(--accent-glow);
}

.link-card .link-label {
    font-size: 15px;
    font-weight: bold;
}

.link-card .link-handle {
    color: var(--muted);
    font-size: 12px;
    margin-top: 2px;
}

.link-card .link-arrow {
    margin-left: auto;
    color: var(--muted);
    font-size: 18px;
    transition: color 0.2s, transform 0.2s;
}

.link-card:hover .link-arrow {
    color: var(--accent-glow);
    transform: translateX(4px);
}

/* ── Crypto Cards ─────────────────────────────────────────────────── */
.wallets-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 48px;
}

.wallet-card {
    padding: 20px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: border-color 0.25s;
}

.wallet-card:hover {
    border-color: var(--accent-dim);
}

.wallet-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.wallet-coin {
    font-size: 13px;
    font-weight: bold;
    color: var(--gold);
    background: rgba(255, 215, 0, 0.1);
    padding: 2px 10px;
    border-radius: 4px;
}

.wallet-name {
    color: var(--text);
    font-size: 15px;
    font-weight: bold;
}

.wallet-address-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    background: var(--log-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 10px 14px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.wallet-address-row:hover {
    border-color: var(--accent);
}

.wallet-address-row {
    position: relative;
}

.wallet-address-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--accent);
    z-index: 1;
    cursor: pointer;
    letter-spacing: 0.5px;
}

.wallet-address {
    font-size: 12px;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    user-select: all;
    transition: filter 0.3s ease;
}

.wallet-address.blurred {
    filter: blur(5px);
    user-select: none;
    pointer-events: none;
}

.copy-btn {
    background: none;
    border: none;
    color: var(--accent);
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
    white-space: nowrap;
}

.copy-btn:hover {
    background: rgba(224, 86, 160, 0.15);
    color: var(--accent-glow);
}

.copy-btn.copied {
    color: var(--green);
}

.wallet-desc {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

/* ── Software / Releases ──────────────────────────────────────────── */
.releases-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.release-card {
    padding: 20px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.release-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.release-version {
    font-size: 16px;
    font-weight: bold;
    color: var(--accent);
}

.release-date {
    font-size: 12px;
    color: var(--muted);
}

.release-changelog {
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 16px;
    white-space: pre-wrap;
    line-height: 1.6;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: var(--accent);
    color: var(--text);
    border: none;
    border-radius: 6px;
    font-family: inherit;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn:hover {
    background: var(--accent-glow);
    color: var(--bg);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(224, 86, 160, 0.3);
}

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

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

.btn-danger {
    background: #8b2020;
}

.btn-danger:hover {
    background: #b03030;
    box-shadow: 0 4px 15px rgba(176, 48, 48, 0.3);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 12px;
}

/* ── Admin ────────────────────────────────────────────────────────── */
.admin-panel {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
}

.admin-panel h2 {
    font-size: 16px;
    color: var(--accent);
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-input {
    width: 100%;
    padding: 10px 14px;
    background: var(--log-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-family: inherit;
    font-size: 13px;
    transition: border-color 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent);
}

textarea.form-input {
    min-height: 100px;
    resize: vertical;
}

.form-input[type="file"] {
    padding: 8px;
}

.form-input[type="file"]::file-selector-button {
    background: var(--accent);
    color: var(--text);
    border: none;
    padding: 6px 14px;
    border-radius: 4px;
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
    margin-right: 12px;
}

/* ── Login Page ───────────────────────────────────────────────────── */
.login-box {
    max-width: 380px;
    margin: 80px auto;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 32px;
    text-align: center;
}

.login-box h1 {
    font-size: 18px;
    color: var(--accent);
    margin-bottom: 8px;
}

.login-box p {
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 24px;
}

.login-box .form-group {
    text-align: left;
}

.login-box .btn {
    width: 100%;
    justify-content: center;
    margin-top: 8px;
}

/* ── Flash Messages ───────────────────────────────────────────────── */
.flash {
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 16px;
}

.flash-error {
    background: rgba(139, 32, 32, 0.3);
    border: 1px solid #8b2020;
    color: #ff6b6b;
}

.flash-success {
    background: rgba(139, 225, 109, 0.1);
    border: 1px solid rgba(139, 225, 109, 0.3);
    color: var(--green);
}

/* ── Empty State ──────────────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--muted);
    font-size: 14px;
}

/* ── Admin Release Row ────────────────────────────────────────────── */
.admin-release {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}

.admin-release:last-child {
    border-bottom: none;
}

.admin-release-info {
    flex: 1;
}

.admin-release-info .version {
    font-weight: bold;
    color: var(--accent);
    font-size: 14px;
}

.admin-release-info .meta {
    font-size: 11px;
    color: var(--muted);
    margin-top: 2px;
}


/* ── Stats ────────────────────────────────────────────────────────── */
.stats-overview {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.stat-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 24px;
    text-align: center;
}

.stat-number {
    font-size: 36px;
    font-weight: bold;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 12px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}

.stat-row:last-child {
    border-bottom: none;
}

.stat-row-label {
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    margin-right: 12px;
}

.stat-row-value {
    color: var(--accent);
    font-weight: bold;
    flex-shrink: 0;
}

.stat-row-time {
    color: var(--muted);
    font-size: 11px;
    flex-shrink: 0;
}

@media (max-width: 600px) {
    .stats-overview {
        grid-template-columns: 1fr;
    }
}

/* ── Announcement Banner ──────────────────────────────────────────── */
.announcement {
    background: linear-gradient(90deg, var(--accent-dim), var(--accent));
    color: var(--text);
    text-align: center;
    padding: 10px 40px 10px 16px;
    font-size: 13px;
    position: relative;
    animation: announce-slide 0.4s ease-out;
}

@keyframes announce-slide {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

.announcement-close {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text);
    font-size: 20px;
    cursor: pointer;
    opacity: 0.7;
    font-family: inherit;
    line-height: 1;
}

.announcement-close:hover {
    opacity: 1;
}

/* ── Card Tilt Effect ─────────────────────────────────────────────── */
.tilt-card {
    transition: transform 0.15s ease-out, box-shadow 0.25s ease;
    transform-style: preserve-3d;
}

/* ── Footer ───────────────────────────────────────────────────────── */
footer {
    text-align: center;
    padding: 24px;
    color: var(--muted);
    font-size: 11px;
    border-top: 1px solid var(--border);
    margin-top: 48px;
}

/* ── Admin Tab Bar ────────────────────────────────────────────────── */
.admin-tabs {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border);
}
.admin-tabs-inner { display: flex; gap: 0; }
.admin-tab {
    padding: 10px 20px;
    color: var(--muted);
    font-size: 13px;
    font-weight: bold;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}
.admin-tab:hover { color: var(--text); }
.admin-tab.active { color: var(--text); border-bottom-color: var(--accent); }

/* ── Throne Dashboard ────────────────────────────────────────────── */
.throne-goal-card { padding: 8px 0; }
.throne-goal-bar {
    width: 100%;
    height: 18px;
    background: var(--log-bg);
    border-radius: 9px;
    border: 1px solid var(--border);
    overflow: hidden;
}
.throne-goal-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-dim), var(--accent));
    border-radius: 9px;
    transition: width 0.5s ease;
}
.throne-chart-container { min-height: 200px; }
.throne-chart-container svg { display: block; }

/* ── X Admin ─────────────────────────────────────────────────────── */
.xa-conn-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 6px;
    margin-bottom: 16px;
}
.xa-conn-status { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.xa-conn-dot {
    width: 10px; height: 10px; border-radius: 50%; display: inline-block;
    background: var(--muted);
}
.xa-conn-dot.online { background: var(--green); }

.xa-layout {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 16px;
    margin-bottom: 16px;
    min-height: 460px;
}

.xa-accounts-panel {
    background: var(--panel2);
    border: 1px solid var(--border);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.xa-accounts-header {
    padding: 12px 14px 8px;
    font-size: 13px;
    font-weight: bold;
    color: var(--text);
    border-bottom: 1px solid var(--border);
}
.xa-accounts-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
}
.xa-accounts-search .form-input { padding: 6px 10px; font-size: 12px; }
.xa-online-filter {
    display: flex; align-items: center; gap: 4px;
    color: var(--muted); font-size: 11px; white-space: nowrap; cursor: pointer;
}
.xa-accounts-list {
    flex: 1;
    overflow-y: auto;
    padding: 0 6px;
    min-height: 0;
}
.xa-acct-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 6px 8px;
    border-bottom: 1px solid var(--border);
    font-size: 12px;
}
.xa-acct-row:last-child { border-bottom: none; }
.xa-acct-row input[type="checkbox"] { margin-top: 3px; accent-color: var(--accent); }
.xa-acct-dot {
    width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; flex-shrink: 0;
    background: var(--muted);
}
.xa-acct-dot.online { background: var(--green); }
.xa-acct-info { flex: 1; min-width: 0; }
.xa-accounts-footer {
    padding: 8px 14px;
    border-top: 1px solid var(--border);
    font-size: 11px;
    color: var(--muted);
}
.xa-accounts-btns { display: flex; gap: 4px; margin-top: 6px; }
.xa-accounts-btns .btn-sm { padding: 4px 8px; font-size: 10px; }

.xa-action-panel {
    background: var(--panel2);
    border: 1px solid var(--border);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.xa-tab-bar {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}
.xa-tab {
    padding: 8px 14px;
    background: none;
    border: none;
    color: var(--muted);
    font-family: inherit;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}
.xa-tab:hover { color: var(--text); }
.xa-tab.active { color: var(--text); border-bottom-color: var(--accent); }

.xa-badge {
    display: inline-block;
    background: #ff5555;
    color: #fff;
    font-size: 10px;
    padding: 1px 5px;
    border-radius: 8px;
    margin-left: 4px;
    font-weight: bold;
}

.xa-tab-content { flex: 1; overflow-y: auto; padding: 0; }
.xa-pane { padding: 14px; }
.xa-pane-header {
    font-size: 14px;
    font-weight: bold;
    color: var(--text);
    margin-bottom: 12px;
    padding-left: 8px;
    border-left: 2px solid var(--accent);
}

.xa-report-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 10px 12px;
    margin-bottom: 8px;
}
.xa-report-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.xa-report-action {
    background: var(--gold);
    color: #101010;
    font-size: 11px;
    font-weight: bold;
    padding: 1px 6px;
    border-radius: 3px;
}

.xa-log-panel {
    background: var(--log-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
}
.xa-log-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 12px;
    border-bottom: 1px solid var(--border);
    color: var(--muted);
    font-size: 11px;
}
.xa-log-entries {
    height: 100px;
    overflow-y: auto;
    padding: 6px 12px;
    font-size: 12px;
    line-height: 1.5;
}

.xa-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.xa-modal {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 24px;
    max-width: 640px;
    width: 90%;
}
.xa-modal-header {
    font-size: 16px;
    font-weight: bold;
    color: var(--text);
    margin-bottom: 16px;
    text-align: center;
}
.xa-modal canvas {
    display: block;
    margin: 0 auto;
    border: 1px solid var(--border);
    border-radius: 4px;
}

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 800px) {
    .xa-layout { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    .admin-tabs { flex-wrap: wrap; gap: 0; }
    .admin-tabs-inner { flex-wrap: wrap; }
    .admin-tab { padding: 8px 12px; font-size: 12px; }
}

@media (max-width: 600px) {
    .container {
        padding: 24px 16px 60px;
    }

    .profile-pic {
        width: 96px;
        height: 96px;
    }

    .profile h1 {
        font-size: 22px;
    }

    nav .nav-inner {
        padding: 10px 16px;
    }

    nav .nav-links {
        gap: 16px;
    }

    .wallet-address {
        font-size: 11px;
    }
}
