/* ================================================
   FurFap - Dark Glassmorphism Theme
   A modern, clean imageboard UI
   ================================================ */

/* ---------- CSS Variables ---------- */
:root {
    --bg-primary: #0a0a1a;
    --bg-secondary: #0d0d24;
    --bg-tertiary: #12122e;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-bg-hover: rgba(255, 255, 255, 0.06);
    --glass-bg-strong: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-border-hover: rgba(255, 255, 255, 0.15);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --glass-blur: blur(20px);

    --text-primary: #e8e8f0;
    --text-secondary: #8888aa;
    --text-muted: #555577;
    --text-link: #7b8cff;
    --text-link-hover: #a5b0ff;

    --accent: #6c5ce7;
    --accent-hover: #7f71ed;
    --accent-glow: rgba(108, 92, 231, 0.4);
    --accent-secondary: #00cec9;
    --accent-danger: #ff4757;
    --accent-warning: #ffa502;
    --accent-success: #2ed573;

    --rating-safe: #2ed573;
    --rating-questionable: #ffa502;
    --rating-explicit: #ff4757;

    --tag-general: #00b2ff;
    --tag-artist: #f2ac08;
    --tag-copyright: #dd00dd;
    --tag-character: #00aa00;
    --tag-species: #ed5d1f;
    --tag-meta: #ffffff;
    --tag-lore: #228822;
    --tag-invalid: #ff3d3d;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Animated background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(108, 92, 231, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(0, 206, 201, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(108, 92, 231, 0.03) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

a {
    color: var(--text-link);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--text-link-hover);
}

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

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: rgba(108, 92, 231, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(108, 92, 231, 0.5);
}

/* ---------- Navbar ---------- */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(10, 10, 26, 0.85);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--glass-border);
    padding: 0 20px;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 20px;
    height: 60px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    flex-shrink: 0;
}

.nav-logo i {
    color: var(--accent);
    font-size: 1.4rem;
}

.nav-logo:hover {
    color: var(--accent);
}

.nav-search {
    flex: 1;
    max-width: 500px;
}

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

.search-input-wrap {
    flex: 1;
    position: relative;
}

.search-input-wrap i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.85rem;
    pointer-events: none;
}

.search-input-wrap input {
    width: 100%;
    padding: 8px 12px 8px 36px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    transition: var(--transition);
    outline: none;
}

.search-input-wrap input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
    background: var(--glass-bg-hover);
}

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

.tag-autocomplete {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: rgba(13, 13, 36, 0.95);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    max-height: 300px;
    overflow-y: auto;
    display: none;
    z-index: 100;
}

.tag-autocomplete.active {
    display: block;
}

.tag-autocomplete-item {
    padding: 8px 14px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    transition: var(--transition-fast);
}

.tag-autocomplete-item:hover {
    background: var(--glass-bg-hover);
}

.tag-autocomplete-item .tag-count {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.nav-link {
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition-fast);
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--glass-bg-hover);
}

.nav-link i {
    margin-right: 4px;
    font-size: 0.8rem;
}

.nav-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: rgba(13, 13, 36, 0.95);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 6px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: var(--transition);
    z-index: 1000;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.85rem;
    transition: var(--transition-fast);
}

.dropdown-menu a:hover {
    background: var(--glass-bg-hover);
    color: var(--text-primary);
}

.dropdown-menu a i {
    width: 16px;
    text-align: center;
    font-size: 0.8rem;
}

.dropdown-divider {
    border: none;
    border-top: 1px solid var(--glass-border);
    margin: 4px 0;
}

.nav-mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    background: var(--glass-bg);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn:hover {
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-hover);
    color: var(--text-primary);
    transform: translateY(-1px);
}

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

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

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

.btn-primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    box-shadow: 0 4px 20px var(--accent-glow);
    color: #fff;
}

.btn-glow {
    background: linear-gradient(135deg, var(--accent), #8b7cf7);
    border: none;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 15px var(--accent-glow);
}

.btn-glow:hover {
    box-shadow: 0 4px 25px rgba(108, 92, 231, 0.6);
    transform: translateY(-2px);
    color: #fff;
}

.btn-danger {
    background: rgba(255, 71, 87, 0.15);
    border-color: var(--accent-danger);
    color: var(--accent-danger);
}

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

.btn-success {
    background: rgba(46, 213, 115, 0.15);
    border-color: var(--accent-success);
    color: var(--accent-success);
}

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

.btn-outline {
    background: transparent;
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
}

.btn-group {
    display: flex;
    gap: 4px;
}

.btn-group .btn {
    border-radius: 0;
}

.btn-group .btn:first-child {
    border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.btn-group .btn:last-child {
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

/* ---------- Glass Card ---------- */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: var(--transition);
}

.glass-card:hover {
    border-color: var(--glass-border-hover);
}

.glass-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--glass-border);
}

