diff --git a/public/css/styles.css b/public/css/styles.css index f8855a2..0374336 100644 --- a/public/css/styles.css +++ b/public/css/styles.css @@ -1 +1,319 @@ -/* Mythic Oracle — styles */ +/* Mythic Oracle — design tokens, layout, typography, sidebar */ + +:root { + --font-heading: 'Cormorant Garamond', serif; + --font-body: 'Lora', serif; + --font-mono: 'JetBrains Mono', monospace; + + --sidebar-width: 220px; + --sidebar-width-collapsed: 52px; + --transition-speed: 0.2s; +} + +[data-theme="dark"] { + --bg: #121110; + --bg-elevated: #181613; + --bg-hover: #221f1a; + --border: #2c2822; + + --text-primary: #e8e2d6; + --text-secondary: #b0a795; + --text-muted: #756c5c; + + --accent: #c9a35c; + --accent-hover: #ddb876; + --accent-text: #121110; +} + +[data-theme="light"] { + --bg: #f5f1ea; + --bg-elevated: #ece4d4; + --bg-hover: #e1d6c0; + --border: #d6c9ac; + + --text-primary: #2b2620; + --text-secondary: #55503f; + --text-muted: #8a8168; + + --accent: #a3822f; + --accent-hover: #8c6f27; + --accent-text: #f5f1ea; +} + +* , +*::before, +*::after { + box-sizing: border-box; +} + +html, +body { + height: 100%; + margin: 0; + padding: 0; +} + +body { + font-family: var(--font-body); + background: var(--bg); + color: var(--text-primary); + -webkit-font-smoothing: antialiased; +} + +h1, h2, h3, h4, h5, h6 { + font-family: var(--font-heading); + font-weight: 600; + color: var(--text-primary); + margin: 0 0 0.5em; +} + +.app { + display: flex; + height: 100vh; + overflow: hidden; +} + +/* --- Sidebar --- */ + +.sidebar { + display: flex; + flex-direction: column; + flex-shrink: 0; + width: var(--sidebar-width); + background: var(--bg-elevated); + border-right: 1px solid var(--border); + transition: width var(--transition-speed) ease; + overflow: hidden; +} + +.sidebar.collapsed { + width: var(--sidebar-width-collapsed); +} + +.sidebar-header { + display: flex; + align-items: center; + justify-content: space-between; + gap: 8px; + padding: 16px; + border-bottom: 1px solid var(--border); + flex-shrink: 0; +} + +.sidebar-brand { + display: flex; + align-items: center; + gap: 10px; + overflow: hidden; +} + +.sidebar-logo { + flex-shrink: 0; + width: 20px; + height: 20px; + color: var(--accent); +} + +.sidebar-title { + font-family: var(--font-heading); + font-size: 1.3rem; + font-weight: 600; + color: var(--accent); + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +.sidebar.collapsed .sidebar-title { + display: none; +} + +.sidebar-collapse-toggle { + flex-shrink: 0; + display: flex; + align-items: center; + justify-content: center; + width: 24px; + height: 24px; + padding: 0; + background: none; + border: none; + color: var(--text-secondary); + cursor: pointer; +} + +.sidebar-collapse-toggle:hover { + color: var(--accent); +} + +.sidebar-collapse-toggle svg { + width: 16px; + height: 16px; + transition: transform var(--transition-speed) ease; +} + +.sidebar.collapsed .sidebar-collapse-toggle svg { + transform: rotate(180deg); +} + +.sidebar-nav { + flex: 1; + overflow-y: auto; + overflow-x: hidden; + padding: 8px 0; +} + +.nav-section { + margin-bottom: 12px; +} + +.nav-section-label { + padding: 8px 16px 4px; + font-family: var(--font-body); + font-size: 0.7rem; + font-weight: 600; + letter-spacing: 0.08em; + text-transform: uppercase; + color: var(--text-muted); + white-space: nowrap; +} + +.sidebar.collapsed .nav-section-label { + display: none; +} + +.nav-item { + display: flex; + align-items: center; + gap: 12px; + width: 100%; + padding: 8px 16px; + border: none; + border-left: 2px solid transparent; + background: none; + color: var(--text-secondary); + font-family: var(--font-body); + font-size: 0.9rem; + text-align: left; + cursor: pointer; + transition: background var(--transition-speed) ease, color var(--transition-speed) ease; +} + +.nav-item:hover { + background: var(--bg-hover); + color: var(--text-primary); +} + +.nav-item.active { + background: var(--bg-hover); + color: var(--accent); + border-left-color: var(--accent); +} + +.nav-icon { + flex-shrink: 0; + width: 18px; + height: 18px; +} + +.nav-label { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +.sidebar.collapsed .nav-item { + justify-content: center; + padding: 10px 0; + border-left: none; + border-right: 2px solid transparent; +} + +.sidebar.collapsed .nav-item.active { + border-right-color: var(--accent); +} + +.sidebar.collapsed .nav-label { + display: none; +} + +/* --- Chaos factor --- */ + +.chaos-factor { + flex-shrink: 0; + display: flex; + flex-direction: column; + gap: 8px; + padding: 12px 16px; + border-top: 1px solid var(--border); +} + +.chaos-factor-label { + font-size: 0.7rem; + font-weight: 600; + letter-spacing: 0.08em; + text-transform: uppercase; + color: var(--text-muted); + white-space: nowrap; +} + +.sidebar.collapsed .chaos-factor-label { + display: none; +} + +.chaos-factor-controls { + display: flex; + align-items: center; + justify-content: space-between; + gap: 8px; +} + +.sidebar.collapsed .chaos-factor-controls { + flex-direction: column-reverse; +} + +.chaos-btn { + display: flex; + align-items: center; + justify-content: center; + flex-shrink: 0; + width: 24px; + height: 24px; + border: 1px solid var(--border); + border-radius: 4px; + background: var(--bg); + color: var(--text-primary); + font-family: var(--font-mono); + font-size: 0.9rem; + cursor: pointer; + transition: border-color var(--transition-speed) ease, color var(--transition-speed) ease; +} + +.chaos-btn:hover { + border-color: var(--accent); + color: var(--accent); +} + +.chaos-factor-value { + min-width: 1.5em; + font-family: var(--font-mono); + font-size: 1.1rem; + color: var(--accent); + text-align: center; +} + +/* --- Main content --- */ + +.main-content { + flex: 1; + overflow-y: auto; + padding: 24px; +} + +.view { + display: none; +} + +.view.active { + display: block; +} diff --git a/public/index.html b/public/index.html index 81c40ee..bcbf7d5 100644 --- a/public/index.html +++ b/public/index.html @@ -12,7 +12,139 @@
+