/* CopyTox Dark Theme v1.0 */

/* ========== RESET & TOKENS ========== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg: #0a0a0f;
    --surface: #141418;
    --surface-2: #1c1c24;
    --surface-3: #24242e;
    --surface-hover: #2a2a36;
    --border: rgba(255, 255, 255, 0.08);
    --border-light: rgba(255, 255, 255, 0.12);
    --text: #e8e6ed;
    --text-2: #b0adb8;
    --text-muted: #706d7a;
    --accent: #6c5ce7;
    --accent-hover: #7c6ef7;
    --accent-soft: rgba(108, 92, 231, 0.15);
    --danger: #e74c3c;
    --danger-soft: rgba(231, 76, 60, 0.15);
    --success: #2ecc71;
    --success-soft: rgba(46, 204, 113, 0.15);
    --warning: #f39c12;
    --verified: #3b82f6;
    --verified-soft: rgba(59, 130, 246, 0.15);
    --f-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --f-display: 'Inter', -apple-system, sans-serif;
    --f-mono: 'Space Mono', monospace;
    --r-sm: 8px;
    --r-md: 12px;
    --r-lg: 16px;
    --r-xl: 20px;
    --r-full: 9999px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.6);
    --sidebar-w: 260px;
    --topbar-h: 0px;
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

html {
    font-size: 15px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--f-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

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

a:hover {
    color: var(--accent-hover);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button,
input,
select,
textarea {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    background: none;
    border: none;
    outline: none;
}

button {
    cursor: pointer;
}

::selection {
    background: var(--accent);
    color: #fff;
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--surface-3);
    border-radius: 3px;
}

/* ========== APP SHELL ========== */
.app-shell {
    display: flex;
    min-height: 100vh;
}

.app-main {
    flex: 1;
    margin-left: var(--sidebar-w);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.content {
    flex: 1;
    padding: 24px;
    max-width: 1600px;
    width: 100%;
    margin: 0 auto;
}

.content--narrow {
    max-width: 900px;
}

.content--wide {
    max-width: 100%;
}

/* ========== SIDEBAR ========== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-w);
    background: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 100;
    overflow: hidden;
    transition: transform 0.3s var(--ease);
}

.sidebar__logo {
    padding: 24px 20px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
}

.sidebar__logo-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    border-radius: var(--r-sm);
    color: #fff;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.sidebar__logo img {
    width: 28px;
    height: 28px;
}

.sidebar__nav {
    padding: 0 12px;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar__section {
    margin-bottom: 8px;
}

.sidebar__label {
    padding: 12px 8px 6px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.sidebar__view-all {
    border: none;
    background: none;
    width: 100%;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.82rem;
}

.sidebar__view-all:hover {
    color: var(--text);
}

.sidebar__view-all i {
    transition: transform .2s;
}

.sidebar__view-all.expanded i {
    transform: rotate(180deg);
}

.sidebar__link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--r-md);
    color: var(--text-2);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.15s var(--ease);
    position: relative;
}

.sidebar__link:hover {
    background: var(--surface-2);
    color: var(--text);
}

.sidebar__link.active {
    background: var(--accent-soft);
    color: var(--accent);
}

.sidebar__link i {
    font-size: 1.25rem;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar__badge {
    margin-left: auto;
    background: var(--accent);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    border-radius: var(--r-full);
    padding: 0 6px;
}

.sidebar__divider {
    height: 1px;
    background: var(--border);
    margin: 8px 12px;
}

.sidebar__footer {
    padding: 14px 16px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--surface);
    flex-shrink: 0;
}

.sidebar__footer-avatar,
.sidebar__footer-avatar:hover {
    width: 36px;
    height: 36px;
    border-radius: var(--r-full);
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: #fff;
    flex-shrink: 0;
    overflow: hidden;
}

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

.sidebar__footer-info,
.sidebar__footer-info:hover {
    flex: 1;
    min-width: 0;
    color: var(--text);
}

.sidebar__footer-name {
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar__footer-email {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar__logout-form {
    margin: 0;
}

button.sidebar__link--danger {
    width: 100%;
    border: none;
    background: none;
    cursor: pointer;
    font: inherit;
}

.sidebar__link--danger {
    color: #e74c3c !important;
}

.sidebar__link--danger:hover {
    background: rgba(231, 76, 60, 0.12) !important;
    color: #ff6b6b !important;
}

/* ========== MOBILE HEADER ========== */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    z-index: 150;
    padding: 0 16px;
    align-items: center;
    justify-content: space-between;
}

