/* =============================================
   nblog - Dark Classified Theme
   Classified Information Blog - Confidential Document Style
   ============================================= */

:root {
    --bg: #0a0e17;
    --bg-secondary: #0f1522;
    --surface: #131b2c;
    --surface-hover: #1a2338;
    --primary: #00e5a0;
    --primary-dark: #00b384;
    --primary-glow: rgba(0, 229, 160, 0.15);
    --accent: #ff6b9d;
    --text: #e2e8f0;
    --text-secondary: #8296b0;
    --border: #1e2a3f;
    --border-glow: #2a3a55;
    --danger: #ff4757;
    --warning: #ffb830;
    --radius: 8px;
    --radius-lg: 16px;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --font-mono: 'Fira Code', 'Consolas', 'Monaco', monospace;
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Smooth scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--border-glow);
    border-radius: 5px;
    border: 2px solid var(--bg);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

::selection {
    background: rgba(0, 229, 160, 0.25);
    color: var(--text);
}

/* Focus visibility for accessibility */
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    background-image:
        radial-gradient(circle at 20% 50%, rgba(0, 229, 160, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 107, 157, 0.03) 0%, transparent 50%);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    width: 100%;
}

main.container {
    flex: 1;
    padding-top: 2rem;
    padding-bottom: 3rem;
}

/* =============================================
   Header
   ============================================= */

.header {
    background: rgba(15, 21, 34, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    gap: 1rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    letter-spacing: 1px;
    text-shadow: 0 0 20px var(--primary-glow);
}

.logo i {
    filter: drop-shadow(0 0 8px var(--primary));
}

.nav {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    padding: 0.75rem 1.25rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    transition: color 0.2s, text-shadow 0.2s, border-color 0.2s, background 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
    text-shadow: 0 0 12px var(--primary-glow);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-menu span {
    font-weight: 600;
    color: var(--primary);
    font-family: var(--font-mono);
}

/* User name button - same style as other header buttons */
.user-name-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    height: 2.375rem;
    padding: 0 1.25rem;
    background: rgba(0, 229, 160, 0.05);
    color: var(--primary);
    border: 1px solid var(--primary);
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    font-family: inherit;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.user-name-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.5s ease;
}

.user-name-btn:hover::before {
    left: 100%;
}

.user-name-btn:hover {
    background: rgba(0, 229, 160, 0.12);
    box-shadow: 0 0 18px var(--primary-glow), inset 0 0 12px rgba(0, 229, 160, 0.08);
    transform: translateY(-2px);
    border-color: var(--primary-glow);
}

.user-name-btn:active {
    transform: translateY(0) scale(0.97);
}

/* =============================================
   Buttons
   ============================================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    height: 2.375rem;
    padding: 0 1.25rem;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn:active {
    transform: translateY(0) scale(0.97);
}

.btn-primary {
    background: rgba(0, 229, 160, 0.15);
    color: var(--primary);
    border: 1px solid var(--primary);
    box-shadow: 0 2px 8px rgba(0, 229, 160, 0.08);
}

.btn-primary:hover {
    background: rgba(0, 229, 160, 0.22);
    box-shadow: 0 0 18px var(--primary-glow);
    transform: translateY(-2px);
}

.btn-outline {
    background: rgba(0, 229, 160, 0.05);
    color: var(--primary);
    border: 1px solid var(--primary);
    box-shadow: inset 0 0 0 rgba(0, 229, 160, 0);
}

.btn-outline:hover {
    background: rgba(0, 229, 160, 0.12);
    box-shadow: 0 0 18px var(--primary-glow), inset 0 0 12px rgba(0, 229, 160, 0.08);
    transform: translateY(-2px);
    border-color: var(--primary-glow);
}

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

.btn-secondary:hover {
    background: var(--border-glow);
}

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

.btn-danger:hover {
    background: rgba(255, 71, 87, 0.1);
    box-shadow: 0 0 15px rgba(255, 71, 87, 0.2);
}

.btn-sm {
    padding: 0 0.75rem;
    font-size: 0.8rem;
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* =============================================
   Hero - Classified Banner
   ============================================= */

.hero {
    text-align: center;
    padding: 4.5rem 0 3.5rem;
    margin-bottom: 2rem;
    position: relative;
}

.hero::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(600px, 90vw);
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(0, 229, 160, 0.06) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

.hero::before {
    content: 'CLASSIFIED';
    position: absolute;
    top: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 8px;
    color: var(--danger);
    opacity: 0.5;
    border: 1px solid var(--danger);
    padding: 0.2rem 1rem;
    border-radius: 2px;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    margin-top: 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: var(--font-mono);
    letter-spacing: -0.5px;
    animation: heroShimmer 6s ease-in-out infinite;
}

@keyframes heroShimmer {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 100% center; }
}

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

/* =============================================
   Toolbar (Search + Category)
   ============================================= */

.toolbar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.search-box {
    display: flex;
    gap: 0.75rem;
}

