:root {
    --bg: #0b1220;
    --panel: #0f2036;
    --panel-strong: #142a3f;
    --text: #f7fbff;
    --muted: #9fb6d9;
    --accent: #2b7cff;
    --accent-soft: rgba(43, 124, 255, 0.12);
    --border: rgba(255,255,255,0.06);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: radial-gradient(circle at top right, rgba(43,124,255,0.06), transparent 32%),
                linear-gradient(180deg, #071428 0%, #0b1220 100%);
    color: var(--text);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

.page-shell {
    min-height: 100vh;
    padding: 24px;
    max-width: 1180px;
    margin: 0 auto;
}

.content {
    margin: 24px auto 0;
    width: 100%;
    max-width: 1120px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    padding: 16px 24px;
    border-radius: 22px;
    background: rgba(23, 23, 23, 0.94);
    border: 1px solid rgba(255,255,255,0.08);
    backdrop-filter: blur(18px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.24);
}

.brand {
    display: flex;
    gap: 24px;
    align-items: center;
}

.logo {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.2rem;
}

/* icon styles */
.icon {
    width: 1.2em;
    height: 1.2em;
    vertical-align: -0.12em;
    fill: currentColor;
    display: inline-block;
}

.icon-logo { width: 1.4rem; height: 1.4rem; margin-right: 8px; }
.icon-user { width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,0.02); padding:6px; }

.nav-links {
    display: flex;
    gap: 14px;
}

.nav-links a {
    padding: 10px 12px;
    border-radius: 14px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
    background: rgba(43, 124, 255, 0.12);
    transform: translateY(-1px);
    }

    .top-actions {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 10px 14px;
        border-radius: 22px;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.08);

}

.user-badge {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(43,124,255,0.28), rgba(43,124,255,0.12));
    color: #fff;
    font-weight: 700;
}

.icon-btn {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    background: rgba(255,255,255,0.06);
    border-radius: 50%;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 24px;
    border-radius: 24px;
    background: rgba(24,24,24,0.96);
    border: 1px solid rgba(255,255,255,0.08);
}

.page-header h2 {
    margin: 0 0 8px;
    font-size: 2rem;
}

.badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

.badge {
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255,255,255,0.05);
    color: var(--muted);
    font-size: 0.85rem;
}

.header-buttons {
    display: flex;
    gap: 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 999px;
    border: 1px solid rgba(43, 124, 255, 0.24);
    cursor: pointer;
    font-weight: 700;
    transition: all 0.2s ease;
    min-height: 48px;
    white-space: nowrap;
    text-transform: none;
    box-shadow: 0 18px 48px rgba(43, 124, 255, 0.18);
    background: rgba(43, 124, 255, 0.06);
    color: #fff;
}

button.btn,
a.btn {
    appearance: none;
}

.btn-primary,
.btn-accent {
    background: linear-gradient(135deg, #2b7cff 0%, #68a4ff 45%, #dcebff 100%);
    color: #07203a;
    border-color: transparent;
    box-shadow: 0 24px 60px rgba(43, 124, 255, 0.16);
}

.btn-primary:hover,
.btn-accent:hover {
    transform: translateY(-1px);
    box-shadow: 0 26px 64px rgba(43, 124, 255, 0.30);
    filter: brightness(1.05);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    border-color: rgba(43, 124, 255, 0.30);
    width: auto;
    padding: 14px 28px;
}

.btn-secondary:hover {
    background: rgba(43, 124, 255, 0.14);
    border-color: rgba(43, 124, 255, 0.48);
}

.btn-lg {
    padding: 16px 34px;
    font-size: 1rem;
}

.btn-xl {
    padding: 18px 40px;
    font-size: 1rem;
}

.btn-primary:focus,
.btn-secondary:focus,
.btn:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(43, 124, 255, 0.28);
}

.card {
    background: rgba(27, 27, 27, 0.94);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 24px;
    overflow: hidden;
}

.panel-card .panel-title {
    padding: 18px 20px;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    background: linear-gradient(90deg, rgba(43,124,255,0.08), rgba(43,124,255,0));
}

/* ===== iOS-like auth shared styles (moved from templates) ===== */
.auth-shell.ios-style {
    min-height: calc(100vh - 120px);
    display: grid;
    place-items: center;
    padding: 48px 20px;
    background: transparent;
}

.auth-container { width: 100%; max-width: 420px; }

