/* OC Fate Generator - Main Styles */

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: #0f0f12; color: #e0e0e0; line-height: 1.6; padding: 20px; }
.container { max-width: 900px; margin: 0 auto; }
.top-bar { display: flex; justify-content: flex-end; margin-bottom: 4px; }
.lang-toggle { background: transparent; color: #9ddcff; border: 1px solid #2f4f66; padding: 4px 12px; font-size: 13px; border-radius: 6px; cursor: pointer; font-weight: 600; letter-spacing: 0.03em; }
.lang-toggle:hover { border-color: #4a7fa8; color: #d7efff; background: #182430; }
h1 { text-align: center; margin-bottom: 10px; color: #00d4ff; }
.subtitle { text-align: center; color: #888; margin-bottom: 30px; }

/* Axis Groups */
.axis-group { background: #1a1a20; border-radius: 8px; padding: 15px; margin-bottom: 15px; }
.axis-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.axis-head h3 { font-size: 16px; color: #fff; }
.axis-head-left { display: flex; align-items: center; }
.help-btn { background:#333;border:none;color:#00d4ff;border-radius:50%;width:20px;height:20px;cursor:pointer;font-size:13px;margin-left:8px;display:inline-flex;align-items:center;justify-content:center; }
.help-btn:hover { background:#444; }
.chip { background: #00d4ff; color: #000; padding: 2px 8px; border-radius: 12px; font-size: 12px; }

/* Options */
.options { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.option-item { display: flex; align-items: flex-start; padding: 12px; background: #25252d; border-radius: 6px; cursor: pointer; flex-direction: column; }
.option-item:hover { background: #2a2a35; }
.option-name { display: flex; align-items: flex-start; width: 100%; }
.option-item input { margin-right: 10px; margin-top: 4px; flex-shrink: 0; }
.option-name span { font-size: 14px; color: #fff; font-weight: 500; line-height: 1.4; }
.option-desc { font-size: 12px; color: #777; margin-top: 8px; line-height: 1.5; padding-left: 24px; }

/* Controls */
.controls { text-align: center; margin: 30px 0; }
.btn-row { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.btn { background: #00d4ff; color: #000; border: none; padding: 12px 30px; font-size: 16px; border-radius: 8px; cursor: pointer; font-weight: bold; }
.btn:hover { background: #00b8e6; }
.btn:disabled { background: #555; cursor: not-allowed; }
.btn-secondary { background: transparent; color: #00d4ff; border: 2px solid #00d4ff; }
.btn-secondary:hover { background: rgba(0,212,255,0.1); }
.btn-secondary:disabled { border-color: #555; color: #555; }
.ghost-btn { background: transparent; color: #9ddcff; border: 1px solid #2f4f66; padding: 10px 14px; font-size: 13px; border-radius: 8px; cursor: pointer; font-weight: 600; }
.ghost-btn:hover { border-color: #4a7fa8; color: #d7efff; background: #182430; }
.ghost-btn:disabled { cursor: not-allowed; opacity: 0.45; }

/* Status & Result */
.status { text-align: center; padding: 10px; margin-bottom: 20px; border-radius: 8px; background: #1a1a20; }
.result-panel { background: #1a1a20; border-radius: 8px; padding: 20px; margin-top: 20px; white-space: normal; overflow-wrap: anywhere; }
.result-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 18px; }
.result-toolbar-title { color: #7ea8c6; font-size: 13px; letter-spacing: 0.02em; }
.result-title { color: #00d4ff; margin: 18px 0 10px; line-height: 1.35; }
.result-title-1, .result-title-2 { font-size: 22px; }
.result-title-3, .result-title-4, .result-title-5, .result-title-6 { font-size: 18px; }
.result-paragraph { margin: 10px 0; color: #d8d8de; }
.result-list { margin: 10px 0 14px 22px; padding-left: 18px; }
.result-list li { margin: 6px 0; color: #d8d8de; }
.result-quote { margin: 14px 0; padding: 10px 14px; border-left: 3px solid #00d4ff; background: #20202a; color: #b8dfff; border-radius: 0 8px 8px 0; }
.result-hr { border: none; border-top: 1px solid #343445; margin: 18px 0; }
.result-panel strong { color: #ffffff; font-weight: 700; }
.result-panel em { color: #9ddcff; font-style: normal; }
.result-panel code { background: #25252d; border: 1px solid #30303c; border-radius: 4px; padding: 1px 6px; color: #ffd479; font-family: "SFMono-Regular", Consolas, monospace; font-size: 0.95em; }

/* Control Grid */
.control-grid { margin-bottom: 20px; }
.control-row { display: grid; grid-template-columns: 240px 1fr; gap: 15px; align-items: start; }
.field-label { display: block; margin-bottom: 5px; color: #888; font-size: 13px; }
.control-input, .control-textarea { width: 100%; padding: 10px; background: #25252d; border: 1px solid #333; color: #fff; border-radius: 6px; font-size: 14px; }
.control-textarea { min-height: 132px; resize: vertical; line-height: 1.55; }
.prompt-note { margin-top: 6px; color: #6f6f7f; font-size: 12px; line-height: 1.5; }
.selected-count { margin-bottom: 15px; color: #888; }

/* Footer */
footer { text-align: center; margin-top: 40px; color: #666; font-size: 12px; }
footer a { color: #00d4ff; }

/* Help Modal */
.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.85); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-content { background: #1a1a20; border-radius: 16px; padding: 28px; max-width: 700px; width: 100%; max-height: 85vh; overflow-y: auto; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.modal-header h2 { color: #00d4ff; margin: 0; font-size: 22px; }
.modal-close-btn { background: none; border: none; color: #888; font-size: 24px; cursor: pointer; padding: 0; width: 32px; height: 32px; }
.modal-close-btn:hover { color: #fff; }
.modal-wisdom { background: linear-gradient(135deg,#25252d,#1f1f28); border-left: 4px solid #00d4ff; padding: 16px; margin-bottom: 20px; border-radius: 8px 0 0 8px; }
.modal-wisdom p { color: #fff; margin: 0; line-height: 1.6; font-size: 14px; }
.modal-intro { color: #aaa; margin-bottom: 20px; line-height: 1.6; font-size: 14px; }
.modal-section-title { color: #fff; margin: 24px 0 16px; font-size: 16px; border-bottom: 2px solid #333; padding-bottom: 8px; }
.modal-options-list { list-style: none; padding: 0; margin: 0; }
.modal-option-item { margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid #333; }
.modal-option-name { color: #00d4ff; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.modal-option-detail { color: #aaa; font-size: 13px; line-height: 1.6; }
.modal-links { background: linear-gradient(135deg,#25252d,#1f1f28); padding: 16px; margin-top: 24px; border-radius: 12px; }
.modal-links h4 { color: #00d4ff; margin: 0 0 10px; font-size: 14px; }
.modal-links p { color: #aaa; margin: 0; line-height: 1.8; font-size: 14px; }
.modal-close-bottom { margin-top: 24px; width: 100%; padding: 14px; background: linear-gradient(135deg,#00d4ff,#00b8e6); border: none; border-radius: 10px; color: #000; font-weight: 700; cursor: pointer; font-size: 15px; box-shadow: 0 4px 12px rgba(0,212,255,0.3); }
.modal-close-bottom:hover { background: linear-gradient(135deg,#00b8e6,#009fcc); }

@media (max-width: 720px) {
  .control-row { grid-template-columns: 1fr; }
}
