:root { --bg: #f8f9fa; --card: #fff; --text: #333; --heading: #2c3e50; --heading-secondary: #34495e; --accent: #3498db; --accent-hover: #2980b9; --success: #27ae60; --success-hover: #229954; --error: #e74c3c; --muted: #6c757d; --muted-hover: #5a6268; --border: #ddd; --code-bg: #f4f4f4; --success-bg: #d4edda; --success-text: #155724; --error-bg: #f8d7da; --error-text: #721c24; --hover-bg: #e3f2fd; --shadow: 0 2px 10px rgba(0, 0, 0, 0.1); } html.dark { --bg: #0f172a; --card: #1e293b; --text: #f1f5f9; --heading: #3b82f6; --heading-secondary: #94a3b8; --accent: #3b82f6; --accent-hover: #2563eb; --success: #22c55e; --success-hover: #16a34a; --error: #ef4444; --muted: #64748b; --muted-hover: #475569; --border: #334155; --code-bg: #1e293b; --success-bg: #065f46; --success-text: #d1fae5; --error-bg: #7f1d1d; --error-text: #fecaca; --hover-bg: #1e40af; --shadow: 0 2px 10px rgba(0, 0, 0, 0.3); } /* Reset and base styles */ * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; line-height: 1.6; color: var(--text); background-color: var(--bg); padding: 20px; max-width: 1200px; margin: 0 auto; transition: background-color 0.3s ease, color 0.3s ease; } /* Main heading */ h1 { color: var(--heading); margin-bottom: -10px; padding-bottom: 3px; border-bottom: 3px solid var(--accent); font-size: 2.2em; } h2 { color: var(--heading-secondary); margin: 30px 0 20px 0; font-size: 1.5em; } h3 { color: var(--heading-secondary); margin: 25px 0 15px 0; font-size: 1.3em; } /* Links and buttons */ a { color: var(--accent); text-decoration: none; padding: 8px 16px; border-radius: 5px; transition: background-color 0.3s ease; } a:hover { background-color: var(--hover-bg); text-decoration: none; } /* Primary action link (Submit New Problem) */ a[href="/problem/new"] { background-color: var(--accent); color: white; font-weight: 600; margin-bottom: 30px; display: inline-block; padding: 12px 24px; border-radius: 8px; } a[href="/problem/new"]:hover { background-color: var(--accent-hover); } /* Problem list */ ul { list-style: none; background: var(--card); border-radius: 8px; box-shadow: var(--shadow); padding: 25px; margin: 20px 0; transition: background-color 0.3s ease; } li { padding: 15px 0; border-bottom: 1px solid var(--border); } li:last-child { border-bottom: none; } li a { display: block; padding: 12px 20px; margin: -12px -20px; border-radius: 6px; font-size: 1.1em; } li a:hover { background-color: var(--hover-bg); transform: translateX(5px); transition: all 0.2s ease; } /* Problem page specific styles */ .problem-header { display: flex; align-items: center; margin-bottom: 30px; gap: 20px; } .back-btn { background-color: var(--muted); color: white; border: none; padding: 10px 20px; border-radius: 6px; cursor: pointer; font-size: 14px; font-weight: 500; transition: background-color 0.3s ease; } .back-btn:hover { background-color: var(--muted-hover); } .problem-desc { background: var(--card); padding: 30px; border-radius: 8px; box-shadow: var(--shadow); margin-bottom: 30px; font-size: 1.1em; line-height: 1.7; transition: background-color 0.3s ease; } /* Editor section */ .editor-section { background: var(--card); padding: 30px; border-radius: 8px; box-shadow: var(--shadow); margin-bottom: 30px; transition: background-color 0.3s ease; } #editor { border: 2px solid var(--border); border-radius: 8px; margin: 20px 0; height: 400px; overflow: hidden; } .editor-actions { margin-top: 20px; text-align: right; } form button[type="submit"] { background-color: var(--success); color: white; border: none; padding: 12px 30px; border-radius: 8px; cursor: pointer; font-size: 16px; font-weight: 600; transition: background-color 0.3s ease; } form button[type="submit"]:hover { background-color: var(--success-hover); } /* Results section */ b { color: var(--heading); display: inline-block; margin: 10px 0 5px 0; } pre { background-color: var(--code-bg); padding: 20px; border-radius: 6px; border-left: 4px solid var(--accent); margin: 10px 0 20px 0; overflow-x: auto; font-family: "JetBrains Mono", "Courier New", monospace; font-size: 14px; line-height: 1.4; border: 1px solid var(--border); transition: background-color 0.3s ease; } pre[style*="color:red"] { border-left-color: var(--error); background-color: var(--error-bg); } /* Status messages */ p[style*="color:green"] { background-color: var(--success-bg); color: var(--success-text); padding: 15px 20px; border-radius: 6px; border-left: 4px solid var(--success); margin: 20px 0; font-weight: 600; } p[style*="color:red"] { background-color: var(--error-bg); color: var(--error-text); padding: 15px 20px; border-radius: 6px; border-left: 4px solid var(--error); margin: 20px 0; font-weight: 600; } /* Back to Problems link */ a[href="/"] { display: inline-block; margin-top: 30px; background-color: var(--muted); color: white; padding: 10px 20px; border-radius: 6px; font-weight: 500; } a[href="/"]:hover { background-color: var(--muted-hover); } /* Responsive design */ @media (max-width: 768px) { body { padding: 15px; } .problem-header { flex-direction: column; align-items: flex-start; gap: 15px; } h1 { font-size: 1.8em; } .problem-desc, .editor-section, ul { padding: 20px; } #editor { height: 300px; } .editor-actions { text-align: center; } }