.mobile-header__brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
}

.mobile-header__brand i {
    font-size: 1.2rem;
    color: var(--accent);
}

.mobile-header__brand:hover {
    color: var(--text);
}

.mobile-header__toggle {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--text);
    background: none;
    border: none;
    border-radius: var(--r-sm);
    cursor: pointer;
}

.mobile-header__toggle:hover {
    background: var(--surface-2);
}

.hamburger-icon {
    width: 20px;
    height: 14px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-end;
}

.hamburger-icon span {
    display: block;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: width 0.25s var(--ease);
}

.hamburger-icon span:nth-child(1) {
    width: 100%;
}

.hamburger-icon span:nth-child(2) {
    width: 70%;
}

.hamburger-icon span:nth-child(3) {
    width: 85%;
}

.mobile-header__toggle:hover .hamburger-icon span,
.pnav__toggle:hover .hamburger-icon span {
    width: 100%;
}

/* ========== SIDEBAR OVERLAY ========== */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 240;
}

.sidebar-overlay.active {
    display: block;
}

/* ========== MOBILE NAV ========== */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--surface);
    border-top: 1px solid var(--border);
    z-index: 200;
    padding: 6px 0;
    padding-bottom: max(6px, env(safe-area-inset-bottom));
}

.mobile-nav__inner {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 500px;
    margin: 0 auto;
}

.mobile-nav__link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 12px;
    color: var(--text-muted);
    font-size: 0.65rem;
    font-weight: 500;
    transition: color 0.15s var(--ease);
    position: relative;
}

.mobile-nav__link i {
    font-size: 1.4rem;
}

.mobile-nav__link.active {
    color: var(--accent);
}

.mobile-nav__link .mobile-nav__badge {
    position: absolute;
    top: 2px;
    right: 6px;
    background: var(--accent);
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

/* ========== BUTTONS ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--r-md);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s var(--ease);
    white-space: nowrap;
    line-height: 1.4;
}

.btn--primary {
    background: var(--accent);
    color: #fff;
}

.btn--primary:hover {
    background: var(--accent-hover);
    color: #fff;
    transform: translateY(-1px);
}

.btn--secondary {
    background: var(--surface-2);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn--secondary:hover {
    background: var(--surface-3);
    color: var(--text);
    border-color: var(--border-light);
}

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

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

.btn--ghost {
    background: transparent;
    color: var(--text-2);
}

.btn--ghost:hover {
    background: var(--surface-2);
    color: var(--text);
}

.btn--danger {
    background: var(--danger);
    color: #fff;
}

.btn--danger:hover {
    background: #c0392b;
    color: #fff;
}

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

.btn--lg {
    padding: 14px 28px;
    font-size: 1rem;
}

.btn--full {
    width: 100%;
}

.btn--icon {
    padding: 8px;
    width: 36px;
    height: 36px;
}

.btn--icon.btn--lg {
    width: 44px;
    height: 44px;
}

/* ========== MASONRY FEED GRID ========== */
.feed-grid {
    position: relative;
    padding: 0;
    --masonry-gutter: 16px;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.feed-grid.masonry-ready {
    opacity: 1;
}

.feed-grid .prompt-card {
    width: calc(20% - 13px);
}

.prompt-card {
    margin-bottom: 16px;
    background: var(--surface);
    border-radius: var(--r-lg);
    overflow: hidden;
    transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
    cursor: pointer;
    position: relative;
}

.prompt-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.prompt-card__img {
    width: 100%;
    overflow: hidden;
    background: var(--surface-2);
    position: relative;
}

.prompt-card__img img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s var(--ease);
}

.prompt-card:hover .prompt-card__img img {
    transform: scale(1.03);
}

.prompt-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.2s var(--ease);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 12px;
}

.prompt-card:hover .prompt-card__overlay {
    opacity: 1;
}

.prompt-card__title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.prompt-card__meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
}

.prompt-card__avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    overflow: hidden;
}

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

.prompt-card__username {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
}

.prompt-card__stats {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 6px;
    opacity: 0;
    transition: opacity 0.2s var(--ease);
}

.prompt-card:hover .prompt-card__stats {
    opacity: 1;
}