.glass-card-header h2,
.glass-card-header h3 {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.glass-card-header h2 i,
.glass-card-header h3 i {
    color: var(--accent);
}

/* ---------- Flash Messages ---------- */
.flash-message {
    padding: 12px 0;
    font-size: 0.9rem;
    position: relative;
    z-index: 100;
}

.flash-message .container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.flash-success {
    background: rgba(46, 213, 115, 0.1);
    border-bottom: 1px solid rgba(46, 213, 115, 0.2);
    color: var(--accent-success);
}

.flash-error {
    background: rgba(255, 71, 87, 0.1);
    border-bottom: 1px solid rgba(255, 71, 87, 0.2);
    color: var(--accent-danger);
}

.flash-info {
    background: rgba(108, 92, 231, 0.1);
    border-bottom: 1px solid rgba(108, 92, 231, 0.2);
    color: var(--accent);
}

.flash-close {
    margin-left: auto;
    background: none;
    border: none;
    color: inherit;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.7;
    padding: 4px 8px;
}

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

/* ---------- Main Content ---------- */
.main-content {
    position: relative;
    z-index: 1;
    min-height: calc(100vh - 60px - 200px);
    padding: 24px 20px;
    max-width: 1400px;
    margin: 0 auto;
}

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

.page-header h1 {
    font-size: 1.6rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-header h1 i {
    color: var(--accent);
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ---------- Post Grid ---------- */
.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.post-card {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    transition: var(--transition);
    aspect-ratio: 1;
}

.post-card:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(108, 92, 231, 0.2);
}

.post-card a {
    display: block;
    width: 100%;
    height: 100%;
}

.post-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.post-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px 10px 10px;
    background: linear-gradient(transparent, rgba(0,0,0,0.85));
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    opacity: 0;
    transition: var(--transition);
}

.post-card:hover .post-card-overlay {
    opacity: 1;
}

.post-card-stats {
    display: flex;
    gap: 10px;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.85);
}

.post-card-stats span {
    display: flex;
    align-items: center;
    gap: 3px;
}

.post-card-rating {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
}

.rating-s { background: var(--rating-safe); box-shadow: 0 0 6px var(--rating-safe); }
.rating-q { background: var(--rating-questionable); box-shadow: 0 0 6px var(--rating-questionable); }
.rating-e { background: var(--rating-explicit); box-shadow: 0 0 6px var(--rating-explicit); }

.post-card-type {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    color: #fff;
}

/* ---------- Post Detail ---------- */
.post-detail {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
}

.post-image-container {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 500px;
}

.post-image-container img,
.post-image-container video {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
}

.post-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.post-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.post-actions .btn {
    flex: 1;
    min-width: 0;
}

.post-score {
    display: flex;
    align-items: center;
    gap: 12px;
}

.post-score .score-value {
    font-size: 1.2rem;
    font-weight: 700;
    min-width: 40px;
    text-align: center;
}

.score-positive { color: var(--accent-success); }
.score-negative { color: var(--accent-danger); }
.score-neutral { color: var(--text-muted); }

/* ---------- Tag Sidebar ---------- */
.tag-list {
    list-style: none;
}

.tag-list-header {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    padding: 8px 0 4px;
    margin-top: 8px;
}

.tag-list-header:first-child {
    margin-top: 0;
}

.tag-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 8px;
    margin: 1px 0;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.tag-item:hover {
    background: var(--glass-bg-hover);
}

.tag-item a {
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tag-item .tag-count {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.tag-type-general a { color: var(--tag-general); }
.tag-type-artist a { color: var(--tag-artist); }
.tag-type-copyright a { color: var(--tag-copyright); }
.tag-type-character a { color: var(--tag-character); }
.tag-type-species a { color: var(--tag-species); }
.tag-type-meta a { color: var(--tag-meta); }
.tag-type-lore a { color: var(--tag-lore); }
.tag-type-invalid a { color: var(--tag-invalid); }

/* ---------- Tag Cloud ---------- */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    transition: var(--transition-fast);
}

.tag-chip:hover {
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-hover);
}

/* ---------- Comments ---------- */
.comment {
    display: flex;
    gap: 14px;
    padding: 16px;
    border-radius: var(--radius-md);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    margin-bottom: 8px;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--glass-bg-strong);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 1rem;
    flex-shrink: 0;
}