.search-box input {
    flex: 1;
    height: 2.375rem;
    padding: 0 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.95rem;
    font-family: var(--font-mono);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.search-box input::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

.category-filter {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.category-filter .cat-hidden {
    display: none;
}

.category-filter .cat-hidden.cat-visible {
    display: inline-block;
}

.category-filter .cat-toggle-btn {
    background: transparent;
    border-style: dashed;
    opacity: 0.75;
}

.category-filter .cat-toggle-btn:hover {
    opacity: 1;
}

.search-box select {
    height: 2.375rem;
    padding: 0 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.95rem;
    font-family: var(--font-mono);
    transition: border-color 0.2s, box-shadow 0.2s;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238296b0' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.25rem;
}

.search-box select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

/* =============================================
   Posts Grid
   ============================================= */

.posts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
    align-items: stretch;
}

.post-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.25s;
    cursor: pointer;
    border: 1px solid var(--border);
    position: relative;
    display: flex;
    flex-direction: column;
}

@media (hover: hover) {
    .post-card:hover {
        transform: translateY(-6px);
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(0, 229, 160, 0.12);
        border-color: rgba(0, 229, 160, 0.4);
    }
}

.post-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    opacity: 0;
    transition: opacity 0.25s;
    z-index: 1;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

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

.post-card-cover {
    width: 100%;
    height: 100px;
    background: linear-gradient(135deg, var(--bg-secondary), var(--surface-hover));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.75rem;
    border-bottom: 1px solid var(--border);
}

.post-card-body {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-card-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

.post-card-category {
    background: var(--primary-glow);
    color: var(--primary);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.post-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    color: var(--text);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.7em;
}

.post-card-title a {
    color: inherit;
    text-decoration: none;
}

.post-card-title a:hover {
    color: var(--primary);
}

.post-card-excerpt {
    color: var(--text-secondary);
    font-size: 0.82rem;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.post-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: auto;
}

.post-card-stats {
    display: flex;
    gap: 1rem;
}

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

/* =============================================
   Bot Check Slider (CAPTCHA)
   ============================================= */

.botcheck-slider-container {
    position: relative;
    width: 100%;
    height: 48px;
    margin: 1.5rem 0;
    border-radius: 8px;
    overflow: hidden;
}

.botcheck-slider-track {
    position: relative;
    width: 100%;
    height: 100%;
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.botcheck-slider-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, rgba(0, 229, 160, 0.12), rgba(0, 229, 160, 0.22));
    transition: width 0.1s ease;
}

.botcheck-slider-thumb {
    position: absolute;
    top: 0;
    left: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #00e5a0, #00b384);
    color: #06231a;
    font-size: 1.1rem;
    cursor: grab;
    border-radius: 6px;
    z-index: 2;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.botcheck-slider-thumb:active {
    cursor: grabbing;
}

.botcheck-slider-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    pointer-events: none;
    transition: opacity 0.2s ease;
    white-space: nowrap;
}

/* =============================================
   Single Post - Classified Document
   ============================================= */

.post-single {
    max-width: 800px;
    margin: 0 auto;
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 3rem;
    border: 1px solid var(--border);
    position: relative;
}

.post-single::before {
    content: 'CONFIDENTIAL';
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 3px;
    color: var(--danger);
    opacity: 0.4;
    border: 1px solid var(--danger);
    padding: 0.15rem 0.5rem;
    border-radius: 2px;
    transform: rotate(-2deg);
}

.post-single-header {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.post-single-title {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.3;
    color: var(--text);
}

.post-single-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

.post-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.post-single-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text);
}

.post-single-content h1,
.post-single-content h2,
.post-single-content h3 {
    margin: 2rem 0 1rem;
    color: var(--primary);
}

.post-single-content p {
    margin-bottom: 1rem;
}

.post-single-content pre {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--primary);
    padding: 1.5rem;
    border-radius: var(--radius);
    overflow-x: auto;
    margin-bottom: 1rem;
    font-family: var(--font-mono);
}

.post-single-content code {
    background: var(--bg-secondary);
    color: var(--accent);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9em;
    font-family: var(--font-mono);
}

.post-single-content pre code {
    background: none;
    color: inherit;
    padding: 0;
}

.post-single-content ul,
.post-single-content ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

/* =============================================
   Category Chips (multi-select in post form)
   ============================================= */

.cat-count {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    margin-left: 0.5rem;
    transition: all 0.2s ease;
}

.cat-count.has-selection {
    color: var(--primary);
    border-color: var(--primary);
    background: rgba(0, 229, 160, 0.08);
}

.category-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    max-height: 150px;
    overflow-y: auto;
}

.category-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.75rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text);
    user-select: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
}

.category-chip input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.category-chip:has(input:checked) {
    border-color: var(--primary);
    background: rgba(0, 229, 160, 0.1);
    color: var(--primary);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 229, 160, 0.15);
}

.category-chip:active {
    transform: translateY(0) scale(0.96);
}

/* =============================================
   Comments
   ============================================= */

.comments-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.comments-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text);
}

.comment-form {
    margin-bottom: 2rem;
}

.comment-form textarea {
    width: 100%;
    min-height: 100px;
    padding: 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.95rem;
    resize: vertical;
    font-family: inherit;
}