.prompt-card__stat {
    display: flex;
    align-items: center;
    gap: 3px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    padding: 4px 8px;
    border-radius: var(--r-full);
    font-size: 0.7rem;
    font-weight: 600;
    color: #fff;
}

.prompt-card__stat i {
    font-size: 0.8rem;
}

/* Skeleton loading */
.skeleton {
    display: inline-block;
    width: 100%;
    break-inside: avoid;
    margin-bottom: 16px;
    background: var(--surface);
    border-radius: var(--r-lg);
    overflow: hidden;
    animation: skeleton-pulse 1.5s infinite;
}

.skeleton__img {
    width: 100%;
    background: var(--surface-2);
}

@keyframes skeleton-pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* ========== PROMPT DETAIL ========== */
.prompt-detail {
    display: flex;
    gap: 0;
    height: calc(100vh - 48px);
}

.prompt-detail__image {
    flex: 1;
    background: #000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    position: relative;
    min-height: 400px;
    overflow: hidden;
    margin-bottom: 8px;
}

.prompt-detail__image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: var(--r-lg);
}

.prompt-detail__back {
    position: absolute;
    top: 16px;
    left: 16px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.2rem;
    transition: background 0.2s;
    z-index: 5;
}

.prompt-detail__back:hover {
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
}

.prompt-detail__sidebar {
    width: 480px;
    flex-shrink: 0;
    background: var(--surface);
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 48px);
    overflow: hidden;
}

.prompt-detail__header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.prompt-detail__stats {
    display: flex;
    gap: 16px;
    align-items: center;
}

.prompt-detail__stat {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
    color: var(--text-2);
}

.prompt-detail__stat i {
    font-size: 1rem;
}

.prompt-detail__stat--clickable {
    cursor: pointer;
    transition: color 0.15s;
}

.prompt-detail__stat--clickable:hover {
    color: var(--text);
}

.prompt-detail__stat--clickable.active {
    color: var(--accent);
}

.prompt-detail__stat--clickable.active.liked {
    color: #e74c3c;
}

.prompt-detail__time {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.prompt-detail__user {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border);
}

.prompt-detail__user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    color: #fff;
    flex-shrink: 0;
    overflow: hidden;
}

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

.prompt-detail__user-info {
    flex: 1;
}

.prompt-detail__user-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 6px;
}

.prompt-detail__user-handle {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.prompt-detail__tags {
    padding: 12px 20px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--r-full);
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-2);
    transition: all 0.15s;
}

.tag:hover {
    background: var(--surface-3);
    color: var(--text);
}

.tag i {
    font-size: 0.85rem;
}

.prompt-detail__title-wrap {
    padding: 0px 20px 0;
}

.prompt-detail__title {
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0;
    color: var(--text);
}

.prompt-detail__body {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.prompt-detail__text {
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--text-2);
    white-space: pre-wrap;
    word-break: break-word;
}

.prompt-detail__actions {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 12px;
}

.prompt-detail__actions .btn {
    flex: 1;
}

.prompt-related {
    padding: 0 0 40px;
}

/* ========== SHARE SHEET ========== */
.share-sheet-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s var(--ease), visibility 0.25s;
}

.share-sheet-overlay.active {
    opacity: 1;
    visibility: visible;
}

.share-sheet {
    background: var(--surface-2);
    border-radius: var(--r-xl) var(--r-xl) 0 0;
    width: 100%;
    max-width: 480px;
    padding: 20px 20px calc(32px + env(safe-area-inset-bottom, 0px));
    transform: translateY(100%);
    transition: transform 0.3s var(--ease-spring);
}

.share-sheet-overlay.active .share-sheet {
    transform: translateY(0);
}

.share-sheet__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.share-sheet__title {
    font-size: 1.05rem;
    font-weight: 600;
}

.share-sheet__close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--surface-3);
    border: none;
    color: var(--text-2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.15s;
}

.share-sheet__close:hover {
    background: var(--surface-hover);
    color: var(--text);
}

.share-sheet__options {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
}

.share-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    background: none;
    border: none;
    text-decoration: none;
    min-width: 64px;
    padding: 4px;
    transition: transform 0.15s var(--ease);
}

.share-option:hover {
    transform: translateY(-2px);
}

.share-option__icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #fff;
    transition: box-shadow 0.2s;
}