.comment-body {
    flex: 1;
    min-width: 0;
}

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

.comment-author {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-link);
}

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

.comment-text {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.comment-actions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.comment-actions a,
.comment-actions button {
    font-size: 0.78rem;
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: var(--transition-fast);
}

.comment-actions a:hover,
.comment-actions button:hover {
    color: var(--text-primary);
}

/* ---------- Forms ---------- */
.form-group {
    margin-bottom: 18px;
}

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

.form-control {
    width: 100%;
    padding: 10px 14px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    transition: var(--transition);
    outline: none;
}

.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
    background: var(--glass-bg-hover);
}

.form-control::placeholder {
    color: var(--text-muted);
}

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

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%238888aa' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

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

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

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    cursor: pointer;
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
    accent-color: var(--accent);
    width: 16px;
    height: 16px;
}

/* ---------- Auth Forms ---------- */
.auth-container {
    max-width: 440px;
    margin: 40px auto;
}

.auth-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 40px;
    text-align: center;
}

.auth-card h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 6px;
}

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

.auth-card .form-group {
    text-align: left;
}

.auth-card .btn {
    width: 100%;
    margin-top: 8px;
}

.auth-footer {
    margin-top: 20px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.auth-logo {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 16px;
}

/* ---------- Upload Area ---------- */
.upload-drop-zone {
    border: 2px dashed var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 60px 40px;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
}

.upload-drop-zone:hover,
.upload-drop-zone.drag-over {
    border-color: var(--accent);
    background: rgba(108, 92, 231, 0.05);
}

.upload-drop-zone i {
    font-size: 3rem;
    color: var(--accent);
    margin-bottom: 16px;
}

.upload-drop-zone h3 {
    font-size: 1.1rem;
    margin-bottom: 6px;
}

.upload-drop-zone p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

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

.upload-preview {
    max-width: 400px;
    margin: 16px auto 0;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.upload-preview img {
    width: 100%;
    border-radius: var(--radius-md);
}

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

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition-fast);
    text-decoration: none;
}

.pagination a {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
}

.pagination a:hover {
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-hover);
    color: var(--text-primary);
}

.pagination .active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    pointer-events: none;
}

.pagination .disabled {
    opacity: 0.3;
    pointer-events: none;
}

.pagination .dots {
    color: var(--text-muted);
    border: none;
    background: none;
}

/* ---------- Tables ---------- */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--glass-border);
}

.data-table td {
    padding: 12px 16px;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

.data-table tr:hover td {
    background: var(--glass-bg-hover);
}

/* ---------- Pools & Sets ---------- */
.pool-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: var(--transition);
}

.pool-card:hover {
    border-color: var(--glass-border-hover);
    transform: translateY(-2px);
}

.pool-card h3 {
    font-size: 1rem;
    margin-bottom: 6px;
}

.pool-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.pool-meta {
    display: flex;
    gap: 16px;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.pool-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.pool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

/* ---------- Blips ---------- */
.blip {
    display: flex;
    gap: 12px;
    padding: 14px;
    border-radius: var(--radius-md);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    margin-bottom: 8px;
}

.blip-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--glass-bg-strong);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    flex-shrink: 0;
    font-size: 0.9rem;
}

.blip-content {
    flex: 1;
}

.blip-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.blip-author {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-link);
}

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

.blip-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ---------- Forum ---------- */
.forum-category {
    margin-bottom: 24px;
}

.forum-category-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: var(--glass-bg-strong);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    font-weight: 600;
}

.forum-category-header i {
    color: var(--accent);
}

.forum-topic {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 20px;
    align-items: center;
    padding: 14px 18px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-top: none;
    transition: var(--transition-fast);
}

.forum-topic:last-child {
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.forum-topic:hover {
    background: var(--glass-bg-hover);
}

.forum-topic-title {
    font-size: 0.9rem;
    font-weight: 500;
}

.forum-topic-meta {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.forum-topic-replies {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: center;
    min-width: 60px;
}

.forum-topic-activity {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-align: right;
    min-width: 100px;
}

/* ---------- User Profile ---------- */
.profile-header {
    display: flex;
    gap: 24px;
    align-items: center;
    margin-bottom: 32px;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--glass-bg-strong);
    border: 3px solid var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--accent);
    flex-shrink: 0;
}

.profile-info h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

.profile-info .profile-role {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    background: var(--accent-glow);
    color: var(--accent);
    margin-left: 8px;
}

.profile-stats {
    display: flex;
    gap: 24px;
    margin-top: 10px;
}

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

