:root {
    --horo-bg: #f5f0ff;
    --horo-card-bg: linear-gradient(135deg, #faf5ff, #ede9fe);
    --horo-primary: #7c3aed;
    --horo-primary-soft: #ede9fe;
    --horo-border: #ddd6fe;
    --horo-sign-hover: #ede9fe;
    --horo-sign-active-bg: #7c3aed;
    --horo-sign-active-text: #fff;
    --bg: #fdf6ee;
    --card-bg: #ffffff;
    --text: #1a1a1a;
    --text-muted: #888;
    --border: #ede8e0;
    --shadow: rgba(200, 120, 40, 0.1);
    --primary: #e8600a;
    --primary-hover: #c94f05;
    --primary-soft: #fff3eb;
    --tab-active-bg: #e8600a;
    --tab-active-text: #fff;
    --tab-inactive-bg: #f5f0ea;
    --tab-inactive-text: #888;
    --chip-bg: #fff3eb;
    --chip-border: #f5c89a;
    --chip-text: #b34a00;
    --result-bg: linear-gradient(135deg, #fff8f2, #fff3e6);
    --coming-bg: #f5f0ea;
    --input-bg: #fafafa;
}

body.dark {
    --horo-bg: #160d2e;
    --horo-card-bg: linear-gradient(135deg, #1e1040, #2d1558);
    --horo-primary: #a78bfa;
    --horo-primary-soft: #2e1d5a;
    --horo-border: #4c1d95;
    --horo-sign-hover: #2e1d5a;
    --horo-sign-active-bg: #7c3aed;
    --horo-sign-active-text: #fff;
    --bg: #111318;
    --card-bg: #1c2030;
    --text: #e8e8e8;
    --text-muted: #7a7a8a;
    --border: #2a2f40;
    --shadow: rgba(0, 0, 0, 0.4);
    --primary: #f07730;
    --primary-hover: #e06520;
    --primary-soft: #2a1a0a;
    --tab-active-bg: #f07730;
    --tab-active-text: #fff;
    --tab-inactive-bg: #252a38;
    --tab-inactive-text: #888;
    --chip-bg: #2a1a0a;
    --chip-border: #6b3a10;
    --chip-text: #f0a060;
    --result-bg: linear-gradient(135deg, #1e1810, #231e14);
    --coming-bg: #1e2030;
    --input-bg: #161b27;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 24px 16px 48px;
    transition: background 0.3s, color 0.3s;
}

.container { width: 100%; max-width: 560px; }

/* Header */
header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 0 20px;
}

.logo { display: flex; flex-direction: column; }

.logo-main {
    font-size: 38px;
    font-weight: 900;
    color: var(--primary);
    line-height: 1;
    letter-spacing: -1px;
}

.logo-sub {
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    margin-top: 4px;
}

.theme-btn {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 42px;
    height: 42px;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    box-shadow: 0 2px 8px var(--shadow);
}
.theme-btn:hover { background: var(--border); }

/* Category tabs (¿Qué comer? / ¿Qué hacer?) */
.category-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.cat-tab {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    background: var(--tab-inactive-bg);
    color: var(--tab-inactive-text);
}

.cat-tab.active {
    background: var(--tab-active-bg);
    color: var(--tab-active-text);
    box-shadow: 0 4px 14px var(--shadow);
}

.cat-tab.soon { cursor: not-allowed; opacity: 0.7; }

.soon-badge {
    position: absolute;
    top: -6px;
    right: 10px;
    background: #f0c040;
    color: #7a5800;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
}

/* Cat panels */
.cat-panel { display: none; }
.cat-panel.active { display: block; }

/* Mode tabs (Sorpréndeme / Mis opciones) */
.mode-tabs {
    display: flex;
    background: var(--tab-inactive-bg);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 16px;
    gap: 4px;
}

.mode-tab {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    background: transparent;
    color: var(--text-muted);
    transition: all 0.2s;
}

.mode-tab.active {
    background: var(--card-bg);
    color: var(--text);
    box-shadow: 0 2px 8px var(--shadow);
}

/* Mode panels */
.mode-panel { display: none; }
.mode-panel.active { display: flex; flex-direction: column; gap: 14px; }

/* Result card */
.result-card {
    background: var(--result-bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 36px 24px;
    text-align: center;
    transition: all 0.3s;
}

.result-card.hidden { display: none; }

.result-emoji {
    font-size: 56px;
    line-height: 1;
    margin-bottom: 12px;
    display: block;
    transition: transform 0.15s;
}

.result-name {
    font-size: 26px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 8px;
    min-height: 36px;
    transition: opacity 0.1s;
}

.result-hint {
    font-size: 13px;
    color: var(--text-muted);
}

.result-card.spinning .result-emoji { animation: spin 0.4s linear infinite; }
.result-card.revealed { border-color: var(--primary); }

@keyframes spin {
    from { transform: rotate(0deg) scale(1.1); }
    to   { transform: rotate(360deg) scale(1.1); }
}

@keyframes popIn {
    0%   { transform: scale(0.8); opacity: 0; }
    70%  { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 1; }
}

.result-card.revealed .result-emoji { animation: popIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); }

/* Main button */
.main-btn {
    width: 100%;
    padding: 18px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 16px;
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
    letter-spacing: 0.3px;
    transition: background 0.2s, transform 0.1s, opacity 0.2s;
    box-shadow: 0 4px 16px rgba(232, 96, 10, 0.3);
}
.main-btn:hover:not(:disabled) { background: var(--primary-hover); }
.main-btn:active:not(:disabled) { transform: scale(0.98); }
.main-btn:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }

/* Custom mode input */
.input-row {
    display: flex;
    gap: 8px;
}

.input-row input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--input-bg);
    color: var(--text);
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.input-row input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(232, 96, 10, 0.12);
}