.share-option:hover .share-option__icon {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.share-option__icon--copy {
    background: var(--surface-3);
    color: var(--text);
}

.share-option__icon--whatsapp {
    background: #25D366;
}

.share-option__icon--facebook {
    background: #1877F2;
}

.share-option__icon--x {
    background: #000;
    border: 1px solid var(--border-light);
}

.share-option__icon--threads {
    background: #000;
    border: 1px solid var(--border-light);
}

.share-option__icon--instagram {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.share-option__label {
    font-size: 0.72rem;
    color: var(--text-2);
    white-space: nowrap;
}

/* ========== VERIFIED BADGE ========== */
.verified-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 1.1rem;
    vertical-align: middle;
    margin-left: 2px;
}

/* ========== PROFILE ========== */
.profile-header {
    padding: 32px 0;
    display: flex;
    gap: 32px;
    align-items: flex-start;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 2.5rem;
    color: #fff;
    flex-shrink: 0;
    overflow: hidden;
}

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

.profile-info {
    flex: 1;
}

.profile-name {
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 2px;
}

.profile-handle {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.profile-stats {
    display: flex;
    gap: 24px;
    margin-bottom: 12px;
}

.profile-stats__item {
    font-size: 0.9rem;
    color: var(--text-2);
}

.profile-stats__item strong {
    color: var(--text);
    font-weight: 700;
}

.profile-bio {
    font-size: 0.9rem;
    color: var(--text-2);
    line-height: 1.6;
    margin-bottom: 12px;
    max-width: 600px;
}

.profile-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.profile-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--surface-3);
    color: var(--text-secondary);
    font-size: 1.15rem;
    transition: background .2s, color .2s;
}

.profile-links a:hover {
    background: var(--accent);
    color: #fff;
}

.profile-actions {
    margin-top: 16px;
    display: flex;
    gap: 10px;
}

/* ========== FORMS ========== */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-2);
    margin-bottom: 6px;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 10px 14px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    color: var(--text);
    font-size: 0.9rem;
    transition: border-color 0.2s;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    border-color: var(--accent);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

.form-select {
    appearance: auto;
}

.form-hint {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.form-error {
    font-size: 0.78rem;
    color: var(--danger);
    margin-top: 4px;
}

.form-required {
    color: var(--danger);
    font-weight: 400;
}

.form-counter {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: right;
    margin-top: 2px;
    transition: color 0.2s;
}

.form-counter--warn {
    color: var(--warning);
}

.form-counter--limit {
    color: var(--danger);
}

/* Password toggle */
.input-password {
    position: relative;
}

.input-password .form-input {
    padding-right: 44px;
}

.password-toggle {
    position: absolute;
    right: 1px;
    top: 1px;
    bottom: 1px;
    width: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    border-radius: 0 var(--r-md) var(--r-md) 0;
    transition: color 0.15s;
    cursor: pointer;
    background: none;
    border: none;
}

.password-toggle:hover {
    color: var(--text);
}

/* ========== AUTH PAGES ========== */
.auth-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 100px);
    padding: 40px 16px;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    padding: 36px;
}

.auth-card__title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.auth-card__subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 28px;
}

/* ========== NOTIFICATIONS ========== */
.notif-list {
    display: flex;
    flex-direction: column;
}

.notif-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--r-md);
    transition: background 0.15s;
}

.notif-item:hover {
    background: var(--surface-2);
}

.notif-item--unread {
    background: var(--accent-soft);
}

.notif-item__avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: #fff;
    flex-shrink: 0;
    overflow: hidden;
}

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

.notif-item__body {
    flex: 1;
    font-size: 0.88rem;
    color: var(--text-2);
    line-height: 1.4;
}

.notif-item__body strong {
    color: var(--text);
    font-weight: 600;
}

.notif-item__time {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.notif-item__thumb {
    width: 44px;
    height: 44px;
    border-radius: var(--r-sm);
    overflow: hidden;
    flex-shrink: 0;
}

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

/* ========== SEARCH ========== */
.search-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--r-full);
    padding: 10px 18px;
    margin-bottom: 24px;
    max-width: 600px;
}

.search-bar--full {
    max-width: none;
}

.search-bar i {
    font-size: 1.1rem;
    color: var(--text-muted);
}

.search-bar input {
    flex: 1;
    font-size: 0.9rem;
    background: none;
    color: var(--text);
}

.search-bar input::placeholder {
    color: var(--text-muted);
}

