/* Lizard Astrology - CSS Variables & Styles */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-card: #ffffff;
    --bg-hover: #f1f5f9;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --accent: #059669;
    --accent-light: #d1fae5;
    --highlight: #34d399;
    --highlight-bg: rgba(52, 211, 153, 0.12);
    --highlight-border: rgba(52, 211, 153, 0.4);
    --shadow: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-lg: 0 4px 20px rgba(0,0,0,0.08);
    --body-fill: rgba(100, 116, 139, 0.06);
    --body-stroke: rgba(100, 116, 139, 0.18);
    --zone-fill: rgba(100, 116, 139, 0.04);
    --zone-stroke: rgba(5, 150, 105, 0.35);
    --zone-hover-fill: rgba(52, 211, 153, 0.22);
    --zone-hover-stroke: #34d399;
    --label-color: rgba(71, 85, 105, 0.45);
    --card-border: #e2e8f0;
    --side-card-bg: #f8fafc;
    --gradient-start: #059669;
    --gradient-end: #0d9488;
    --silhouette-fill: #e0f2e9;
    --silhouette-stroke: #a7d7c5;
}
html.dark {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: #1e293b;
    --bg-hover: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    --border-color: #334155;
    --accent: #34d399;
    --accent-light: rgba(52, 211, 153, 0.15);
    --highlight: #34d399;
    --highlight-bg: rgba(52, 211, 153, 0.1);
    --highlight-border: rgba(52, 211, 153, 0.3);
    --shadow: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-lg: 0 4px 20px rgba(0,0,0,0.3);
    --body-fill: rgba(52, 211, 153, 0.06);
    --body-stroke: rgba(52, 211, 153, 0.15);
    --zone-fill: rgba(52, 211, 153, 0.04);
    --zone-stroke: rgba(52, 211, 153, 0.3);
    --zone-hover-fill: rgba(52, 211, 153, 0.2);
    --zone-hover-stroke: #34d399;
    --label-color: rgba(52, 211, 153, 0.35);
    --card-border: #334155;
    --side-card-bg: rgba(255,255,255,0.03);
    --gradient-start: #059669;
    --gradient-end: #0d9488;
    --silhouette-fill: #1a2e2a;
    --silhouette-stroke: #2d4a42;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    min-height: 100vh;
    transition: background 0.3s, color 0.3s;
}
/* HEADER */
.header {
    position: sticky; top: 0; z-index: 50; width: 100%;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-primary); box-shadow: var(--shadow);
    transition: background 0.3s, border-color 0.3s;
}
.header-inner {
    max-width: 1200px; margin: 0 auto;
    display: flex; height: 56px; align-items: center; padding: 0 20px; gap: 16px;
}
.logo-container { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.logo-container img { height: 28px; width: auto; }
.logo-light { display: block; } .logo-dark { display: none; }
html.dark .logo-light { display: none; } html.dark .logo-dark { display: block; }
.header-title { font-size: 0.95rem; font-weight: 600; color: var(--text-primary); white-space: nowrap; }
.header-divider { width: 1px; height: 24px; background: var(--border-color); }
.header-spacer { flex: 1; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 8px;
    border: 1px solid var(--border-color); background: var(--bg-primary);
    color: var(--text-secondary); cursor: pointer; transition: all 0.2s;
}
.icon-btn:hover { background: var(--bg-hover); border-color: var(--text-muted); box-shadow: var(--shadow); }
.icon-btn svg { width: 18px; height: 18px; }
.sun-icon { display: block; } .moon-icon { display: none; }
html.dark .sun-icon { display: none; } html.dark .moon-icon { display: block; }

/* Language selector */
.lang-select {
    padding: 6px 28px 6px 10px; font-size: 0.82rem; font-weight: 500;
    border: 1px solid var(--border-color); border-radius: 8px;
    background: var(--bg-primary); color: var(--text-primary);
    cursor: pointer; transition: all 0.2s;
    appearance: none; -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 8px center;
}
.lang-select:hover { border-color: var(--text-muted); box-shadow: var(--shadow); }
.lang-select:focus { outline: none; border-color: var(--accent); }

/* PAGE */
.page-header { text-align: center; padding: 24px 20px 6px; }
.page-header h1 {
    font-size: 1.8rem; font-weight: 700;
    background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
    margin-bottom: 4px;
}
.page-header p { font-size: 0.9rem; color: var(--text-muted); }

/* CONTROLS */
.controls { display: flex; justify-content: center; gap: 8px; margin: 14px 0 8px; flex-wrap: wrap; }
.tab-group {
    display: flex; gap: 4px;
    background: var(--bg-primary); border: 1px solid var(--border-color);
    border-radius: 10px; padding: 3px;
}
.tab-btn {
    padding: 7px 24px; font-size: 0.88rem; font-weight: 500;
    border: none; background: transparent; color: var(--text-secondary);
    border-radius: 7px; cursor: pointer; transition: all 0.2s;
}
.tab-btn.active {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: #fff; box-shadow: 0 2px 8px rgba(5, 150, 105, 0.3);
}
.tab-btn:hover:not(.active) { background: var(--bg-hover); }

/* MAIN LAYOUT */
.main-container {
    display: flex; justify-content: center; align-items: flex-start;
    gap: 20px; padding: 12px 20px; max-width: 1200px; margin: 0 auto;
}
.bodies-wrapper { display: flex; gap: 16px; flex-shrink: 0; }
.view-pair { display: flex; gap: 16px; }
.view-pair.hidden { display: none; }
.body-figure { text-align: center; }
.body-figure h3 {
    font-size: 0.8rem; font-weight: 600; color: var(--text-muted);
    margin-bottom: 4px; letter-spacing: 1.5px; text-transform: uppercase;
}
.body-figure .gender-label {
    font-size: 0.7rem; color: var(--accent); font-weight: 600;
    letter-spacing: 1px; margin-bottom: 2px; text-transform: uppercase;
}
.body-svg { width: 220px; height: auto; display: block; }

/* SVG styles */
.body-svg .silhouette { fill: var(--silhouette-fill); stroke: var(--silhouette-stroke); stroke-width: 0.8; }
.body-svg .body-part {
    cursor: pointer; transition: all 0.25s;
    fill: var(--zone-fill); stroke: var(--zone-stroke); stroke-width: 0.8;
}
.body-svg .body-part:hover, .body-svg .body-part.active {
    fill: var(--zone-hover-fill); stroke: var(--zone-hover-stroke);
    stroke-width: 1.5; filter: drop-shadow(0 0 5px rgba(52, 211, 153, 0.35));
}
.body-svg .label-text {
    font-size: 6.5px; fill: var(--label-color); pointer-events: none; text-anchor: middle;
}

/* PREDICTION PANEL */
.prediction-panel { flex: 1; max-width: 440px; min-width: 260px; }
.prediction-card {
    background: var(--bg-card); border: 1px solid var(--card-border);
    border-radius: 14px; padding: 22px; box-shadow: var(--shadow);
    transition: all 0.3s; position: sticky; top: 70px;
}
.prediction-card.active { border-color: var(--highlight-border); box-shadow: var(--shadow-lg); }
.prediction-card h2 { font-size: 1.15rem; font-weight: 700; color: var(--text-primary); margin-bottom: 5px; }
.prediction-card .subtitle {
    font-size: 0.8rem; color: var(--text-muted); margin-bottom: 14px;
    display: flex; align-items: center; gap: 5px; flex-wrap: wrap;
}
.badge { display: inline-block; padding: 2px 9px; border-radius: 12px; font-size: 0.7rem; font-weight: 600; }
.badge-effect-good { background: rgba(52,211,153,0.12); border: 1px solid rgba(52,211,153,0.4); color: #059669; }
.badge-effect-bad { background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.4); color: #ef4444; }
.badge-effect-mixed { background: rgba(249,148,35,0.12); border: 1px solid rgba(249,148,35,0.4); color: #e17055; }
.badge-view { background: rgba(249,148,35,0.12); border: 1px solid rgba(249,148,35,0.4); color: #e17055; }
.badge-gender-male { background: rgba(59,130,246,0.12); border: 1px solid rgba(59,130,246,0.4); color: #3b82f6; }
.badge-gender-female { background: rgba(236,72,153,0.12); border: 1px solid rgba(236,72,153,0.4); color: #ec4899; }
.prediction-section { margin-bottom: 12px; }
.prediction-section h3 { font-size: 0.82rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 5px; }
.prediction-section p { font-size: 0.88rem; line-height: 1.6; color: var(--text-secondary); }
.side-section { display: flex; gap: 8px; margin-top: 8px; }
.side-card {
    flex: 1; background: var(--side-card-bg); border: 1px solid var(--border-color);
    border-radius: 10px; padding: 10px;
}
.side-card h4 { font-size: 0.74rem; font-weight: 600; color: var(--text-muted); margin-bottom: 4px; }
.side-card p { font-size: 0.8rem; line-height: 1.5; color: var(--text-secondary); }
.default-message { text-align: center; padding: 24px 14px; }
.default-message .icon-large { font-size: 2.2rem; margin-bottom: 10px; opacity: 0.5; }
.default-message h2 { font-size: 1.05rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
.default-message p { font-size: 0.85rem; color: var(--text-muted); }
.info-guide {
    margin-top: 16px; padding: 12px; background: var(--side-card-bg);
    border-radius: 10px; border: 1px solid var(--border-color); text-align: left;
}
.info-guide h4 { font-size: 0.78rem; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; }
.info-row { display: flex; align-items: center; gap: 6px; margin-bottom: 3px; font-size: 0.76rem; color: var(--text-secondary); }
.info-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }

footer { text-align: center; padding: 16px; color: var(--text-muted); font-size: 0.72rem; border-top: 1px solid var(--border-color); margin-top: 16px; }

@media (max-width: 1100px) {
    .main-container { flex-direction: column; align-items: center; }
    .prediction-panel { min-width: unset; width: 100%; max-width: 500px; }
    .prediction-card { position: static; }
}
@media (max-width: 700px) {
    .body-svg { width: 160px; }
    .view-pair { gap: 8px; }
    .bodies-wrapper { gap: 8px; }
    .page-header h1 { font-size: 1.3rem; }
    .header-title { display: none; }
    .side-section { flex-direction: column; }
}
@media (max-width: 420px) {
    .body-svg { width: 130px; }
}