.add-btn {
    padding: 12px 18px;
    background: var(--primary-soft);
    color: var(--primary);
    border: 1px solid var(--chip-border);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}
.add-btn:hover { background: var(--chip-bg); }

/* Chips */
.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 38px;
    align-items: center;
}

.chips-empty {
    font-size: 13px;
    color: var(--text-muted);
    width: 100%;
    text-align: center;
    padding: 4px 0;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--chip-bg);
    border: 1px solid var(--chip-border);
    color: var(--chip-text);
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 14px;
    font-weight: 600;
    animation: popIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.chip-remove {
    background: none;
    border: none;
    color: var(--chip-text);
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 0;
    opacity: 0.6;
    transition: opacity 0.15s;
}
.chip-remove:hover { opacity: 1; }

/* Coming soon card */
.coming-soon-card {
    background: var(--coming-bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 48px 24px;
    text-align: center;
    margin-bottom: 16px;
}

.coming-soon-icon { font-size: 48px; margin-bottom: 16px; }

.coming-soon-card h3 {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 10px;
}

.coming-soon-card p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Contact section */
.contact-section,
.comments-section {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 24px;
    margin-top: 16px;
    box-shadow: 0 4px 20px var(--shadow);
    border: 1px solid var(--border);
    transition: background 0.3s;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
}

.section-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.contact-form { display: flex; flex-direction: column; gap: 16px; margin-top: 20px; }

.form-group { display: flex; flex-direction: column; gap: 6px; }

.form-group label { font-size: 13px; font-weight: 600; }

.form-group input,
.form-group textarea {
    padding: 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--input-bg);
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(232, 96, 10, 0.12);
}

.form-group textarea { min-height: 100px; resize: vertical; }

.contact-submit-btn { margin-top: 4px; }

.form-status {
    margin-top: 14px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    display: none;
}
.form-status.success { display: block; background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }
.form-status.error   { display: block; background: #ffebee; color: #c62828; border: 1px solid #ef9a9a; }
body.dark .form-status.success { background: #1b2e1c; color: #81c784; border-color: #388e3c; }
body.dark .form-status.error   { background: #2e1515; color: #ef9a9a; border-color: #c62828; }

.comments-section .section-title { margin-bottom: 20px; }

/* ── Horoscope ─────────────────────────────────────────── */
.ai-notice {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--horo-primary-soft);
    border: 1px solid var(--horo-border);
    border-radius: 10px;
    padding: 8px 14px;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.ai-notice-icon { font-size: 14px; flex-shrink: 0; }

.horo-date-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.horo-date-label {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--horo-primary);
}

.horo-date-value {
    font-size: 13px;
    color: var(--text-muted);
}

.horo-freshness {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    margin-left: auto;
}

.horo-freshness.fresh   { background: #dcfce7; color: #166534; }
.horo-freshness.stale   { background: #fef9c3; color: #854d0e; }
body.dark .horo-freshness.fresh { background: #14532d; color: #86efac; }
body.dark .horo-freshness.stale { background: #422006; color: #fde68a; }

.sign-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.sign-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 6px;
    border: 1px solid var(--horo-border);
    border-radius: 14px;
    background: var(--horo-primary-soft);
    color: var(--text);
    cursor: pointer;
    font-size: 22px;
    transition: all 0.15s;
}

.sign-btn span {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
}

.sign-btn:hover {
    background: var(--horo-sign-hover);
    border-color: var(--horo-primary);
    transform: translateY(-2px);
}

.sign-btn.active {
    background: var(--horo-sign-active-bg);
    border-color: var(--horo-sign-active-bg);
    color: var(--horo-sign-active-text);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.sign-btn.active span { color: rgba(255,255,255,0.85); }

.horo-card {
    background: var(--horo-card-bg);
    border: 1px solid var(--horo-border);
    border-radius: 20px;
    padding: 28px 24px;
    animation: popIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.horo-card.hidden { display: none; }

.horo-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.horo-symbol {
    font-size: 42px;
    line-height: 1;
}

.horo-sign-name {
    font-size: 24px;
    font-weight: 800;
    color: var(--horo-primary);
    line-height: 1.2;
}

.horo-sign-dates {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.horo-general {
    font-size: 15px;
    line-height: 1.75;
    color: var(--text);
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--horo-border);
}

.horo-sections {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.horo-section {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.horo-section-icon {
    font-size: 22px;
    flex-shrink: 0;
    margin-top: 2px;
}

.horo-section-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.horo-section-label {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--horo-primary);
}

.horo-section-body p {
    font-size: 14px;
    line-height: 1.65;
    color: var(--text);
}

.horo-consejo {
    background: var(--horo-primary-soft);
    border: 1px solid var(--horo-border);
    border-radius: 12px;
    padding: 14px;
}

/* Comments header with category badge */
.comments-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.comments-cat-badge {
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    background: var(--primary-soft);
    color: var(--primary);
    border: 1px solid var(--chip-border);
}

/* Footer */
footer {
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    padding-top: 24px;
}