.search-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.search-tab {
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all 0.15s;
}

.search-tab:hover {
    color: var(--text);
}

.search-tab.active {
    color: var(--accent);
    border-color: var(--accent);
}

/* User result card */
.user-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: var(--r-md);
    transition: background 0.15s;
}

.user-card:hover {
    background: var(--surface-2);
}

.user-card__avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    color: #fff;
    flex-shrink: 0;
    overflow: hidden;
}

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

.user-card__info {
    flex: 1;
}

.user-card__name {
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text);
}

.user-card__handle {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.user-card__bio {
    font-size: 0.82rem;
    color: var(--text-2);
    margin-top: 2px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.user-card__stat {
    font-size: 0.78rem;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

.user-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.user-list .user-card {
    width: calc(25% - 6px);
    padding: 10px 12px;
    background: var(--surface);
    border: 1px solid var(--border);
}

/* Search landing */
.search-landing {
    padding-top: 8px;
}

.search-section {
    margin-bottom: 36px;
}

.search-section__title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-2);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-section__title i {
    font-size: 1.1rem;
    color: var(--accent);
}

.search-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.search-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--r-full);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-2);
    transition: all 0.15s var(--ease);
}

.search-chip:hover {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--accent);
}

.search-chip i {
    font-size: 1rem;
}

.coll-grid--4 {
    grid-template-columns: repeat(4, 1fr);
}

/* ========== CREATOR CARDS ========== */
.creator-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.creator-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    transition: all 0.2s var(--ease);
}

.creator-card:hover {
    border-color: var(--accent);
    background: var(--surface-2);
    transform: translateY(-2px);
}

.creator-card__avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    color: #fff;
    flex-shrink: 0;
    overflow: hidden;
}

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

.creator-card__info {
    flex: 1;
    min-width: 0;
}

.creator-card__name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
}

.creator-card__name .verified-badge {
    margin-left: 4px;
    color: var(--accent);
}

.creator-card__handle {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.creator-card__stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
}

.creator-card__count {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--accent);
    line-height: 1;
}

