* { margin: 0; padding: 0; box-sizing: border-box; } :root { --primary-color: #6366f1; --primary-hover: #4f46e5; --secondary-color: #8b5cf6; --background: #0f172a; --surface: #1e293b; --surface-light: #334155; --text-primary: #f1f5f9; --text-secondary: #cbd5e1; --text-muted: #94a3b8; --border: #334155; --success: #10b981; --error: #ef4444; --shadow: rgba(0, 0, 0, 0.3); --shadow-lg: rgba(0, 0, 0, 0.5); } body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif; background: linear-gradient(135deg, var(--background) 0%, #1a1f3a 100%); color: var(--text-primary); min-height: 100vh; padding: 0; line-height: 1.6; } /* Top Header Bar */ .top-header-bar { position: sticky; top: 0; z-index: 100; background: rgba(30, 41, 59, 0.95); backdrop-filter: blur(20px); border-bottom: 1px solid var(--border); box-shadow: 0 4px 24px var(--shadow); padding: 0.75rem 0; } .header-container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; display: flex; align-items: center; justify-content: space-between; gap: 2rem; } .header-left { display: flex; align-items: center; } .app-title { display: flex; align-items: center; gap: 0.75rem; font-size: 1.75rem; font-weight: 700; margin: 0; background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; letter-spacing: -0.02em; } .title-icon { font-size: 1.5rem; filter: drop-shadow(0 2px 4px rgba(99, 102, 241, 0.3)); } .title-text { background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; } .header-right { display: flex; align-items: center; flex: 1; justify-content: flex-end; max-width: 400px; gap: 0.75rem; } .archive-toggle-wrapper { display: flex; align-items: center; gap: 0.5rem; white-space: nowrap; } .toggle-label { font-size: 0.85rem; font-weight: 500; color: var(--text-secondary); transition: color 0.3s ease; user-select: none; } .archive-toggle-wrapper.active .toggle-label { color: var(--text-primary); font-weight: 600; } .archive-toggle-wrapper:not(.active) .toggle-label { color: var(--text-secondary); font-weight: 500; } .archive-toggle { position: relative; width: 50px; height: 26px; background: var(--surface-light); border: 1px solid var(--border); border-radius: 13px; cursor: pointer; transition: all 0.3s ease; padding: 0; outline: none; flex-shrink: 0; } .archive-toggle:hover { border-color: var(--secondary-color); box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1); } .archive-toggle.active { background: var(--secondary-color); border-color: var(--secondary-color); } .archive-toggle.active:hover { background: var(--primary-hover); border-color: var(--primary-hover); } .toggle-slider { position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; background: white; border-radius: 50%; transition: transform 0.3s ease; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); } .archive-toggle.active .toggle-slider { transform: translateX(24px); } .container { max-width: 1200px; margin: 0 auto; padding: 1.5rem 1rem; } /* Top Section - Modern Unified Design */ .top-section { margin-bottom: 1.5rem; animation: fadeIn 0.6s ease-out; } .add-link-section { animation: fadeIn 0.8s ease-out; } .section-subtitle { color: var(--text-secondary); font-size: 0.95rem; font-weight: 400; margin: 0 0 1.5rem 0; opacity: 0.8; } /* Add Link Section */ .link-form { margin: 0; } .input-wrapper { display: flex; align-items: center; gap: 0.5rem; background: var(--surface); padding: 0.375rem 0.625rem; border-radius: 10px; border: 1px solid var(--border); box-shadow: 0 2px 8px var(--shadow); transition: all 0.3s ease; } .input-wrapper:focus-within { border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1), 0 4px 12px var(--shadow); } .input-icon { color: var(--text-muted); flex-shrink: 0; transition: color 0.3s ease; } .input-wrapper:focus-within .input-icon { color: var(--primary-color); } #linkInput { flex: 1; background: transparent; border: none; color: var(--text-primary); font-size: 0.95rem; padding: 0.5rem 0; outline: none; font-weight: 400; } #linkInput::placeholder { color: var(--text-muted); font-weight: 400; } .btn-add { background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)); color: white; border: none; padding: 0.5rem; border-radius: 8px; font-size: 0; font-weight: 600; cursor: pointer; transition: all 0.3s ease; white-space: nowrap; box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3); display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; position: relative; flex-shrink: 0; } .btn-add .btn-text { display: none; } .btn-add::after { content: '+'; font-size: 1.5rem; font-weight: 300; line-height: 1; } .btn-add::before { content: attr(data-tooltip); position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%) translateY(-0.5rem); background: var(--surface); color: var(--text-primary); padding: 0.375rem 0.625rem; border-radius: 6px; font-size: 0.75rem; font-weight: 500; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 0.2s ease, transform 0.2s ease; border: 1px solid var(--border); box-shadow: 0 4px 12px var(--shadow); z-index: 1000; } .btn-add:hover::before, .btn-add:focus::before { opacity: 1; transform: translateX(-50%) translateY(-0.25rem); } /* Touch support for mobile */ @media (hover: none) and (pointer: coarse) { .btn-add:active::before { opacity: 1; transform: translateX(-50%) translateY(-0.25rem); } } .btn-add .btn-loader { width: 16px; height: 16px; } .btn-add:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4); } .btn-add:active:not(:disabled) { transform: translateY(0); } .btn-add:disabled { opacity: 0.6; cursor: not-allowed; } .btn-loader { display: none; align-items: center; justify-content: center; } .btn-loader svg { animation: spin 1s linear infinite; } @keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } /* Search in Header */ .search-wrapper { display: flex; align-items: center; gap: 0.75rem; background: rgba(255, 255, 255, 0.05); padding: 0.625rem 1rem; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.1); transition: all 0.3s ease; width: 100%; min-width: 250px; } .search-wrapper:focus-within { border-color: var(--primary-color); background: rgba(99, 102, 241, 0.1); box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1); } .search-icon { color: var(--text-muted); flex-shrink: 0; transition: color 0.3s ease; } .search-wrapper:focus-within .search-icon { color: var(--primary-color); } #searchInput { width: 100%; background: transparent; border: none; color: var(--text-primary); font-size: 0.95rem; padding: 0; outline: none; font-weight: 400; } #searchInput::placeholder { color: var(--text-muted); font-weight: 400; } /* Toast Container */ .toast-container { position: fixed; top: 1rem; right: 1rem; z-index: 1000; display: flex; flex-direction: column; gap: 0.75rem; pointer-events: none; align-items: flex-end; } .toast { padding: 0.875rem 1.25rem; border-radius: 12px; font-size: 0.9rem; font-weight: 500; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4); backdrop-filter: blur(10px); opacity: 0; transform: translateX(400px); transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); pointer-events: auto; word-wrap: break-word; white-space: nowrap; width: fit-content; max-width: calc(100vw - 2rem); } .toast.show { opacity: 1; transform: translateX(0); } .toast-success { background: rgba(16, 185, 129, 0.95); border: 1px solid var(--success); color: white; } .toast-error { background: rgba(239, 68, 68, 0.95); border: 1px solid var(--error); color: white; } .links-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.5rem; animation: fadeIn 1s ease-out; } .empty-state { grid-column: 1 / -1; text-align: center; padding: 4rem 2rem; color: var(--text-muted); font-size: 1.1rem; } .link-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; transition: all 0.3s ease; box-shadow: 0 4px 6px var(--shadow); display: flex; flex-direction: column; animation: fadeInUp 0.5s ease-out; } .link-card:hover { transform: translateY(-4px); box-shadow: 0 8px 16px var(--shadow-lg); border-color: var(--primary-color); } .link-image { width: 100%; height: 200px; object-fit: cover; background: var(--surface-light); display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: 0.9rem; } .link-image img { width: 100%; height: 100%; object-fit: cover; } .link-content { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; } .link-title { font-size: 1.25rem; font-weight: 600; margin-bottom: 0.75rem; color: var(--text-primary); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; } .link-description { color: var(--text-secondary); font-size: 0.95rem; margin-bottom: 1rem; flex: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.5; } .link-url { color: var(--primary-color); font-size: 0.85rem; text-decoration: none; margin-bottom: 1rem; word-break: break-all; transition: color 0.3s ease; } .link-url:hover { color: var(--primary-hover); text-decoration: underline; } .link-footer { display: flex; justify-content: space-between; align-items: center; padding-top: 1rem; border-top: 1px solid var(--border); } .link-actions { display: flex; gap: 0.5rem; align-items: center; } .link-date { color: var(--text-muted); font-size: 0.85rem; } .archive-btn, .delete-btn { background: transparent; color: var(--text-muted); border: 1px solid var(--border); padding: 0.375rem; border-radius: 6px; font-size: 0; cursor: pointer; transition: all 0.3s ease; white-space: nowrap; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; position: relative; flex-shrink: 0; } .archive-btn svg, .delete-btn svg { width: 16px; height: 16px; stroke-width: 2; } .archive-btn { color: var(--secondary-color); border-color: rgba(139, 92, 246, 0.3); } .archive-btn:hover { background: rgba(139, 92, 246, 0.2); border-color: var(--secondary-color); color: var(--secondary-color); } .delete-btn { color: var(--error); border-color: rgba(239, 68, 68, 0.3); } .delete-btn:hover { background: rgba(239, 68, 68, 0.2); border-color: var(--error); color: var(--error); } /* Tooltip for icon buttons */ .archive-btn::before, .delete-btn::before { content: attr(data-tooltip); position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%) translateY(-0.5rem); background: var(--surface); color: var(--text-primary); padding: 0.375rem 0.625rem; border-radius: 6px; font-size: 0.75rem; font-weight: 500; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 0.2s ease, transform 0.2s ease; border: 1px solid var(--border); box-shadow: 0 4px 12px var(--shadow); z-index: 1000; } .archive-btn:hover::before, .delete-btn:hover::before, .archive-btn:focus::before, .delete-btn:focus::before { opacity: 1; transform: translateX(-50%) translateY(-0.25rem); } /* Touch support for mobile - show tooltip on tap */ @media (hover: none) and (pointer: coarse) { .archive-btn:active::before, .delete-btn:active::before { opacity: 1; transform: translateX(-50%) translateY(-0.25rem); } } @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } } @keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } } @keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } } @media (max-width: 768px) { .toast-container { top: 0.75rem; right: 0.75rem; left: 0.75rem; align-items: flex-end; } .toast { white-space: normal; max-width: 100%; } .top-header-bar { padding: 0.75rem 0; } .header-container { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; gap: 0.75rem; align-items: center; } .header-left { grid-column: 1; grid-row: 1; justify-content: flex-start; } .app-title { font-size: 1.5rem; } .title-icon { font-size: 1.25rem; } .header-right { display: contents; } .archive-toggle-wrapper { grid-column: 2; grid-row: 1; flex-shrink: 0; } .search-wrapper { grid-column: 1 / -1; grid-row: 2; width: 100%; } .link-actions { flex-wrap: wrap; gap: 0.5rem; } .archive-btn, .delete-btn { width: 36px; height: 36px; } .input-wrapper { flex-wrap: nowrap; } .btn-add { width: 36px; height: 36px; padding: 0.5rem; flex-shrink: 0; } .links-container { grid-template-columns: 1fr; } } /* Scroll to Top Button */ .scroll-to-top-btn { position: fixed; bottom: 2rem; right: 2rem; width: 50px; height: 50px; border-radius: 50%; background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)); color: white; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4); transition: all 0.3s ease; opacity: 0; visibility: hidden; transform: translateY(20px); z-index: 999; } .scroll-to-top-btn.show { opacity: 1; visibility: visible; transform: translateY(0); } .scroll-to-top-btn:hover { transform: translateY(-3px); box-shadow: 0 6px 16px rgba(99, 102, 241, 0.5); } .scroll-to-top-btn:active { transform: translateY(-1px); } .scroll-to-top-btn svg { width: 24px; height: 24px; } @media (max-width: 400px) { .header-right { flex-direction: column; gap: 0.75rem; } .search-wrapper { min-width: 100%; } .archive-toggle-wrapper { width: 100%; justify-content: flex-start; } .scroll-to-top-btn { bottom: 1.5rem; right: 1.5rem; width: 45px; height: 45px; } }