// --- Rosé Pine Palette Definitions --- // Dark (Main) $d-base: #191724; $d-surface: #1f1d2e; $d-overlay: #26233a; $d-text: #e0def4; $d-subtle: #908caa; $d-love: #eb6f92; // Red/Error $d-rose: #ebbcba; // Pink/Primary $d-pine: #31748f; // Blue-Green $d-iris: #c4a7e7; // Purple $d-hl-low: #21202e; $d-hl-high: #524f67; // Light (Dawn) $l-base: #faf4ed; $l-surface: #fffaf3; $l-overlay: #f2e9e1; $l-text: #575279; $l-subtle: #797593; $l-love: #b4637a; $l-rose: #d7827e; $l-pine: #286983; $l-iris: #907aa9; $l-hl-low: #f4ede8; $l-hl-high: #cecacd; $control-height: 46px; :root, body.dark-theme { // Default to Dark Mode --bg-body: #{$d-base}; --bg-card: #{$d-surface}; --bg-input: #{$d-overlay}; --bg-highlight: #{$d-hl-low}; --text-main: #{$d-text}; --text-muted: #{$d-subtle}; --primary: #{$d-rose}; --secondary: #{$d-rose}; --accent: #{$d-pine}; --error: #{$d-love}; --border: #{$d-hl-high}; --focus-ring: #{rgba($d-rose, 0.3)}; } body.light-theme { --bg-body: #{$l-base}; --bg-card: #{$l-surface}; --bg-input: #{$l-overlay}; --bg-highlight: #{$l-hl-low}; --text-main: #{$l-text}; --text-muted: #{$l-subtle}; --primary: #{$l-rose}; --secondary: #{$l-rose}; --accent: #{$l-pine}; --error: #{$l-love}; --border: #{$l-hl-high}; --focus-ring: #{rgba($l-rose, 0.3)}; } body { font-family: "Inter", "Segoe UI", sans-serif; background-color: var(--bg-body); color: var(--text-main); margin: 0; transition: background-color 0.3s, color 0.3s; } .app-containter { max-width: 800px; margin: 0 auto; min-height: 100vh; } .main-nav { background-color: var(--bg-card); padding: 1rem 2rem; border-bottom: 2px solid var(--border); display: flex; justify-content: space-between; align-items: center; ul { list-style: none; padding: 0; margin: 0; display: flex; gap: 20px; } a { color: var(--text-muted); text-decoration: none; font-weight: 600; transition: color 0.2s; &:hover, &[aria-current="page"] { color: var(--primary); } } } .theme-toggle { background: transparent; border: 1px solid var(--border); color: var(--text-main); padding: 5px 10px; border-radius: 6px; cursor: pointer; font-size: 0.9em; transition: all 0.2s; &:hover { border-color: var(--primary); color: var(--primary); } } main { padding: 2rem; } .cipher-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 2rem; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2); } .card-header { border-bottom: 1px solid var(--border); padding-bottom: 1rem; margin-bottom: 1.5rem; h2 { margin: 0; border: none; padding: none; color: var(--secondary); font-size: 1.5rem; } } .controls-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; min-height: $control-height; } .radio-group { display: flex; justify-content: center; align-items: center; gap: 20px; background: var(--bg-input); border-radius: 8px; width: fit-content; height: $control-height; padding: 0 16px; box-sizing: border-box; .radio-button { label { margin: 0; cursor: pointer; display: flex; align-items: center; gap: 8px; color: var(--text-main); text-transform: none; height: 100%; } input[type="radio"] { accent-color: var(--primary); margin: 0; } } } .format-controls-box { display: flex; font-size: 0.9rem; background: var(--bg-input); border-radius: 8px; height: $control-height; padding: 0 12px; box-sizing: border-box; animation: fadeIn 0.2s ease-in-out; .format-controls { display: flex; align-items: center; justify-content: center; gap: 12px; label { margin: 0; color: var(--text-muted); font-weight: normal; white-space: nowrap; } select { height: 32px; padding: 0 12px; border-radius: 6px; border: 1px solid var(--border); background-color: var(--bg-input); color: var(--text-main); cursor: pointer; font-size: 0.9rem; box-sizing: border-box; &:focus { outline: none; border-color: var(--primary); } } } } @keyframes fadeIn { from { opacity: 0; transform: translateX(5px); } to { opacity: 1; transform: translateX(0); } } .form-group { margin-bottom: 1.5rem; label { display: block; font-weight: 600; margin-bottom: 0.5rem; color: var(--text-muted); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.05rem; } input[type="text"], textarea { width: 100%; padding: 12px; background-color: var(--bg-input); color: var(--text-main); border: 1px solid var(--border); border-radius: 6px; font-size: 1rem; box-sizing: border-box; font-family: monospace; } &:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--focus-ring); } &::placeholder { color: var(--text-muted); opacity: 0.5; } } .btn-primary { background-color: var(--primary); color: var(--bg-body); padding: 12px 24px; border: none; border-radius: 6px; font-size: 1rem; font-weight: bold; cursor: pointer; width: 100%; transition: opacity 0.2s; &:hover { opacity: 0.9; } } .error-box { margin-top: 1.5rem; padding: 1rem; background-color: rgba($d-love, 0.1); color: var(--error); border: 1px solid var(--error); border-radius: 6px; } .error-toolbar { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; background-color: rgba(0, 0, 0, 0.03); border-bottom: 1px solid var(--border); strong { background: transparent; padding: 0; color: var(--text-muted); } } .result-box { margin-top: 1.5rem; background: var(--bg-highlight); border-radius: 8px; border: 1px solid var(--border); overflow: hidden; code { display: block; padding: 15px; word-break: break-all; font-family: "Consolas", "Monaco", monospace; color: var(--accent); background: transparent; } } .result-toolbar { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; background-color: rgba(0, 0, 0, 0.05); border-bottom: 1px solid var(--border); strong { font-size: 0.85rem; color: var(--text-muted); } } .btn-copy { background: transparent; border: none; color: var(--primary); font-weight: 700; font-size: 0.85rem; cursor: pointer; text-transform: uppercase; letter-spacing: 0.05em; padding: 4px 8px; border-radius: 4px; transition: all 0.2s; &:hover { background-color: rgba(0, 0, 0, 0.05); } }