.comment-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.comment-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.comment-item {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    border: 1px solid var(--border);
}

.comment-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

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

.comment-date {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

.comment-content {
    font-size: 0.95rem;
    color: var(--text);
}

/* =============================================
   Forms
   ============================================= */

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

.form-group select {
    cursor: pointer;
}

.form-group select option {
    background: var(--surface);
    color: var(--text);
}

.auth-form {
    max-width: 400px;
    margin: 3rem auto;
    background: var(--surface);
    padding: 2.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}

.auth-form h2 {
    margin-bottom: 1.5rem;
    text-align: center;
    color: var(--text);
    font-family: var(--font-mono);
}

.auth-form .btn {
    width: 100%;
    justify-content: center;
    padding: 0.75rem;
    font-size: 1rem;
}

.auth-switch {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.auth-switch a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.auth-switch a:hover {
    text-shadow: 0 0 10px var(--primary-glow);
}

/* =============================================
   MyPage
   ============================================= */

.mypage-info {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.mypage-info p {
    margin-bottom: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

.mypage-info p strong {
    color: var(--primary);
}

/* =============================================
   Footer
   ============================================= */

.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 2rem 0;
    margin-top: auto;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-family: var(--font-mono);
}

.footer-contact {
    margin: 0 0 0.75rem 0;
}

.footer-contact a {
    color: var(--primary);
    text-decoration: none;
}

.footer-contact a:hover {
    text-decoration: underline;
}

.footer-contact i {
    margin-right: 0.25rem;
}

/* =============================================
   Utility
   ============================================= */

.hidden {
    display: none !important;
}

.loading {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

.error {
    text-align: center;
    padding: 3rem;
    color: var(--danger);
    font-family: var(--font-mono);
}

/* =============================================
   Responsive
   ============================================= */

@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        gap: 1rem;
    }

    .nav {
        gap: 1rem;
    }

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

    .post-single {
        padding: 1.5rem;
    }

    .post-single-title {
        font-size: 1.6rem;
    }

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

    .search-box {
        flex-direction: column;
    }
}
/* ============================================= */
/* Read More Gate - Read More Button */
/* ============================================= */
.readmore-gate {
    position: relative;
    margin-top: -4rem;
    padding-top: 4rem;
    background: linear-gradient(to bottom, transparent, var(--bg-primary));
    text-align: center;
}

.readmore-gate .btn-readmore {
    padding: 0.75rem 2rem;
    font-size: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.readmore-gate .btn-readmore:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
}

/* Show only part of the content to non-logged-in users */
.post-single-content {
    position: relative;
}

/* Truncate content when not logged in */
.gated-content {
    max-height: 300px;
    overflow: hidden;
}

.gated-content + .readmore-gate {
    position: relative;
}

.readmore-overlay {
    position: absolute;
    top: -60px;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to bottom, transparent, var(--bg-primary));
    pointer-events: none;
}

.readmore-overlay::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(to bottom, transparent, var(--bg-primary));
}

/* Show full content for logged-in users */
.post-single-content:not(.gated-content) {
    max-height: none;
}

/* ============================================= */
/* Payment Button - Payment Button */
/* ============================================= */
.btn-payment {
    background: linear-gradient(135deg, #f39c12, #e67e22) !important;
    color: #fff !important;
    border: none;
    padding: 0.75rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.3);
}

.btn-payment:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(243, 156, 18, 0.5);
}

.btn-payment i {
    margin-right: 0.5rem;
}

/* =============================================
   Language Selector
   ============================================= */
.lang-selector {
    position: relative;
}

.lang-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    height: 2.375rem;
    padding: 0 1.25rem;
    background: rgba(0, 229, 160, 0.04);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.lang-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--accent, #ff6b9d));
    transition: width 0.3s ease, left 0.3s ease;
    transform: translateX(-50%);
}

.lang-btn:hover {
    background: rgba(0, 229, 160, 0.1);
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(0, 229, 160, 0.15);
    transform: translateY(-1px);
}

.lang-btn:hover::after {
    width: 100%;
}

.lang-btn.active {
    background: rgba(0, 229, 160, 0.12);
    border-color: var(--primary);
    box-shadow: 0 0 12px rgba(0, 229, 160, 0.2);
}

.lang-btn i.fa-globe {
    color: var(--primary, #3b82f6);
}

.lang-btn i.fa-chevron-down {
    font-size: 0.75rem;
    transition: transform 0.2s ease;
}

.lang-btn.active i.fa-chevron-down {
    transform: rotate(180deg);
}

.lang-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 160px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    padding: 0.5rem;
    z-index: 9999;
    animation: langMenuFadeIn 0.15s ease;
}

@keyframes langMenuFadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.6rem 0.75rem;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: var(--text);
    font-size: 0.875rem;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
}

.lang-option:hover {
    background: rgba(0, 229, 160, 0.08);
    padding-left: 1rem;
    color: var(--primary);
}

.lang-option.active {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary, #3b82f6);
    font-weight: 600;
}