.profile-stat-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.profile-stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ---------- Wiki ---------- */
.wiki-content {
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.wiki-content h1, .wiki-content h2, .wiki-content h3 {
    color: var(--text-primary);
    margin: 20px 0 10px;
}

.wiki-content code {
    background: var(--glass-bg-strong);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85em;
}

.wiki-content pre {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 16px;
    overflow-x: auto;
}

.wiki-content blockquote {
    border-left: 3px solid var(--accent);
    padding: 10px 16px;
    margin: 16px 0;
    background: var(--glass-bg);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* ---------- Info Panel / Post Info ---------- */
.info-panel {
    font-size: 0.85rem;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

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

.info-label {
    color: var(--text-muted);
    font-weight: 500;
}

.info-value {
    color: var(--text-secondary);
}

/* ---------- Tabs ---------- */
.tabs {
    display: flex;
    gap: 2px;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 20px;
}

.tab {
    padding: 10px 18px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    border: none;
    background: none;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: var(--transition-fast);
    font-family: inherit;
}

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

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

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ---------- Rating Filter Badges ---------- */
.rating-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.rating-badge-s {
    background: rgba(46, 213, 115, 0.15);
    color: var(--rating-safe);
}

.rating-badge-q {
    background: rgba(255, 165, 2, 0.15);
    color: var(--rating-questionable);
}

.rating-badge-e {
    background: rgba(255, 71, 87, 0.15);
    color: var(--rating-explicit);
}

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

.empty-state i {
    font-size: 3rem;
    margin-bottom: 16px;
    color: var(--text-muted);
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 0.9rem;
    margin-bottom: 20px;
}

/* ---------- Sidebar Layout ---------- */
.layout-with-sidebar {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 24px;
}

.sidebar {
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

.sidebar-section {
    margin-bottom: 20px;
}

.sidebar-section h3 {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--glass-border);
}

/* ---------- Footer ---------- */
.footer {
    position: relative;
    z-index: 1;
    margin-top: 60px;
    padding: 40px 20px 20px;
    background: var(--glass-bg);
    border-top: 1px solid var(--glass-border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 32px;
    margin-bottom: 32px;
}

.footer-section h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 14px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.footer-section h4 i {
    color: var(--accent);
}

.footer-section p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.footer-section a {
    display: block;
    padding: 4px 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.footer-section a:hover {
    color: var(--accent);
    padding-left: 4px;
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 20px;
    border-top: 1px solid var(--glass-border);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: 16px;
}

.footer-links a {
    color: var(--text-muted);
}

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

/* ---------- Loading Spinner ---------- */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--glass-border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* ---------- Tooltip ---------- */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 10px;
    background: rgba(0,0,0,0.9);
    color: #fff;
    font-size: 0.75rem;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

[data-tooltip]:hover::after {
    opacity: 1;
}

/* ---------- Home Page ---------- */
.hero {
    text-align: center;
    padding: 50px 20px 40px;
}

.hero h1 {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--text-primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto 28px;
}

.hero .search-form {
    max-width: 600px;
    margin: 0 auto;
}

.hero .search-input-wrap input {
    padding: 14px 16px 14px 42px;
    font-size: 1rem;
    border-radius: var(--radius-lg);
}

.hero .btn {
    padding: 14px 24px;
    border-radius: var(--radius-lg);
}

.home-section {
    margin-bottom: 40px;
}

.home-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.home-section-header h2 {
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.home-section-header h2 i {
    color: var(--accent);
}

.trending-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 32px;
}

.trending-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: var(--transition);
}

.trending-tag .rank {
    font-weight: 700;
    color: var(--accent);
    font-size: 0.8rem;
}

.trending-tag:hover {
    border-color: var(--accent);
    color: var(--text-primary);
    background: var(--glass-bg-hover);
    transform: translateY(-2px);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .post-detail {
        grid-template-columns: 1fr;
    }

    .layout-with-sidebar {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        max-height: none;
    }

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

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(10, 10, 26, 0.98);
        backdrop-filter: var(--glass-blur);
        flex-direction: column;
        padding: 20px;
        gap: 4px;
        overflow-y: auto;
        z-index: 999;
    }

    .nav-links.mobile-open {
        display: flex;
    }

    .nav-mobile-toggle {
        display: block;
    }

    .nav-search {
        max-width: 300px;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .post-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 8px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

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

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

    .forum-topic {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .forum-topic-replies,
    .forum-topic-activity {
        text-align: left;
    }

    .auth-card {
        padding: 28px 20px;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 16px 12px;
    }

    .nav-search {
        max-width: none;
        flex: 1;
    }

    .post-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    }

    .glass-card {
        padding: 16px;
    }
}