.creator-card__label {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Search collection cards (smaller variant) */
.collections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.collection-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    overflow: hidden;
    transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.collection-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.collection-card__img {
    width: 100%;
    aspect-ratio: 16/10;
    overflow: hidden;
}

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

.collection-card__body {
    padding: 14px;
}

.collection-card__title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.collection-card__desc {
    font-size: 0.8rem;
    color: var(--text-2);
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.collection-card__count {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ========== COLLECTIONS ========== */
.coll-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.coll-card {
    background: var(--surface);
    border-radius: var(--r-lg);
    overflow: hidden;
    transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.coll-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.coll-card__img {
    width: 100%;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: var(--surface-2);
}

.coll-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s var(--ease);
}

.coll-card:hover .coll-card__img img {
    transform: scale(1.05);
}

.coll-card__body {
    padding: 14px 16px;
}

.coll-card__name {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 2px;
    color: var(--text);
}

.coll-card__count {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ========== TOAST ========== */
.toast-container {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    pointer-events: none;
}

.toast {
    background: var(--surface-3);
    color: var(--text);
    padding: 10px 20px;
    border-radius: var(--r-full);
    font-size: 0.85rem;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    animation: toast-in 0.3s var(--ease-spring);
    pointer-events: auto;
}

.toast--success {
    background: var(--success);
    color: #fff;
}

.toast--error {
    background: var(--danger);
    color: #fff;
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

/* ========== REPORT MODAL ========== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    padding: 28px;
    max-width: 420px;
    width: 100%;
    animation: modal-in 0.25s var(--ease-spring);
}

.modal__title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.modal__actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.modal__actions .btn {
    flex: 1;
}

@keyframes modal-in {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.report-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.report-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--r-md);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.15s;
    font-size: 0.88rem;
}

.report-option:hover {
    background: var(--surface-2);
    border-color: var(--border-light);
}

.report-option input[type="radio"] {
    accent-color: var(--accent);
}

/* ========== BLOG (dark theme) ========== */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.blog-card {
    background: var(--surface);
    border-radius: var(--r-lg);
    overflow: hidden;
    transition: transform 0.2s var(--ease);
}

.blog-card:hover {
    transform: translateY(-2px);
}

.blog-card__img {
    width: 100%;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: var(--surface-2);
}

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

.blog-card__body {
    padding: 16px;
}

.blog-card__cat {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent);
    margin-bottom: 6px;
}

.blog-card__title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 6px;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card__desc {
    font-size: 0.85rem;
    color: var(--text-2);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card__footer {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Article page */
.article-wrap {
    max-width: 780px;
    margin: 0 auto;
}

.article-wrap h1 {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 16px;
}

.article-wrap h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 32px 0 12px;
}

.article-wrap h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin: 24px 0 8px;
}

.article-wrap p {
    margin-bottom: 16px;
    line-height: 1.8;
    color: var(--text-2);
}

.article-wrap img {
    border-radius: var(--r-md);
    margin: 20px 0;
}

.article-wrap ul,
.article-wrap ol {
    padding-left: 24px;
    margin-bottom: 16px;
    color: var(--text-2);
}

.article-wrap li {
    margin-bottom: 6px;
    line-height: 1.7;
}

.article-wrap a {
    color: var(--accent);
    text-decoration: underline;
}

.article-wrap blockquote {
    border-left: 3px solid var(--accent);
    padding: 12px 20px;
    background: var(--surface-2);
    border-radius: 0 var(--r-md) var(--r-md) 0;
    margin: 16px 0;
    color: var(--text-2);
    font-style: italic;
}

/* ========== STATIC PAGES (dark) ========== */
.static-page {
    max-width: 780px;
    margin: 0 auto;
    padding: 20px 0 60px;
}

.static-page h1 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.static-page h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 28px 0 8px;
}

.static-page p {
    margin-bottom: 14px;
    color: var(--text-2);
    line-height: 1.7;
}

.static-page ul {
    padding-left: 20px;
    margin-bottom: 14px;
    color: var(--text-2);
}

.static-page li {
    margin-bottom: 4px;
}

/* ========== PAGE HEADER ========== */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
}

.page-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ========== FLASH / ALERTS ========== */
.alert {
    padding: 12px 16px;
    border-radius: var(--r-md);
    font-size: 0.88rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert--success {
    background: var(--success-soft);
    color: var(--success);
}

.alert--error {
    background: var(--danger-soft);
    color: var(--danger);
}

.alert--info {
    background: var(--accent-soft);
    color: var(--accent);
}

/* ========== IMAGE UPLOAD ========== */
.upload-zone {
    border: 2px dashed var(--border-light);
    border-radius: var(--r-lg);
    padding: 32px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.upload-zone:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
}

.upload-zone i {
    font-size: 2rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.upload-zone__text {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.upload-zone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.upload-preview {
    width: 100%;
    border-radius: var(--r-md);
    margin-top: 12px;
    display: none;
}

.upload-preview.active {
    display: block;
}

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

.empty-state i {
    font-size: 3rem;
    margin-bottom: 12px;
    display: block;
}

.empty-state__title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-2);
    margin-bottom: 4px;
}

.empty-state__text {
    font-size: 0.9rem;
    margin-bottom: 16px;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1280px) {
    .feed-grid .prompt-card {
        width: calc(25% - 12px);
    }
}

@media (max-width: 1024px) {
    .feed-grid .prompt-card {
        width: calc(33.333% - 11px);
    }

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

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

    .prompt-detail {
        flex-direction: column;
        height: auto;
    }

    .prompt-detail__image {
        min-height: 300px;
        max-height: none;
        align-items: center;
    }

    .prompt-detail__body {
        max-height: 40vh;
        overflow-y: auto;
    }

    .prompt-detail__sidebar {
        width: 100%;
        border-left: none;
        border-top: 1px solid var(--border);
        max-height: none;
    }

    .profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .profile-stats {
        justify-content: center;
    }

    .profile-links {
        justify-content: center;
    }

    .profile-actions {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .mobile-header {
        display: flex;
    }

    .sidebar {
        transform: translateX(-100%);
        z-index: 250;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .app-main {
        margin-left: 0;
        padding-top: 56px;
    }

    .mobile-nav {
        display: block;
    }

    .content {
        padding: 16px;
        padding-bottom: 80px;
    }

    .feed-grid .prompt-card {
        width: calc(50% - 5px);
    }

    .feed-grid {
        --masonry-gutter: 10px;
    }

    .prompt-card {
        margin-bottom: 10px;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }

    .prompt-detail__sidebar {
        width: 100%;
    }

    .prompt-detail__body {
        max-height: 35vh;
    }

    .auth-card {
        padding: 24px;
    }

    .profile-avatar {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }

    .profile-name {
        font-size: 1.2rem;
        justify-content: center;
    }

    .coll-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

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

    .search-chips {
        gap: 6px;
    }

    .user-list .user-card {
        width: calc(50% - 4px);
    }
}

@media (max-width: 480px) {
    .feed-grid .prompt-card {
        width: calc(50% - 4px);
    }

    .feed-grid {
        --masonry-gutter: 8px;
    }

    .prompt-card {
        margin-bottom: 8px;
    }

    .prompt-detail__actions {
        flex-direction: column;
    }

    .page-title {
        font-size: 1.2rem;
    }
}

/* ========== PAGINATION ========== */
.pagination-wrap {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-top: 32px;
    flex-wrap: wrap;
}

.pagination-wrap .page-link {
    padding: 8px 14px;
    border-radius: var(--r-md);
    font-size: 0.85rem;
    color: var(--text-2);
    background: var(--surface);
    border: 1px solid var(--border);
    transition: all 0.15s;
}

.pagination-wrap .page-link:hover {
    background: var(--surface-2);
    color: var(--text);
}

.pagination-wrap .page-item.active .page-link {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.pagination-wrap .page-item.disabled .page-link {
    opacity: 0.4;
    cursor: default;
}

/* ========== UTILITIES ========== */
.text-muted {
    color: var(--text-muted);
}

.text-accent {
    color: var(--accent);
}

.text-center {
    text-align: center;
}

.mt-1 {
    margin-top: 8px;
}

.mt-2 {
    margin-top: 16px;
}

.mt-3 {
    margin-top: 24px;
}

.mb-1 {
    margin-bottom: 8px;
}

.mb-2 {
    margin-bottom: 16px;
}

.mb-3 {
    margin-bottom: 24px;
}

.flex {
    display: flex;
}

.flex-wrap {
    flex-wrap: wrap;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-1 {
    gap: 8px;
}

.gap-2 {
    gap: 16px;
}

.gap-3 {
    gap: 24px;
}

.hidden {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

/* ========== ERROR PAGES ========== */
.error-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
    padding: 48px 16px;
    text-align: center;
}

.error-page__inner {
    max-width: 440px;
}

.error-page__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: var(--r-xl);
    background: var(--accent-soft);
    margin-bottom: 24px;
}

.error-page__badge i {
    font-size: 36px;
    color: var(--accent);
}

.error-page__code {
    display: block;
    font-family: var(--f-mono);
    font-size: 72px;
    font-weight: 700;
    line-height: 1;
    color: var(--text);
    letter-spacing: -0.04em;
    margin-bottom: 12px;
}

.error-page h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
}

.error-page p {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-2);
    margin-bottom: 32px;
}

.error-page__actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* ========== SECTION DIVIDER & TITLE ========== */
.section-divider {
    height: 1px;
    background: var(--border);
    margin: 36px 0;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 20px;
}

/* ========== FORM ROW (side-by-side fields) ========== */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 540px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* ========== AUTH MODAL ========== */
.auth-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.auth-modal-overlay.visible {
    opacity: 1;
}

.auth-modal {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px;
    width: 100%;
    max-width: 400px;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.2s ease;
}

.auth-modal-overlay.visible .auth-modal {
    transform: translateY(0);
}

.auth-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}

.auth-modal__close:hover {
    color: var(--text);
}

.auth-modal__title {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    color: var(--text);
    margin: 0 0 4px;
}

.auth-modal__subtitle {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin: 0 0 20px;
}

.auth-modal__error {
    background: rgba(231, 76, 60, 0.12);
    border: 1px solid rgba(231, 76, 60, 0.3);
    color: #e74c3c;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.85rem;
    margin-bottom: 16px;
}

.auth-modal__switch {
    text-align: center;
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-top: 16px;
}

.auth-modal__switch a {
    color: var(--accent);
}

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

.auth-modal__terms {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 10px;
}

.auth-modal__terms a {
    color: var(--text-muted);
    text-decoration: underline;
}

.auth-modal .form-group {
    margin-bottom: 14px;
}

.auth-modal .btn--full {
    margin-top: 6px;
}

@media (max-width: 480px) {
    .auth-modal {
        padding: 24px 20px;
    }
}