.lang-flag {
    display: inline-block;
    min-width: 2ch;
    font-size: 0.8125rem;
    font-weight: 600;
    text-align: center;
    text-transform: uppercase;
    color: var(--text-secondary, #8296b0);
}

.lang-menu.hidden {
    display: none;
}

/* Footer action button area (app download button) */
.footer-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

/* Mobile: compact header layout in 3 rows */
@media (max-width: 480px) {
    .nav { gap: 0.5rem; }

    .nav-link { font-size: 0.95rem; padding: 0.55rem 0.9rem; }

    /* Language + login/write buttons in one row */
    .header-actions {
        flex-wrap: nowrap;
        justify-content: center;
        gap: 0.4rem;
    }

    .lang-btn {
        font-size: 0.9rem;
        padding: 0.55rem 0.8rem;
        justify-content: center;
    }

    .lang-btn i.fa-globe { font-size: 1rem; }

    .lang-btn i.fa-chevron-down { font-size: 0.8rem; }

    /* Unify size with login/write buttons */
    .header-actions .btn {
        font-size: 0.9rem;
        padding: 0.55rem 0.8rem;
    }
}

/* =============================================
   Pagination
   ============================================= */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
    padding-top: 2rem;
    padding-bottom: 1rem;
    border-top: 1px solid var(--border);
}

.pagination .btn {
    min-width: 2.5rem;
    height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pagination .btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagination-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2.5rem;
    color: var(--text-secondary);
    font-weight: 600;
    letter-spacing: 2px;
}

/* =============================================
   Language Selection Modal (first visit)
   ============================================= */

.langsel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(4, 8, 16, 0.65);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    animation: langselFadeIn 0.3s ease;
}

@keyframes langselFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.langsel-overlay.hidden {
    display: none;
}

.langsel-modal {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 0;
    max-width: 420px;
    width: 92%;
    max-height: 90vh;
    overflow-y: auto;
    text-align: center;
    box-shadow: 0 32px 64px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 229, 160, 0.08);
    animation: langselSlideUp 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

@keyframes langselSlideUp {
    from { opacity: 0; transform: translateY(24px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.langsel-header {
    position: relative;
    padding: 2.75rem 2rem 1.75rem;
    background: linear-gradient(135deg, #00c896 0%, #00e5a0 60%, #00b384 100%);
}

.langsel-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    pointer-events: none;
}

.langsel-header::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    pointer-events: none;
}

.langsel-badge {
    width: 72px;
    height: 72px;
    margin: 0 auto 1.25rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    animation: langselPulse 3s ease-in-out infinite;
}

@keyframes langselPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2); }
    50% { transform: scale(1.05); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3); }
}

.langsel-title {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.langsel-message {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
    margin-bottom: 0;
}

.langsel-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    padding: 1.75rem 1.5rem 1.75rem;
    max-height: 340px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #334155 transparent;
}

.langsel-list::-webkit-scrollbar {
    width: 6px;
}

.langsel-list::-webkit-scrollbar-track {
    background: transparent;
}

.langsel-list::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 3px;
}

.langsel-list button {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    border: 1px solid var(--border-color, #334155);
    background: var(--bg-secondary, #0f172a);
    color: var(--text-primary, #f1f5f9);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease;
}

.langsel-list button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, #3b82f6, #1d4ed8);
    transform: scaleY(0);
    transition: transform 0.2s ease;
}

.langsel-list button:hover {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.12);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.langsel-list button:hover::before {
    transform: scaleY(1);
}

.langsel-list button:active {
    transform: translateY(0) scale(0.98);
}

.langsel-list button .lang-flag {
    font-size: 1.4rem;
    width: 1.75rem;
    text-align: center;
}

.langsel-skip {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
    z-index: 1;
}

.langsel-skip:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(90deg);
}

@media (max-width: 480px) {
    .langsel-modal {
        max-width: 100%;
    }

    .langsel-list {
        grid-template-columns: 1fr;
        padding: 1.25rem 1rem 1.5rem;
    }

    .langsel-header {
        padding: 2.25rem 1.5rem 1.5rem;
    }

    .langsel-badge {
        width: 64px;
        height: 64px;
        font-size: 1.75rem;
    }

    .langsel-title {
        font-size: 1.3rem;
    }
}

/* =============================================
   Bot Check (Bot Check / CAPTCHA) Modal
   ============================================= */

.botcheck-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(4, 8, 16, 0.65);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    animation: botcheckFadeIn 0.3s ease;
}

@keyframes botcheckFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.botcheck-overlay.hidden {
    display: none;
}

.botcheck-modal {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2.5rem 2rem 2rem;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 32px 64px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 229, 160, 0.08);
    animation: botcheckSlideUp 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

