/* EPUB Reader — styles.css — Emerald Night */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --primary: #00B894;
  --secondary: #55EFC4;
  --accent: #FDCB6E;
  --bg: #0A1F1C;
  --bg-card: rgba(10, 31, 28, 0.95);
  --surface: rgba(20, 50, 44, 0.5);
  --border: rgba(0, 184, 148, 0.08);
  --text: #C8E0D8;
  --text-dim: #6AA898;
  --text-muted: #2A5048;
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.25s ease;
  --reader-bg: var(--bg);
  --reader-text: var(--text);
  --reader-font: Georgia, serif;
  --reader-size: 16px;
}

[data-theme="sepia"] { --reader-bg: #F5E6CA; --reader-text: #3C2F12; }
[data-theme="light"] { --reader-bg: #FFFFFF; --reader-text: #1A1A1A; }
[data-theme="dark"] { --reader-bg: var(--bg); --reader-text: var(--text); }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', system-ui, sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; }

.header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 16px; background: var(--bg-card); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100;
}
.header-left { display: flex; align-items: center; gap: 8px; }
.logo { font-size: 18px; }
.header h1 { font-size: 14px; font-weight: 600; color: var(--primary); max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.header-right { display: flex; align-items: center; gap: 6px; }
.progress-text { font-size: 10px; color: var(--text-dim); }

.btn {
  padding: 6px 12px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-family: 'Inter', sans-serif;
  font-size: 12px; cursor: pointer; transition: var(--transition);
}
.btn:hover { border-color: var(--primary); }
.btn-sm { padding: 4px 8px; font-size: 11px; }

.input { width: 100%; padding: 6px 10px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--bg); color: var(--text); font-family: 'Inter', sans-serif; font-size: 12px; outline: none; }
.input:focus { border-color: var(--primary); }

.app { max-width: 750px; margin: 0 auto; padding: 16px; }
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }

/* Drop Zone */
.drop-zone { text-align: center; cursor: pointer; padding: 50px 20px; }
.drop-zone:hover { border-color: var(--primary); }
.drop-icon { font-size: 40px; margin-bottom: 10px; }
.upload-label { color: var(--primary); cursor: pointer; text-decoration: underline; }

/* Sidebar */
.sidebar {
  position: fixed; left: -280px; top: 0; width: 280px; height: 100vh;
  background: var(--bg-card); border-right: 1px solid var(--border);
  z-index: 200; padding: 60px 16px 16px; overflow-y: auto; transition: left 0.3s;
}
.sidebar.open { left: 0; }
.sidebar h3 { font-size: 10px; text-transform: uppercase; letter-spacing: 0.8px; color: var(--text-dim); margin-bottom: 8px; }
.toc-item { padding: 6px 8px; font-size: 12px; cursor: pointer; border-radius: var(--radius-sm); transition: var(--transition); }
.toc-item:hover { background: var(--surface); color: var(--primary); }
.toc-item.active { color: var(--primary); font-weight: 600; }
.bookmark-item { padding: 4px 8px; font-size: 11px; cursor: pointer; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; }

/* Reader */
.reader { background: var(--reader-bg); border-radius: var(--radius); padding: 24px; min-height: 60vh; }
.reader-content {
  font-family: var(--reader-font); font-size: var(--reader-size); color: var(--reader-text);
  line-height: 1.8; max-width: 650px; margin: 0 auto;
}
.reader-content img { max-width: 100%; height: auto; border-radius: var(--radius-sm); }
.nav-buttons { display: flex; justify-content: space-between; align-items: center; margin-top: 20px; }
.chapter-indicator { font-size: 11px; color: var(--text-dim); }

/* Settings */
.settings-panel {
  position: fixed; right: -280px; top: 0; width: 280px; height: 100vh;
  background: var(--bg-card); border-left: 1px solid var(--border);
  z-index: 200; padding: 60px 16px 16px; transition: right 0.3s;
}
.settings-panel.open { right: 0; }
.field-label { display: block; font-size: 10px; text-transform: uppercase; color: var(--text-muted); letter-spacing: 0.5px; margin: 8px 0 4px; }
.slider { width: 100%; accent-color: var(--primary); }
.theme-buttons { display: flex; gap: 4px; }
.theme-btn {
  flex: 1; padding: 6px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-size: 11px; cursor: pointer;
  font-family: 'Inter', sans-serif; transition: var(--transition);
}
.theme-btn:hover { border-color: var(--primary); }

.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 20px; font-size: 13px; opacity: 0; transition: all 0.3s; z-index: 300; pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-thumb { background: var(--surface); border-radius: 3px; }
