:root { --bg-primary: #ffffff; --bg-secondary: #f5f7fa; --text-primary: #333333; --text-secondary: #666666; --border-color: #e0e0e0; --accent-color: #4f46e5; --accent-hover: #4338ca; --line-numbers-bg: #f0f0f0; --line-numbers-text: #888888; --editor-bg: #f8f9fc; --toast-bg: rgba(0, 0, 0, 0.8); --toast-text: #ffffff; --shadow-color: rgba(0, 0, 0, 0.1); } [data-theme="dark"] { --bg-primary: #1a1a1a; --bg-secondary: #252525; --text-primary: #e0e0e0; --text-secondary: #a0a0a0; --border-color: #3a3a3a; --accent-color: #6366f1; --accent-hover: #818cf8; --line-numbers-bg: #2a2a2a; --line-numbers-text: #777777; --editor-bg: #2d2d2d; --toast-bg: rgba(255, 255, 255, 0.8); --toast-text: #1a1a1a; --shadow-color: rgba(0, 0, 0, 0.3); } * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: 'Inter', sans-serif; background-color: var(--bg-primary); color: var(--text-primary); transition: background-color 0.3s, color 0.3s; line-height: 1.6; } .container { max-width: 1200px; margin: 0 auto; padding: 0 20px; } header { background-color: var(--bg-secondary); border-bottom: 1px solid var(--border-color); padding: 15px 0; box-shadow: 0 1px 3px var(--shadow-color); } .header-content { display: flex; justify-content: space-between; align-items: center; } .logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.5rem; color: var(--accent-color); } .logo i { font-size: 1.75rem; } .theme-toggle { background: none; border: none; cursor: pointer; color: var(--text-secondary); font-size: 1.25rem; padding: 8px; border-radius: 50%; transition: background-color 0.2s; } .theme-toggle:hover { background-color: var(--border-color); color: var(--text-primary); } main { padding: 30px 0; } .editor-container { display: flex; flex-direction: column; gap: 20px; } .editor-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; } .editor-header h2 { font-weight: 600; color: var(--text-primary); } .editor-wrapper { display: flex; border: 1px solid var(--border-color); border-radius: 8px; overflow: hidden; box-shadow: 0 2px 5px var(--shadow-color); position: relative; height: 500px; } .line-numbers { background-color: var(--line-numbers-bg); color: var(--line-numbers-text); padding: 15px 10px; text-align: right; user-select: none; overflow-y: hidden; min-width: 50px; font-family: 'Fira Code', monospace; font-size: 0.9rem; border-right: 1px solid var(--border-color); } .editor-area { flex-grow: 1; position: relative; display: flex; } #editor { width: 100%; height: 100%; padding: 15px; background-color: var(--editor-bg); color: var(--text-primary); border: none; resize: none; font-family: 'Fira Code', monospace; font-size: 0.9rem; line-height: 1.5; tab-size: 4; outline: none; } .viewer-area { width: 100%; height: 100%; padding: 15px; background-color: var(--editor-bg); color: var(--text-primary); overflow: auto; font-family: 'Fira Code', monospace; font-size: 0.9rem; line-height: 1.5; white-space: pre; tab-size: 4; } .code-viewer { white-space: pre; tab-size: 4; } .code-viewer pre, .code-viewer code { margin: 0; padding: 0; white-space: pre; overflow-x: auto; width: 100%; font-family: 'Fira Code', monospace; } /* Ensure highlight.js doesn't add extra space */ .hljs { padding: 0 !important; background: transparent !important; } .action-buttons { display: flex; gap: 10px; margin-top: 20px; } .btn { padding: 10px 20px; border: none; border-radius: 6px; cursor: pointer; font-weight: 500; font-size: 0.95rem; transition: all 0.2s; display: flex; align-items: center; gap: 8px; } .btn-primary { background-color: var(--accent-color); color: white; } .btn-primary:hover { background-color: var(--accent-hover); } .btn-secondary { background-color: var(--bg-secondary); color: var(--text-primary); border: 1px solid var(--border-color); } .btn-secondary:hover { background-color: var(--border-color); } .toast { position: fixed; bottom: 20px; right: 20px; padding: 12px 20px; background-color: var(--toast-bg); color: var(--toast-text); border-radius: 6px; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2); transform: translateY(100px); opacity: 0; transition: all 0.3s; z-index: 1000; display: flex; align-items: center; gap: 10px; } .toast.show { transform: translateY(0); opacity: 1; } .loading-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.5); display: flex; justify-content: center; align-items: center; z-index: 100; display: none; } .spinner { width: 50px; height: 50px; border: 5px solid rgba(255, 255, 255, 0.3); border-radius: 50%; border-top-color: white; animation: spin 1s linear infinite; } @keyframes spin { 100% { transform: rotate(360deg); } } .url-container { display: flex; flex-direction: row; /* Ensure horizontal layout */ align-items: stretch; /* Make items same height */ margin-top: 20px; width: 100%; } .url-display { flex: 1; /* Take up available space */ padding: 12px 15px; background-color: var(--bg-secondary); border: 1px solid var(--border-color); border-right: none; /* Remove right border to connect with button */ border-radius: 6px 0 0 6px; color: var(--text-primary); font-family: 'Fira Code', monospace; font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .copy-btn { flex: 0 0 auto; /* Don't grow or shrink */ padding: 12px 15px; background-color: var(--accent-color); color: white; border: none; border-radius: 0 6px 6px 0; cursor: pointer; transition: background-color 0.2s; display: flex; align-items: center; justify-content: center; } .copy-btn:hover { background-color: var(--accent-hover); } footer { background-color: var(--bg-secondary); border-top: 1px solid var(--border-color); padding: 20px 0; text-align: center; color: var(--text-secondary); font-size: 0.9rem; margin-top: 30px; } /* Responsive adjustments */ @media (max-width: 768px) { .editor-wrapper { height: 400px; } .action-buttons { flex-direction: column; } .btn { width: 100%; justify-content: center; } } /* Custom styling for highlight.js themes */ [data-theme="light"] .hljs { background: var(--editor-bg); color: var(--text-primary); } [data-theme="dark"] .hljs { background: var(--editor-bg); color: var(--text-primary); } /* Custom scrollbar */ ::-webkit-scrollbar { width: 10px; height: 10px; } ::-webkit-scrollbar-track { background: var(--bg-secondary); } ::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 5px; } ::-webkit-scrollbar-thumb:hover { background: var(--text-secondary); }