.ios-card {
    border-radius: 22px;
    padding: 28px 22px;
    background: transparent; /* auth card uses transparent background now */
    border: none;
    backdrop-filter: none;
    box-shadow: none;
}

.auth-top { text-align: center; margin-bottom: 16px; }
.brand-small { display:inline-flex; gap:8px; align-items:center; color:#fff; font-weight:700; margin-bottom:6px; }
.brand-small .icon { width:20px; height:20px; }
.auth-title { margin:0; font-size:1.6rem; font-weight:700; color:#fff; }
.auth-subtitle { margin:0; color: rgba(255,255,255,0.65); font-size:0.92rem; }

.ios-form { display:grid; gap:14px; margin-top:12px; }
.input-wrap { width: 100%; }
.ios-input { width:100%; padding:14px 16px; border-radius:12px; border: 1px solid rgba(255,255,255,0.06); background: rgba(10,14,22,0.6); color:#fff; font-size:1rem; box-shadow: 0 6px 18px rgba(0,0,0,0.6) inset; }
.ios-input:focus { outline:none; box-shadow: 0 10px 30px rgba(43,124,255,0.08); border-color: rgba(43,124,255,0.22); }

.ios-btn { width:100%; padding:14px 16px; border-radius:14px; font-weight:700; background: linear-gradient(90deg,#4e8eff,#2d6df6); border: none; color:#fff; box-shadow: 0 10px 30px rgba(45,109,246,0.22); }
.ios-btn:active { transform: translateY(1px); }

.ios-footer { text-align:center; margin-top:12px; }
.ios-link { color: rgba(180,210,255,0.95); font-weight:600; text-decoration:none; }
.ios-link:hover { text-decoration: underline; }

@media (max-width:480px){ .ios-card{padding:22px;} .auth-title{font-size:1.4rem;} }

/* ===== end iOS auth styles ===== */

/* ===== Page transitions & animations (iOS 26 style) ===== */
@keyframes pageSlideIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pageFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.page-shell, .content {
    animation: pageSlideIn 0.42s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* ===== Microloader (spinner overlay) ===== */
.microloader {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    z-index: 9999;
    place-items: center;
}

.microloader.active {
    display: grid;
}

.microloader-content {
    display: grid;
    place-items: center;
    gap: 16px;
    animation: pageFadeIn 0.3s ease-out;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top: 4px solid #4e8eff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.microloader-text {
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    opacity: 0.9;
}

/* ===== end transitions ===== */

.panel-body {
    padding: 22px 20px 20px;
}

.stats-card {
    display: grid;
    gap: 14px;
}

.stats-card div {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
}

.stats-card span {
    color: var(--muted);
}

.stats-card div strong {
    font-size: 1.05rem;
    color: #fff;
}

.small-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.online-user {
    padding: 12px 16px;
    border-radius: 14px;
    background: rgba(43,124,255,0.06);
    color: #fff;
    max-width: 160px;
}

.panel-meta {
    color: var(--muted);
    font-size: 0.92rem;
}

.stats-card div,
.social-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.stats-card span {
    color: var(--muted);
}

.social-icons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.social-icons span,
.link-row span {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: rgba(255,255,255,0.05);
    color: var(--muted);
}

.link-row {
    display: flex;
    gap: 14px;
}

.main-panel {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.forum-card {
    padding: 20px;
}

.forum-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 18px;
}

.forum-icon {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: rgba(43,124,255,0.08);
    font-size: 1.4rem;
}

.forum-header h3 {
    margin: 0;
}

.forum-header p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.forum-stats {
    display: flex;
    gap: 12px;
}

.forum-stats div {
    min-width: 90px;
    padding: 12px;
    border-radius: 18px;
    background: rgba(255,255,255,0.05);
    text-align: center;
}

.forum-stats strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.auth-shell {
    min-height: calc(100vh - 120px);
    display: grid;
    place-items: center;
    padding: 24px;
}

.auth-card {
    width: 100%;
    max-width: 460px;
    background: rgba(28,28,28,0.98);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 26px;
    padding: 34px;
    box-shadow: 0 24px 60px rgba(0,0,0,0.26);
}

.auth-card h1 {
    margin-top: 0;
    margin-bottom: 24px;
    font-size: 2rem;
}

.auth-card label {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 0.95rem;
}

.auth-card input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.06);
    background: rgba(10,14,22,0.6);
    color: var(--text);
    box-shadow: 0 6px 18px rgba(0,0,0,0.6) inset;
}

.auth-card input:focus {
    outline: none;
    box-shadow: 0 10px 30px rgba(43,124,255,0.08);
    border-color: rgba(43,124,255,0.22);
}

.auth-footer {
    margin-top: 16px;
    color: var(--muted);
}

.alerts {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1300;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: min(560px, calc(100% - 32px));
    pointer-events: none;
}

.alert {
    width: 100%;
    padding: 16px 18px;
    border-radius: 22px;
    background: rgba(18, 18, 18, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(24px);
    overflow: hidden;
    animation: slideInDown 0.32s ease-out;
    pointer-events: auto;
    position: relative;
    color: #fff;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.24);
}

.alert::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, transparent, currentColor 30%, currentColor 70%, transparent);
    animation: progressBar 4s linear forwards;
}

.alert::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.04) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.04) 50%, rgba(255, 255, 255, 0.04) 75%, transparent 75%, transparent);
    background-size: 14px 14px;
    opacity: 0.05;
    pointer-events: none;
}

