/* ===== Reset & Base ===== */ *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; } :root { /* Spacing scale (4px base) */ --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 20px; --space-6: 24px; --space-7: 32px; --space-8: 40px; --space-9: 48px; --space-10: 64px; /* Colors */ --bg-primary: #14141c; --bg-secondary: #1b1b2f; --bg-tertiary: #252540; --accent-green: #1bb76e; --accent-green-hover: #15995d; --accent-green-glow: rgba(27, 183, 110, 0.25); --accent-red: #e74c3c; --accent-red-hover: #c0392b; --text-primary: #ffffff; --text-secondary: #a0a0b8; --text-muted: #6c6c85; --border-color: #2a2a45; --border-subtle: rgba(42, 42, 69, 0.6); /* Shadows */ --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2); --shadow: 0 2px 8px rgba(0, 0, 0, 0.25); --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4); --shadow-glow: 0 0 20px var(--accent-green-glow); /* Radii */ --radius: 8px; --radius-lg: 12px; --radius-xl: 16px; --radius-full: 9999px; /* Transitions */ --transition-fast: 150ms ease; --transition: 200ms ease; --transition-slow: 300ms ease; /* Typography */ --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; --text-xs: 11px; --text-sm: 13px; --text-base: 14px; --text-md: 15px; --text-lg: 16px; --text-xl: 18px; --text-2xl: 20px; --text-3xl: 24px; } html, body { overflow-x: hidden; } body { font-family: var(--font-family); background: var(--bg-primary); color: var(--text-primary); min-height: 100vh; line-height: 1.6; font-size: var(--text-base); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } body.modal-open { overflow: hidden; } /* Hide scrollbar tracks but keep scrollability */ * { scrollbar-width: none; /* Firefox */ -ms-overflow-style: none; /* IE/Edge */ } *::-webkit-scrollbar { display: none; /* WebKit */ } /* ===== Focus Visible ===== */ :focus-visible { outline: 2px solid var(--accent-green); outline-offset: 2px; border-radius: var(--radius); } :focus:not(:focus-visible) { outline: none; } /* ===== Header ===== */ .header { background: var(--bg-secondary); border-bottom: 1px solid var(--border-subtle); position: sticky; top: 0; z-index: 100; box-shadow: var(--shadow-sm); } .header-inner { max-width: 1400px; margin: 0 auto; padding: var(--space-3) var(--space-6); display: flex; align-items: center; gap: var(--space-6); } .logo { display: flex; align-items: center; gap: var(--space-2); cursor: pointer; flex-shrink: 0; transition: opacity var(--transition-fast); } .logo:hover { opacity: 0.85; } .logo-img { width: 28px; height: 28px; border-radius: 6px; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3)); } .logo-text { font-size: var(--text-xl); font-weight: 700; color: var(--accent-green); letter-spacing: -0.02em; } .search-bar { flex: 1; display: flex; max-width: 500px; } .search-bar input { flex: 1; padding: var(--space-2) var(--space-4); background: var(--bg-tertiary); border: 1px solid var(--border-color); border-right: none; border-radius: var(--radius) 0 0 var(--radius); color: var(--text-primary); font-size: var(--text-base); font-family: var(--font-family); outline: none; transition: border-color var(--transition), box-shadow var(--transition); } .search-bar input:focus { border-color: var(--accent-green); box-shadow: 0 0 0 3px var(--accent-green-glow); } .search-bar input::placeholder { color: var(--text-muted); } .search-bar button { padding: var(--space-2) var(--space-4); background: var(--bg-tertiary); border: 1px solid var(--border-color); border-radius: 0 var(--radius) var(--radius) 0; cursor: pointer; font-size: var(--text-base); transition: background var(--transition-fast); } .search-bar button:hover { background: var(--bg-secondary); } .btn-new-post { padding: var(--space-2) var(--space-5); background: linear-gradient(135deg, var(--accent-green) 0%, #17a35e 100%); color: white; border: none; border-radius: var(--radius); font-weight: 600; font-size: var(--text-base); font-family: var(--font-family); cursor: pointer; transition: all var(--transition); flex-shrink: 0; box-shadow: var(--shadow-sm); } .btn-new-post:hover { background: linear-gradient(135deg, var(--accent-green-hover) 0%, #128a50 100%); box-shadow: var(--shadow-glow); transform: translateY(-1px); } .btn-new-post:active { transform: translateY(0); box-shadow: var(--shadow-sm); } /* ===== Filter Bar ===== */ .filter-bar { max-width: 1400px; margin: 0 auto; padding: var(--space-4) var(--space-6); display: flex; align-items: center; justify-content: space-between; } .filter-tabs { display: flex; gap: var(--space-2); } .filter-tab { padding: var(--space-2) var(--space-4); background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: var(--radius); color: var(--text-secondary); cursor: pointer; font-size: var(--text-sm); font-weight: 500; font-family: var(--font-family); transition: all var(--transition-fast); } .filter-tab:hover { border-color: var(--accent-green); color: var(--text-primary); background: var(--bg-tertiary); } .filter-tab.active { background: var(--accent-green); border-color: var(--accent-green); color: white; box-shadow: var(--shadow-glow); } .post-count { color: var(--text-muted); font-size: var(--text-sm); } /* ===== Gallery Grid ===== */ .gallery-container { max-width: 1400px; margin: 0 auto; padding: 0 var(--space-6) var(--space-9); } .gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--space-4); } /* ===== Post Card ===== */ .post-card { background: var(--bg-secondary); border-radius: var(--radius-lg); overflow: hidden; cursor: pointer; transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition); border: 1px solid var(--border-subtle); animation: cardEntrance 300ms ease both; } @keyframes cardEntrance { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } } .post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--border-color); } .post-card.highlight-new { animation: highlightPulse 2s ease; } @keyframes highlightPulse { 0% { box-shadow: 0 0 0 3px var(--accent-green), var(--shadow-lg); border-color: var(--accent-green); } 50% { box-shadow: 0 0 0 6px var(--accent-green-glow), var(--shadow-lg); border-color: var(--accent-green); } 100% { box-shadow: var(--shadow); border-color: var(--border-subtle); } } .post-card-image { width: 100%; max-width: 100%; height: auto; aspect-ratio: 4/3; object-fit: cover; display: block; background: var(--bg-tertiary); } .post-card-body { padding: var(--space-3) var(--space-4); } .post-card-title { font-size: var(--text-base); font-weight: 600; margin-bottom: var(--space-2); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; letter-spacing: -0.01em; overflow-wrap: break-word; word-break: break-word; } .post-card-stats { display: flex; align-items: center; gap: var(--space-3); font-size: var(--text-xs); color: var(--text-secondary); } .post-card-stats .upvotes { color: var(--accent-green); font-weight: 600; } .post-card-tags { display: flex; flex-wrap: wrap; gap: var(--space-1); margin-top: var(--space-2); } .tag-pill { padding: 2px var(--space-2); background: var(--bg-tertiary); border-radius: var(--radius-full); font-size: var(--text-xs); color: var(--text-muted); border: 1px solid var(--border-subtle); } /* ===== Loading ===== */ .loading { text-align: center; padding: var(--space-9); color: var(--text-muted); } .spinner { width: 40px; height: 40px; border: 3px solid var(--border-color); border-top-color: var(--accent-green); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 0 auto var(--space-4); } .spinner-sm { width: 28px; height: 28px; border-width: 2px; margin: 0 auto var(--space-3); } @keyframes spin { to { transform: rotate(360deg); } } /* ===== Modal ===== */ .modal-overlay { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.8); backdrop-filter: blur(4px); z-index: 1000; align-items: center; justify-content: center; padding: var(--space-6); } .modal-overlay.active { display: flex; } .modal { background: var(--bg-secondary); border-radius: var(--radius-xl); width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto; overflow-x: hidden; border: 1px solid var(--border-color); box-shadow: var(--shadow-lg); animation: modalIn 200ms ease; scrollbar-width: none; } .modal::-webkit-scrollbar { display: none; } @keyframes modalIn { from { opacity: 0; transform: scale(0.95) translateY(10px); } to { opacity: 1; transform: scale(1) translateY(0); } } .modal-large { max-width: 960px; } .modal-header { display: flex; align-items: center; justify-content: space-between; padding: var(--space-4) var(--space-6); border-bottom: 1px solid var(--border-subtle); } .modal-header h2 { font-size: var(--text-xl); font-weight: 700; letter-spacing: -0.02em; } .modal-close { background: none; border: none; color: var(--text-secondary); font-size: var(--text-lg); cursor: pointer; padding: var(--space-1) var(--space-2); border-radius: var(--radius); transition: all var(--transition-fast); line-height: 1; } .modal-close:hover { background: var(--bg-tertiary); color: var(--text-primary); } .modal-body { padding: var(--space-6); } /* ===== Upload Zone ===== */ .upload-zone { border: 2px dashed var(--border-color); border-radius: var(--radius-lg); padding: var(--space-9) var(--space-6); text-align: center; cursor: pointer; transition: border-color var(--transition), background var(--transition), box-shadow var(--transition); margin-bottom: var(--space-6); position: relative; } .upload-zone:hover, .upload-zone.dragover { border-color: var(--accent-green); background: rgba(27, 183, 110, 0.04); box-shadow: inset 0 0 30px rgba(27, 183, 110, 0.05); } .upload-icon { font-size: 48px; margin-bottom: var(--space-4); } .upload-main-text { color: var(--text-primary); font-size: var(--text-md); font-weight: 500; margin-bottom: var(--space-1); } .upload-hint { font-size: var(--text-sm); color: var(--text-muted); margin-bottom: var(--space-2); } .upload-paste-hint { font-size: var(--text-sm); color: var(--text-secondary); margin-bottom: var(--space-2); } .upload-paste-hint kbd { display: inline-block; padding: 1px 6px; background: var(--bg-tertiary); border: 1px solid var(--border-color); border-radius: 4px; font-size: var(--text-xs); font-family: var(--font-family); color: var(--text-primary); } .upload-formats { font-size: var(--text-xs); color: var(--text-muted); margin-top: var(--space-2); } .upload-preview { position: relative; display: inline-block; } .upload-preview img { max-width: 100%; max-height: 300px; border-radius: var(--radius); box-shadow: var(--shadow); } .btn-remove { position: absolute; top: var(--space-2); right: var(--space-2); background: rgba(0, 0, 0, 0.75); color: white; border: none; border-radius: 50%; width: 32px; height: 32px; cursor: pointer; font-size: var(--text-base); display: flex; align-items: center; justify-content: center; transition: background var(--transition-fast); } .btn-remove:hover { background: var(--accent-red); } .upload-processing { text-align: center; color: var(--text-secondary); font-size: var(--text-sm); } /* ===== Form ===== */ .form-group { margin-bottom: var(--space-5); } .form-group label { display: block; margin-bottom: var(--space-1); font-size: var(--text-sm); font-weight: 500; color: var(--text-secondary); } .form-group input { width: 100%; padding: var(--space-2) var(--space-3); background: var(--bg-tertiary); border: 1px solid var(--border-color); border-radius: var(--radius); color: var(--text-primary); font-size: var(--text-base); font-family: var(--font-family); outline: none; transition: border-color var(--transition), box-shadow var(--transition); } .form-group input:focus { border-color: var(--accent-green); box-shadow: 0 0 0 3px var(--accent-green-glow); } .form-group input::placeholder { color: var(--text-muted); } .btn-submit { width: 100%; padding: var(--space-3); background: linear-gradient(135deg, var(--accent-green) 0%, #17a35e 100%); color: white; border: none; border-radius: var(--radius); font-size: var(--text-md); font-weight: 600; font-family: var(--font-family); cursor: pointer; transition: all var(--transition); box-shadow: var(--shadow-sm); } .btn-submit:hover { background: linear-gradient(135deg, var(--accent-green-hover) 0%, #128a50 100%); box-shadow: var(--shadow-glow); transform: translateY(-1px); } .btn-submit:active { transform: translateY(0); } .btn-submit:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; } .error-message { background: rgba(231, 76, 60, 0.1); border: 1px solid var(--accent-red); color: var(--accent-red); padding: var(--space-2) var(--space-3); border-radius: var(--radius); margin-bottom: var(--space-4); font-size: var(--text-sm); } /* ===== Post Detail ===== */ .post-detail-grid { display: grid; grid-template-columns: 1fr 280px; gap: var(--space-6); margin-bottom: var(--space-6); } .post-image-container img { width: 100%; max-width: 100%; height: auto; display: block; border-radius: var(--radius); cursor: zoom-in; box-shadow: var(--shadow); } .vote-box { display: flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-4); } .vote-btn { padding: var(--space-2) var(--space-4); background: var(--bg-tertiary); border: 1px solid var(--border-color); border-radius: var(--radius); color: var(--text-secondary); cursor: pointer; font-size: var(--text-lg); font-weight: 700; transition: all var(--transition-fast); } .vote-btn:hover { border-color: var(--accent-green); color: var(--accent-green); background: rgba(27, 183, 110, 0.08); } .vote-btn.active-up { background: var(--accent-green); border-color: var(--accent-green); color: white; } .vote-btn.active-down { background: var(--accent-red); border-color: var(--accent-red); color: white; } .vote-count { font-size: var(--text-2xl); font-weight: 700; color: var(--accent-green); } .post-meta { display: flex; gap: var(--space-4); margin-bottom: var(--space-4); font-size: var(--text-sm); color: var(--text-secondary); } .post-tags { display: flex; flex-wrap: wrap; gap: var(--space-1); margin-bottom: var(--space-4); } .post-tags .tag-pill { padding: var(--space-1) var(--space-2); font-size: var(--text-sm); } .post-author { font-size: var(--text-sm); color: var(--text-secondary); margin-bottom: var(--space-1); } .post-author strong { color: var(--accent-green); } .post-date { font-size: var(--text-xs); color: var(--text-muted); } /* ===== Comments ===== */ .comments-section { border-top: 1px solid var(--border-subtle); padding-top: var(--space-6); } .comments-section h3 { font-size: var(--text-lg); font-weight: 600; margin-bottom: var(--space-4); } .comment-form { display: flex; gap: var(--space-3); margin-bottom: var(--space-6); } .comment-form input { flex: 1; padding: var(--space-2) var(--space-3); background: var(--bg-tertiary); border: 1px solid var(--border-color); border-radius: var(--radius); color: var(--text-primary); font-size: var(--text-base); font-family: var(--font-family); outline: none; transition: border-color var(--transition), box-shadow var(--transition); } .comment-form input:focus { border-color: var(--accent-green); box-shadow: 0 0 0 3px var(--accent-green-glow); } .btn-comment { padding: var(--space-2) var(--space-5); background: var(--accent-green); color: white; border: none; border-radius: var(--radius); font-weight: 600; font-size: var(--text-base); font-family: var(--font-family); cursor: pointer; transition: all var(--transition-fast); } .btn-comment:hover { background: var(--accent-green-hover); box-shadow: var(--shadow-glow); } .comment-item { padding: var(--space-3) 0; border-bottom: 1px solid var(--border-subtle); } .comment-item:last-child { border-bottom: none; } .comment-item.reply { margin-left: var(--space-8); border-left: 2px solid var(--border-color); padding-left: var(--space-4); } .comment-author { font-size: var(--text-sm); font-weight: 600; color: var(--accent-green); margin-bottom: var(--space-1); } .comment-text { font-size: var(--text-base); color: var(--text-secondary); line-height: 1.5; overflow-wrap: break-word; word-break: break-word; } .comment-time { font-size: var(--text-xs); color: var(--text-muted); margin-top: var(--space-1); } /* ===== Fullscreen ===== */ .fullscreen-overlay { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.95); z-index: 2000; align-items: center; justify-content: center; cursor: zoom-out; } .fullscreen-overlay.active { display: flex; } .fullscreen-overlay img { max-width: 90%; max-height: 90%; object-fit: contain; border-radius: var(--radius); } /* ===== Floating Action Button ===== */ .fab { position: fixed; bottom: var(--space-6); right: var(--space-6); width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, var(--accent-green) 0%, #17a35e 100%); color: white; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-lg), var(--shadow-glow); transition: all var(--transition); z-index: 500; } .fab:hover { transform: scale(1.1); box-shadow: var(--shadow-lg), 0 0 30px var(--accent-green-glow); } .fab:active { transform: scale(0.95); } /* ===== Toast ===== */ .toast-container { position: fixed; bottom: var(--space-6); right: var(--space-6); z-index: 3000; display: flex; flex-direction: column; gap: var(--space-2); } .toast { padding: var(--space-3) var(--space-5); background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: var(--radius); color: var(--text-primary); font-size: var(--text-base); font-family: var(--font-family); box-shadow: var(--shadow-lg); animation: slideIn 250ms ease; } .toast.success { border-color: var(--accent-green); color: var(--accent-green); } .toast.error { border-color: var(--accent-red); color: var(--accent-red); } @keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } } /* ===== Full-Page Drag Overlay ===== */ .drag-overlay { display: none; position: fixed; inset: 0; background: rgba(20, 20, 28, 0.92); backdrop-filter: blur(6px); z-index: 5000; align-items: center; justify-content: center; pointer-events: none; } .drag-overlay.active { display: flex; } .drag-overlay-inner { text-align: center; padding: var(--space-10) var(--space-9); border: 3px dashed var(--accent-green); border-radius: var(--radius-xl); background: rgba(27, 183, 110, 0.06); } .drag-overlay-icon { font-size: 56px; margin-bottom: var(--space-4); } .drag-overlay-text { font-size: var(--text-2xl); font-weight: 700; color: var(--accent-green); letter-spacing: -0.02em; } /* ===== Responsive ===== */ @media (max-width: 1024px) { .post-detail-grid { grid-template-columns: 1fr; } .post-sidebar { order: -1; } } @media (max-width: 768px) { .header-inner { flex-wrap: wrap; gap: var(--space-3); padding: var(--space-3) var(--space-4); } .search-bar { order: 3; max-width: 100%; width: 100%; } .filter-bar { padding: var(--space-3) var(--space-4); } .filter-tabs { overflow-x: auto; gap: var(--space-1); -webkit-overflow-scrolling: touch; } .filter-tab { padding: var(--space-1) var(--space-3); font-size: var(--text-xs); white-space: nowrap; } .gallery-container { padding: 0 var(--space-4) var(--space-8); } .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--space-3); } .modal { max-width: 100%; margin: var(--space-4); } .modal-large { max-width: 100%; } .fab { bottom: var(--space-4); right: var(--space-4); width: 48px; height: 48px; } } @media (max-width: 375px) { .gallery-grid { grid-template-columns: 1fr; } .logo-text { display: none; } .btn-new-post { padding: var(--space-2) var(--space-3); font-size: var(--text-sm); } }