* {
  box-sizing: border-box;
  }

body {
margin: 0;
min-height: 100vh;
background:
radial-gradient(circle at top left, rgba(124, 58, 237, 0.25), transparent 35%),
radial-gradient(circle at bottom right, rgba(190, 18, 60, 0.18), transparent 35%),
#050507;
color: #f4f4f5;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.app-shell {
width: 100%;
max-width: 760px;
margin: 0 auto;
padding: 20px 14px 40px;
}

.hero {
padding: 26px 8px 18px;
text-align: center;
}

.eyebrow {
margin: 0 0 8px;
color: #fb7185;
font-size: 12px;
letter-spacing: 2px;
font-weight: 800;
}

.hero h1 {
margin: 0;
font-size: 30px;
line-height: 1.15;
color: #ffffff;
text-shadow: 0 0 20px rgba(168, 85, 247, 0.5);
}

.hero-text {
margin: 12px auto 0;
max-width: 620px;
color: #c4c4cc;
font-size: 14px;
line-height: 1.6;
}

.card {
background: rgba(17, 17, 22, 0.88);
border: 1px solid rgba(168, 85, 247, 0.22);
border-radius: 22px;
padding: 18px;
margin-bottom: 16px;
box-shadow: 0 18px 50px rgba(0, 0, 0, 0.38);
backdrop-filter: blur(14px);
}

.input-group {
margin-bottom: 16px;
}

.input-group label {
display: block;
margin-bottom: 9px;
color: #d8b4fe;
font-weight: 800;
font-size: 14px;
}

textarea {
width: 100%;
padding: 15px;
border: 1px solid rgba(168, 85, 247, 0.45);
border-radius: 16px;
background: rgba(5, 5, 8, 0.8);
color: #f4f4f5;
font-size: 16px;
line-height: 1.5;
resize: vertical;
outline: none;
}

textarea:focus,
select:focus {
border-color: #fb7185;
box-shadow: 0 0 0 3px rgba(251, 113, 133, 0.14);
}

textarea::placeholder {
color: #71717a;
}

.grid-2 {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 14px;
}

.chip-row {
display: flex;
flex-wrap: wrap;
gap: 9px;
}

.chip-row input {
display: none;
}

.chip-row label {
margin: 0;
padding: 10px 13px;
border-radius: 999px;
background: #18181b;
border: 1px solid #3f3f46;
color: #d4d4d8;
font-size: 13px;
cursor: pointer;
}

.chip-row input:checked + label {
background: linear-gradient(135deg, #7c3aed, #be123c);
color: white;
border-color: transparent;
}

.button-row,
.storage-controls {
display: flex;
gap: 10px;
flex-wrap: wrap;
}

.btn {
border: none;
border-radius: 14px;
padding: 13px 16px;
font-weight: 900;
font-size: 15px;
cursor: pointer;
color: white;
min-height: 46px;
}

.btn.primary {
background: linear-gradient(135deg, #7c3aed, #a855f7);
}

.btn.danger {
background: linear-gradient(135deg, #be123c, #fb7185);
}

.btn.ghost {
background: rgba(255, 255, 255, 0.06);
border: 1px solid rgba(255, 255, 255, 0.12);
color: #f4f4f5;
}

.btn.small {
padding: 9px 12px;
min-height: 38px;
font-size: 13px;
}

.result-section.hidden,
.hidden {
display: none;
}

.result-top,
.section-head {
display: flex;
justify-content: space-between;
align-items: center;
gap: 12px;
flex-wrap: wrap;
}

.result-top h2,
.section-head h3 {
margin: 0;
}

.tabs {
display: flex;
gap: 8px;
overflow-x: auto;
padding: 14px 0 12px;
margin: 8px -4px 0;
}

.tab {
flex: 0 0 auto;
padding: 10px 13px;
border-radius: 999px;
border: 1px solid #3f3f46;
background: #111113;
color: #d4d4d8;
font-weight: 800;
cursor: pointer;
}

.tab.active {
background: #7c3aed;
color: white;
border-color: #7c3aed;
}

.tab-panel {
display: none;
padding-top: 10px;
}

.tab-panel.active {
display: block;
}

.result-content,
.prompt-list,
.saved-preview {
margin-top: 12px;
color: #e4e4e7;
line-height: 1.65;
white-space: pre-wrap;
word-break: keep-all;
}

.result-content ul {
padding-left: 20px;
}

.result-content li {
margin-bottom: 10px;
}

.mini-card {
margin-top: 12px;
padding: 14px;
border-radius: 16px;
background: rgba(255, 255, 255, 0.055);
border: 1px solid rgba(255, 255, 255, 0.08);
}

.mini-card h4 {
margin: 0 0 8px;
color: #d8b4fe;
}

.table-wrap {
margin-top: 12px;
overflow-x: auto;
}

.scene-table {
width: 100%;
min-width: 680px;
border-collapse: collapse;
overflow: hidden;
border-radius: 14px;
}

.scene-table th,
.scene-table td {
padding: 12px;
border-bottom: 1px solid #2f2f36;
text-align: left;
vertical-align: top;
font-size: 13px;
line-height: 1.5;
}

.scene-table th {
background: rgba(124, 58, 237, 0.22);
color: #f5d0fe;
}

.scene-table tr:nth-child(even) td {
background: rgba(255, 255, 255, 0.035);
}

.prompt-card {
padding: 14px;
margin-bottom: 12px;
border-radius: 16px;
background: rgba(255, 255, 255, 0.055);
border: 1px solid rgba(255, 255, 255, 0.08);
}

.prompt-card strong {
display: block;
margin-bottom: 8px;
color: #fda4af;
}

.prompt-en {
margin-top: 8px;
padding: 12px;
border-radius: 12px;
background: rgba(0, 0, 0, 0.35);
color: #c4b5fd;
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
font-size: 13px;
}

.hashtag-box {
display: flex;
flex-wrap: wrap;
gap: 8px;
margin-top: 10px;
}

.hashtag {
padding: 8px 10px;
border-radius: 999px;
background: rgba(190, 18, 60, 0.18);
color: #fecdd3;
border: 1px solid rgba(251, 113, 133, 0.18);
font-size: 13px;
}

select {
flex: 1;
min-width: 180px;
padding: 13px;
border-radius: 14px;
border: 1px solid rgba(168, 85, 247, 0.45);
background: #0b0b0f;
color: #f4f4f5;
font-size: 15px;
}

.toast {
position: fixed;
left: 50%;
bottom: 28px;
transform: translateX(-50%);
z-index: 10;
max-width: calc(100% - 28px);
padding: 13px 16px;
border-radius: 999px;
background: #be123c;
color: white;
font-weight: 800;
box-shadow: 0 12px 35px rgba(0, 0, 0, 0.45);
}

@media (max-width: 640px) {
.app-shell {
padding: 14px 10px 30px;
}

.hero h1 {
font-size: 25px;
}

.card {
padding: 15px;
border-radius: 18px;
}

.grid-2 {
grid-template-columns: 1fr;
gap: 0;
}

.button-row .btn,
.storage-controls .btn {
width: 100%;
}

.btn {
font-size: 15px;
min-height: 48px;
}

.tab {
font-size: 13px;
padding: 10px 12px;
}
}