@keyframes botcheckSlideUp {
    from { opacity: 0; transform: translateY(16px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.botcheck-badge {
    width: 56px;
    height: 56px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 229, 160, 0.12);
    border: 1px solid rgba(0, 229, 160, 0.35);
    color: var(--primary);
    font-size: 1.4rem;
    box-shadow: 0 4px 16px rgba(0, 229, 160, 0.15);
}

.botcheck-title {
    margin: 0 0 0.5rem;
    color: var(--text);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.botcheck-message {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.botcheck-question {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 0.1rem;
}

.botcheck-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text);
    font-size: 1.2rem;
    text-align: center;
    margin-bottom: 1rem;
    box-sizing: border-box;
}

.botcheck-input:focus {
    outline: none;
    border-color: var(--primary);
}

.botcheck-error {
    color: #ef4444;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.botcheck-error.hidden {
    display: none;
}

.botcheck-submit {
    width: 100%;
    padding: 0.75rem 1rem;
    margin-top: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #00e5a0, #00b384);
    color: #06231a;
    transition: all 0.2s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.botcheck-submit:hover {
    background: linear-gradient(135deg, #00f0aa, #00c896);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 229, 160, 0.35);
}

.botcheck-submit:active {
    transform: translateY(0);
}

.botcheck-submit i {
    font-size: 1rem;
}

/* =============================================
   Enhanced Mobile Responsive Styles (entire site)
   ============================================= */

/* --- Tablet (1024px and below) --- */
@media (max-width: 1024px) {
    .posts-grid { grid-template-columns: repeat(3, 1fr); }
    .hero { padding: 3rem 0 2rem; }
    .hero h1 { font-size: 2.2rem; }
}

/* --- Mobile (768px and below) --- */
@media (max-width: 768px) {
    /* ===== Header ===== */
    .header-inner { flex-direction: column; gap: 0.75rem; padding: 0.75rem 0; }
    .logo { font-size: 1.25rem; }
    .nav { gap: 0.75rem; flex-wrap: wrap; justify-content: center; }
    .nav-link { font-size: 1rem; padding: 0.75rem 1.25rem; }
    .header-actions { flex-wrap: wrap; justify-content: center; gap: 0.5rem; }
    .header-actions .btn { padding: 0.5rem 0.9rem; font-size: 0.85rem; }
    .user-menu { flex-wrap: wrap; justify-content: center; gap: 0.5rem; }

    /* ===== Hero ===== */
    .hero { padding: 2.5rem 0 2rem; }
    .hero h1 { font-size: 1.8rem; }
    .hero p { font-size: 0.95rem; }

    /* ===== Toolbar (Search + Category) ===== */
    .toolbar { padding: 1rem; gap: 0.75rem; }
    .search-box { flex-direction: column; gap: 0.5rem; }
    .search-box input { min-width: 0; width: 100%; }
    .search-box .btn { width: 100%; justify-content: center; }
    .category-filter { gap: 0.4rem; }
    .category-filter .btn { padding: 0.4rem 0.75rem; font-size: 0.8rem; }

    /* ===== Posts Grid ===== */
    .posts-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
    .post-card-body { padding: 0.75rem; }
    .post-card-title { font-size: 0.95rem; }
    .post-card-excerpt { font-size: 0.8rem; }

    /* ===== Single Post ===== */
    .post-single { padding: 1.25rem; }
    .post-single-title { font-size: 1.4rem; }
    .post-single-meta { font-size: 0.8rem; flex-wrap: wrap; }
    .post-actions { flex-wrap: wrap; }
    .post-single-content { font-size: 0.95rem; line-height: 1.7; }
    .post-single-content img { max-width: 100%; height: auto; }
    .post-single-content pre { overflow-x: auto; font-size: 0.8rem; padding: 0.75rem; }
    .post-single-content table { display: block; overflow-x: auto; white-space: nowrap; }
    .post-single-content blockquote { padding: 0.75rem 1rem; margin: 1rem 0; }

    /* ===== Read More Gate ===== */
    .gated-content { max-height: 200px; }
    .readmore-gate { margin-top: -3rem; padding-top: 3rem; }
    .readmore-gate .btn-readmore { padding: 0.6rem 1.5rem; font-size: 0.9rem; }

    /* ===== Price / Crypto / Attachments ===== */
    .post-price-info, .post-crypto-info { flex-wrap: wrap; font-size: 0.85rem; word-break: break-all; }
    .post-attachments ul li { flex-wrap: wrap; gap: 0.5rem; }

    /* ===== Comments ===== */
    .comments-section { margin-top: 2rem; padding-top: 1.5rem; }
    .comments-title { font-size: 1.1rem; }
    .comment-item { padding: 0.75rem; }
    .comment-form textarea { min-height: 80px; }

    /* ===== Forms ===== */
    .auth-form { max-width: 100%; margin: 1.5rem auto; padding: 1.5rem; }
    .auth-form h2 { font-size: 1.3rem; }

    /* ===== MyPage ===== */
    .mypage-info { padding: 1rem; }
    .mypage-info p { font-size: 0.8rem; word-break: break-all; }

    /* ===== Admin Page ===== */
    .admin-page { padding: 1rem; }
    .admin-tabs { flex-wrap: wrap; gap: 0.4rem; }
    .admin-tabs .btn { padding: 0.4rem 0.75rem; font-size: 0.8rem; }

    /* Admin internal grid (inline style override) */
    #adminContent > div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
    #adminContent > div[style*="minmax(180px"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    #adminContent > div[style*="minmax(280px"] {
        grid-template-columns: 1fr !important;
    }

    /* Admin visitor search filter */
    #visitorSearchField, #visitorSearchInput { font-size: 0.85rem; }

    /* ===== Pagination ===== */
    .pagination { gap: 0.35rem; flex-wrap: wrap; }
    .pagination .btn { min-width: 2.25rem; height: 2.25rem; font-size: 0.85rem; }

    /* ===== Bot Check Modal ===== */
    .botcheck-modal { padding: 1.5rem; }

    /* ===== Crypto Payment Modal ===== */
    .crypto-modal { max-width: 95%; padding: 1.25rem; }

    /* ===== Footer ===== */
    .footer { padding: 1.5rem 0; font-size: 0.8rem; }
}

/* --- Smartphone (480px and below) --- */
@media (max-width: 480px) {
    /* ===== Posts Grid - 1 column ===== */
    .posts-grid { grid-template-columns: 1fr; }

    /* ===== Header - place user menu in the top-right corner ===== */
    .header-inner { gap: 0.5rem; position: relative; padding-top: 2.2rem; }
    .user-menu {
        position: absolute;
        top: 0;
        right: 0;
        gap: 0.4rem;
    }
    .user-menu .user-name-btn {
        font-size: 0.8rem;
        font-weight: 600;
        font-family: var(--font-mono);
        color: var(--primary);
        background: var(--surface);
        border: 1px solid var(--primary);
        border-radius: var(--radius);
        padding: 0.3rem 0.7rem;
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        gap: 0.3rem;
    }
    .user-menu .user-name-btn:active {
        background: var(--primary-glow);
    }
    .user-menu .btn { font-size: 0.8rem; padding: 0.25rem 0.6rem; }

    /* ===== Nav ===== */
    .nav { gap: 0.5rem; }
    .nav-link { font-size: 1rem; padding: 0.75rem 1.25rem; }

    /* ===== Hero ===== */
    .hero { padding: 2rem 0 1.5rem; }
    .hero h1 { font-size: 1.5rem; }
    .hero p { font-size: 0.85rem; }

    /* ===== Single Post ===== */
    .post-single { padding: 1rem; }
    .post-single-title { font-size: 1.2rem; }
    .post-single-meta { font-size: 0.75rem; gap: 0.5rem; }
    .post-actions { gap: 0.4rem; }
    .post-actions .btn { padding: 0.4rem 0.75rem; font-size: 0.8rem; }

    /* ===== Read More Gate ===== */
    .gated-content { max-height: 150px; }
    .readmore-gate { margin-top: -2.5rem; padding-top: 2.5rem; }
    .btn-payment { padding: 0.6rem 1.2rem; font-size: 0.9rem; }

    /* ===== Comments ===== */
    .comment-item { padding: 0.6rem; }
    .comment-header { flex-direction: column; align-items: flex-start; gap: 0.25rem; }

    /* ===== Forms ===== */
    .auth-form { padding: 1.25rem; margin: 1rem auto; }

    /* ===== MyPage ===== */
    .mypage-info { padding: 0.75rem; }
    .mypage-info p { font-size: 0.75rem; }

    /* ===== Admin ===== */
    .admin-page { padding: 0.75rem; }
    .admin-tabs .btn { padding: 0.35rem 0.6rem; font-size: 0.75rem; }
    #adminContent > div[style*="minmax(180px"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* ===== Pagination ===== */
    .pagination .btn { min-width: 2rem; height: 2rem; font-size: 0.8rem; }

    /* ===== Bot Check ===== */
    .botcheck-modal { padding: 1.25rem; width: 95%; }
    .botcheck-question { font-size: 1.4rem; padding: 1rem; }

    /* ===== Crypto Payment Modal ===== */
    .crypto-modal { padding: 1rem; }
    .crypto-modal h3 { font-size: 1.1rem; }

    /* ===== Footer ===== */
    .footer { padding: 1rem 0; font-size: 0.75rem; }
}

/* --- Very small screens (360px and below) --- */
@media (max-width: 360px) {
    .header-actions { gap: 0.35rem; }
    .header-actions .btn { padding: 0.4rem 0.7rem; font-size: 0.8rem; }
    .hero h1 { font-size: 1.3rem; }
    .post-single-title { font-size: 1.1rem; }
    .pagination .btn { min-width: 1.85rem; height: 1.85rem; font-size: 0.75rem; }
    #adminContent > div[style*="minmax(180px"] {
        grid-template-columns: 1fr !important;
    }
}


/* =============================================
   Newsletter subscription (footer)
   ============================================= */
.newsletter-section {
    max-width: 480px;
    margin: 0 auto 24px;
    padding: 24px;
    text-align: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
}

.newsletter-title {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 700;
    color: var(--text, #f1f5f9);
}

.newsletter-desc {
    margin: 0 0 16px;
    font-size: 14px;
    color: var(--text-secondary, #94a3b8);
}

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

.newsletter-form input[type="email"] {
    flex: 1;
    min-width: 0;
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text, #f1f5f9);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.newsletter-form input[type="email"]:focus {
    border-color: var(--primary, #3b82f6);
}

.newsletter-form input[type="email"]::placeholder {
    color: var(--text-secondary, #94a3b8);
}

.newsletter-msg {
    min-height: 18px;
    margin: 10px 0 0;
    font-size: 13px;
    color: var(--text-secondary, #94a3b8);
}

@media (max-width: 480px) {
    .newsletter-form {
        flex-direction: column;
    }
}

/* =============================================
   Download Dropdown (header)
   ============================================= */
.dl-selector {
    position: relative;
}

.dl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    height: 2.375rem;
    padding: 0 1.25rem;
    background: rgba(0, 229, 160, 0.04);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dl-btn:hover {
    background: rgba(0, 229, 160, 0.1);
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(0, 229, 160, 0.15);
    transform: translateY(-1px);
}

.dl-btn.active {
    background: rgba(0, 229, 160, 0.12);
    border-color: var(--primary);
    box-shadow: 0 0 12px rgba(0, 229, 160, 0.2);
}

.dl-btn i.fa-download {
    color: var(--primary);
}

.dl-btn i.fa-chevron-down {
    font-size: 0.75rem;
    transition: transform 0.2s ease;
}

.dl-btn.active i.fa-chevron-down {
    transform: rotate(180deg);
}

.dl-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 180px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    padding: 0.5rem;
    z-index: 9999;
    animation: langMenuFadeIn 0.15s ease;
}

.dl-menu.hidden {
    display: none;
}

.dl-menu-group {
    padding: 0.25rem 0;
}

.dl-menu-group + .dl-menu-group {
    padding-top: 0.5rem;
}

.dl-menu-label {
    padding: 0.4rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: var(--font-mono);
}

.dl-menu button {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.6rem 0.75rem;
    background: none;
    border: none;
    border-radius: 6px;
    color: var(--text);
    font-size: 0.9rem;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s;
}

.dl-menu button:hover {
    background: rgba(0, 229, 160, 0.08);
    padding-left: 1rem;
    color: var(--primary);
}

.dl-menu-divider {
    height: 1px;
    margin: 0.5rem 0.75rem;
    background: var(--border);
}

/* =============================================
   Download Dropdown - Mobile Responsive
   ============================================= */

/* Tablet (768px and below) */
@media (max-width: 768px) {
    .dl-btn {
        height: 2.25rem;
        padding: 0 0.9rem;
        font-size: 0.85rem;
    }

    .dl-menu {
        min-width: 170px;
    }
}

/* Mobile (480px and below) */
@media (max-width: 480px) {
    .dl-btn {
        height: 2.1rem;
        padding: 0 0.7rem;
        font-size: 0.8rem;
    }

    /* Show only the icon on very narrow screens */
    .dl-btn .dl-btn-text {
        display: none;
    }

    .dl-btn {
        padding: 0 0.6rem;
        gap: 0;
    }

    .dl-btn i.fa-download {
        font-size: 0.95rem;
    }

    .dl-btn i.fa-chevron-down {
        font-size: 0.7rem;
    }

    /* Dropdown menu: prevent overflow off the right edge of the screen */
    .dl-menu {
        position: fixed;
        top: auto;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        min-width: 200px;
        max-width: calc(100vw - 2rem);
    }

    .dl-menu button {
        padding: 0.7rem 0.75rem;
        font-size: 0.9rem;
    }

    .dl-menu-label {
        font-size: 0.7rem;
    }
}

/* Very small screens (360px and below) */
@media (max-width: 360px) {
    .dl-btn {
        padding: 0 0.5rem;
    }

    .dl-menu {
        min-width: 180px;
    }
}


/* =============================================
   Toast Notifications
   ============================================= */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    padding: 14px 22px;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    max-width: 350px;
    min-width: 250px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: translateX(120%);
    transition: opacity 0.3s ease, transform 0.3s ease;
    word-break: break-word;
    pointer-events: auto;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-success {
    background: linear-gradient(135deg, #10b981, #059669);
}

.toast-error {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.toast-info {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.toast-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

/* ============================================
   Expired post styles
   ============================================ */

/* List card - expired */
.post-card.post-expired {
    opacity: 0.55;
    filter: grayscale(0.6);
    pointer-events: none;
    position: relative;
}

.post-card.post-expired .post-card-title a,
.post-card.post-expired .post-card-excerpt {
    color: var(--text-muted, #6b7280);
}

/* Expired badge (for list cards) */
.post-expired-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.6rem;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid #ef4444;
    border-radius: 999px;
    color: #ef4444;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
}

/* Attachment badge (for list cards) */
.post-attachment-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.6rem;
    background: rgba(0, 229, 160, 0.12);
    border: 1px solid rgba(0, 229, 160, 0.6);
    border-radius: 999px;
    color: #00e5a0;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
}

/* Expired badge (for detail page) */
.post-expired-badge {
    margin: 1rem 0;
    padding: 0.75rem 1rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid #ef4444;
    border-radius: 8px;
    color: #ef4444;
    font-weight: 600;
}

/* Expired notice box (detail page block screen) */
.post-expired-block {
    text-align: center;
    padding: 3rem 1.5rem;
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 12px;
    margin: 1.5rem 0;
}

.post-expired-block-icon {
    font-size: 3rem;
    color: #ef4444;
    margin-bottom: 1rem;
}

.post-expired-block-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ef4444;
    margin-bottom: 0.5rem;
}

.post-expired-block-desc {
    color: var(--text-muted, #6b7280);
    margin-bottom: 1.5rem;
}

/* =============================================
   Crypto Payment Modal (Crypto Payment Modal) - Mobile Responsive
   ============================================= */

.crypto-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(4, 8, 16, 0.65);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    backdrop-filter: blur(8px);
}

.crypto-modal {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 2rem;
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--border);
    box-shadow: 0 32px 64px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 229, 160, 0.08);
    animation: botcheckSlideUp 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.crypto-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 0.5rem;
}

.crypto-modal-title {
    margin: 0;
    color: var(--text, #f1f5f9);
    font-size: 1.25rem;
}

.crypto-modal-title i {
    color: #f7931a;
}

.crypto-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary, #94a3b8);
    cursor: pointer;
    padding: 0.25rem;
    flex-shrink: 0;
}

.crypto-modal-close:hover {
    color: var(--text, #f1f5f9);
}

.crypto-modal-loading {
    text-align: center;
    padding: 2rem 0;
    color: var(--text-secondary, #94a3b8);
}

.crypto-modal-field {
    margin-bottom: 1rem;
}

.crypto-modal-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text, #f1f5f9);
    font-weight: 600;
}

.crypto-modal-select,
.crypto-modal-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border, #334155);
    border-radius: 8px;
    background: var(--bg, #0f172a);
    color: var(--text, #f1f5f9);
    font-size: 1rem;
}

.crypto-modal-btn {
    width: 100%;
    padding: 0.75rem;
    background: linear-gradient(135deg, #f7931a, #f59e0b);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}

.crypto-modal-btn:hover {
    filter: brightness(1.1);
}

.crypto-modal-info {
    background: var(--bg, #0f172a);
    border: 1px solid var(--border, #334155);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.crypto-modal-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    gap: 0.5rem;
}

.crypto-modal-info-row:last-child {
    margin-bottom: 0;
}

.crypto-modal-info-label {
    color: var(--text-secondary, #94a3b8);
}

.crypto-modal-info-value {
    color: var(--text, #f1f5f9);
    font-weight: 600;
    text-align: right;
}

.crypto-modal-wallet-row {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
}

.crypto-modal-wallet-addr {
    flex: 1;
    min-width: 0;
    padding: 0.5rem;
    background: var(--bg-secondary, #1e293b);
    border: 1px solid var(--border, #334155);
    border-radius: 4px;
    font-size: 0.8rem;
    word-break: break-all;
    color: #f7931a;
    user-select: all;
}

.crypto-modal-copy-btn {
    padding: 0.5rem 0.75rem;
    background: #f7931a;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.crypto-modal-qr-wrap {
    margin-top: 1rem;
    text-align: center;
}

.crypto-modal-qr {
    display: inline-block;
    padding: 8px;
    background: #ffffff;
    border: 1px solid var(--border, #334155);
    border-radius: 8px;
}

.crypto-modal-qr img,
.crypto-modal-qr canvas {
    display: block;
}

.crypto-modal-qr-hint {
    margin: 0.5rem 0 0 0;
    font-size: 0.8rem;
    color: var(--text-secondary, #94a3b8);
}

.crypto-modal-tx {
    background: rgba(247, 147, 26, 0.1);
    border: 1px solid #f7931a;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.crypto-modal-hint {
    margin: 0.5rem 0 0 0;
    font-size: 0.8rem;
    color: var(--text-secondary, #94a3b8);
}

/* --- Mobile (768px and below): Crypto Payment Modal --- */
@media (max-width: 768px) {
    .crypto-modal {
        max-width: 95%;
        padding: 1.25rem;
    }

    .crypto-modal-title {
        font-size: 1.15rem;
    }

    .crypto-modal-info-row {
        flex-wrap: wrap;
    }
}

/* --- Smartphone (480px and below): Crypto Payment Modal --- */
@media (max-width: 480px) {
    .crypto-modal {
        padding: 1rem;
        max-height: 92vh;
    }

    .crypto-modal-title {
        font-size: 1.1rem;
    }

    .crypto-modal-header {
        margin-bottom: 1rem;
    }

    .crypto-modal-select,
    .crypto-modal-input {
        padding: 0.7rem;
        font-size: 0.95rem;
    }

    .crypto-modal-info-row {
        justify-content: space-between;
    }

    .crypto-modal-info-value {
        font-size: 0.95rem;
    }

    .crypto-modal-wallet-row {
        flex-direction: column;
    }

    .crypto-modal-copy-btn {
        width: 100%;
        padding: 0.6rem;
        margin-top: 0.5rem;
    }

    .crypto-modal-tx {
        padding: 0.85rem;
    }

    .crypto-modal-btn {
        padding: 0.85rem;
        font-size: 0.95rem;
    }
}