.alert.error {
    color: #ffb1a8;
    border-color: rgba(255, 177, 168, 0.2);
    background: rgba(255, 50, 50, 0.12);
}

.alert.success {
    color: #a8ffb1;
    border-color: rgba(168, 255, 177, 0.2);
    background: rgba(42, 180, 62, 0.14);
}

.alert.fade-out {
    animation: fadeOut 0.4s ease-out forwards;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes progressBar {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(24px);
    }
}

@media (max-width: 700px) {
    .alerts {
        width: calc(100% - 32px);
        bottom: 16px;
    }
}

@media(max-width: 980px) {
    .grid-layout { grid-template-columns: 1fr; }
}

@media(max-width: 700px) {
    .topbar, .page-header { flex-direction: column; align-items: stretch; }
    .nav-links { flex-wrap: wrap; }

/* ==================== Blue-White theme overrides ==================== */
/* Force accent and related decorations to blue variants */
.nav-link:hover,
.nav-link.active {
    background: rgba(43,124,255,0.12) !important;
    color: var(--accent) !important;
}

.btn-primary,
.btn-accent {
    background: linear-gradient(135deg, #2b7cff 0%, #68a4ff 45%, #dcebff 100%) !important;
    color: #07203a !important;
    box-shadow: 0 24px 60px rgba(43,124,255,0.14) !important;
}

.btn-secondary {
    background: rgba(43,124,255,0.06) !important;
    border-color: rgba(43,124,255,0.18) !important;
}

.category-card:hover {
    background: rgba(43,124,255,0.06) !important;
    border-color: rgba(43,124,255,0.18) !important;
    box-shadow: 0 12px 28px rgba(43,124,255,0.06) !important;
}

.card-icon { background: rgba(43,124,255,0.12) !important; }

.section-label { background: rgba(43,124,255,0.10) !important; color: #bfe0ff !important; }

.stat-box { background: rgba(43,124,255,0.06) !important; border-color: rgba(43,124,255,0.12) !important; }

.user-role-badge.admin { background: rgba(43,124,255,0.12); color: #e6f2ff; border-color: rgba(43,124,255,0.16); }
.user-role-badge.user { background: rgba(43,124,255,0.06); color: #d9edff; border-color: rgba(43,124,255,0.08); }

.badge-role { background: rgba(43,124,255,0.10); color: #dbeeff; border-color: rgba(43,124,255,0.12); }

/* Toast progress bar color */
.alert::before { background: linear-gradient(90deg, transparent, var(--accent) 30%, var(--accent) 70%, transparent); }

/* editor buttons accent */
.editor-btn:hover, .editor-select:hover, .editor-color-picker:hover { background: rgba(43,124,255,0.14) !important; transform: translateY(-1px); }

/* breadcrumb accents */
.forum-breadcrumb a:hover, .breadcrumb-link:hover { color: var(--accent) !important; }

/* subtle background adjustments */
.forum-hero, .forum-header-hero, .topic-header-hero { background: linear-gradient(135deg, rgba(43,124,255,0.06), rgba(11,34,56,0.02)); border-color: rgba(43,124,255,0.06); }

/* end overrides */
    .header-buttons { width: 100%; justify-content: stretch; flex-direction: column; }
}

.profile-shell {
    display: grid;
    gap: 20px;
    justify-items: center;
    min-height: calc(100vh - 120px);
    padding: 16px 16px 28px;
    width: 100%;
    max-width: 1024px;
    margin: 0 auto;
}

.profile-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    gap: 18px;
    width: 100%;
    align-items: stretch;
    grid-auto-rows: minmax(0, auto);
}

.profile-grid > .profile-card {
    align-self: stretch;
}

.profile-card {
    width: 100%;
    padding: 20px;
    display: grid;
    gap: 18px;
}

.profile-header {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.profile-avatar {
    width: 84px;
    height: 84px;
    border-radius: 24px;
    display: grid;
    place-items: center;
    background: rgba(255,124,22,0.16);
    color: #fff;
    font-size: 1.8rem;
    overflow: hidden;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-form {
    display: grid;
    gap: 16px;
}

.profile-actions {
    display: flex;
    gap: 14px;
}

.profile-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 24px;
    width: 100%;
}

.profile-overview,
.profile-settings,
.profile-activity {
    background: linear-gradient(180deg, rgba(255,124,22,0.08), rgba(33,33,33,0.98));
}

.profile-avatar-large {
    width: 96px;
    height: 96px;
    border-radius: 22px;
}

.profile-identity {
    display: grid;
        gap: 4px;
    }

    .profile-bio {
        color: var(--muted);
        max-width: 560px;
        line-height: 1.7;
        margin: 0;
    }

    .profile-badges {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(43, 124, 255, 0.14);
    color: #fff;
    font-size: 0.88rem;
    font-weight: 700;
}

.badge-status {
    background: rgba(43, 124, 255, 0.12);
    color: #dbeeff;
}

.badge-joined {
    background: rgba(255, 255, 255, 0.06);
    color: #d8d2c8;
}

.profile-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-title-row h1 {
    margin: 0;
    font-size: 2rem;
}

.profile-status {
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(43,124,255,0.14);
    color: #dbeeff;
    font-size: 0.9rem;
    font-weight: 700;
}

.profile-subtitle,
.profile-bio {
    color: var(--muted);
}

.profile-bio {
    max-width: 520px;
    line-height: 1.8;
}

.profile-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.profile-stat {
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    display: grid;
    gap: 6px;
}

.profile-stat-title {
    color: var(--muted);
    font-size: 0.9rem;
}

.profile-stat strong {
    font-size: 1.35rem;
    color: #fff;
}

.profile-settings .section-title,
.profile-activity .section-title {
    margin-bottom: 18px;
}

.profile-settings .profile-form input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04);
    color: var(--text);
}

.profile-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.profile-actions .btn {
    flex: 1;
    min-width: 200px;
}

.profile-activity {
    grid-column: 1 / -1;
    padding: 20px;
    margin-top: 12px;
}

.activity-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.activity-block {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 20px;
    padding: 18px;
    display: grid;
    gap: 14px;
}

.activity-title {
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
}

.activity-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-item strong {
    display: block;
    font-size: 0.98rem;
    color: #fff;
}

.activity-item span {
    color: var(--muted);
    font-size: 0.9rem;
}

@media(max-width: 980px) {
    .profile-grid { grid-template-columns: 1fr; }
    .activity-grid { grid-template-columns: 1fr; }
}

.card-section {
    padding: 24px;
}

.section-title {
    margin-bottom: 18px;
    font-size: 1rem;
    color: var(--text);
    font-weight: 700;
}

.forum-form,
.profile-form {
    display: grid;
    gap: 14px;
}

.topic-list {
    display: grid;
    gap: 14px;
}

.topic-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    border-radius: 18px;
    background: rgba(255,255,255,0.04);
    color: var(--text);
}

.topic-row h3 {
    margin: 0 0 6px;
}

.topic-row p {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.topic-arrow {
    color: var(--muted);
    font-size: 1.3rem;
}

.post-list {
    display: grid;
    gap: 16px;
}

.post-card {
    padding: 18px 20px;
    border-radius: 20px;
    background: rgba(255,255,255,0.04);
}

.post-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
    color: var(--muted);
    font-size: 0.95rem;
}

.post-card p {
    margin: 0;
    line-height: 1.7;
}

.empty-state {
    padding: 26px;
    border-radius: 18px;
    text-align: center;
    background: rgba(255,255,255,0.03);
    color: var(--muted);
}

.forum-link {
    color: inherit;
    text-decoration: none;
}

.avatar-img {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
}
