/* === Xem Sao Hạn v2.0 — KTHDIGI Golden Template === */
@font-face{font-family:'Phudu';src:url('https://kth-electric.com/wp-content/fonts/DT-Phudu/DTPhudu-Bold.woff') format('woff');font-weight:700;font-display:swap}
@font-face{font-family:'Ganh';src:url('https://kth-electric.com/wp-content/fonts/Ganh/Ganh%20Type-Regular.otf') format('opentype');font-weight:400;font-display:swap}
:root {
  --bg: #060a12;
  --card: rgba(14,22,38,0.75);
  --card2: rgba(22,34,56,0.6);
  --border: rgba(255,255,255,0.08);
  --text: #e2e8f0;
  --muted: #8896ab;
  --p: #d4af37; /* Gold for astrology */
  --p2: #f1c40f;
  --accent: #e4405f;
  --success: #22c55e;
  --warn: #f59e0b;
  --danger: #ef4444;
  --radius: 16px;
  --glow: 0 0 20px rgba(212, 175, 55, 0.15);
}

[data-theme="light"] {
  --bg: #f4f7fb;
  --card: #ffffff;
  --card2: #ffffff;
  --border: rgba(0, 0, 0, 0.08);
  --text: #1e293b;
  --muted: #64748b;
  --p: #d4af37;
  --p2: #b8860b;
  --glow: 0 4px 15px rgba(212, 175, 55, 0.15);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Ganh', sans-serif; background: var(--bg); color: var(--text); line-height: 1.7; min-height: 100vh; display: flex; flex-direction: column; }
h1, h2, h3, h4, .logo, .brand-font { font-family: 'Phudu', sans-serif; }
a { text-decoration: none; color: inherit; }
.ic { display: inline-block; width: 1em; height: 1em; vertical-align: -.125em; fill: currentColor; }
.container { max-width: 800px; margin: 0 auto; padding: 0 20px; }

/* ANIMATED BACKGROUND */
body::before { content: ''; position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: -1; background: var(--bg); pointer-events: none; }
body::after { content: ''; position: fixed; top: -20%; left: -10%; width: 60vw; height: 60vw; max-width: 600px; max-height: 600px; border-radius: 50%; background: radial-gradient(circle, rgba(212,175,55,0.08), transparent 70%); filter: blur(80px); animation: bgFloat 20s ease-in-out infinite alternate; pointer-events: none; z-index: -1; }
@keyframes bgFloat { 0% { transform: translate(0,0) scale(1); } 100% { transform: translate(80px,60px) scale(1.15); } }

[data-theme="light"] body::before { background: var(--bg); }
[data-theme="light"] body::after { background: radial-gradient(circle, rgba(212,175,55,0.06), transparent 60%); }

/* HEADER KTHDIGI V2.0 */
.kth-header { background: rgba(6,10,18,0.9); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 1000; backdrop-filter: blur(15px); }
.header-inner { max-width: 1240px; margin: 0 auto; padding: 0 20px; height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.25rem; font-family: var(--heading); color: #fff; letter-spacing: 0.5px; }
.logo-icon { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--p), var(--p2)); display: flex; align-items: center; justify-content: center; font-size: 0.9rem; color: #fff; box-shadow: 0 0 15px rgba(212,175,55,0.4); }
.nav-desktop { display: flex; align-items: center; gap: 5px; }
.nav-desktop a { color: var(--muted); font-size: 0.9rem; padding: 8px 16px; border-radius: 99px; transition: 0.3s; font-weight: 600; }
.nav-desktop a i { margin-right: 6px; font-size: 0.85rem; }
.nav-desktop a:hover, .nav-desktop a.active { color: #000 !important; background: var(--p) !important; box-shadow: 0 4px 15px rgba(212,175,55,0.4) !important; }
.theme-btn { background: rgba(255,255,255,0.05); border: 1px solid var(--border); width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--muted); transition: 0.2s; }
.theme-btn:hover { background: var(--p); color: #000; border-color: var(--p); }
.hamburger { display: none; flex-direction: column; gap: 4px; background: none; border: 1px solid var(--border); padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.hamburger span { width: 18px; height: 2px; background: #fff; transition: 0.3s; display: block; }
.hamburger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.nav-mobile { display: none; position: fixed; top: 64px; left: 0; right: 0; z-index: 899; background: rgba(6,10,18,0.95); backdrop-filter: blur(15px); border-bottom: 1px solid var(--border); padding: 15px; flex-direction: column; gap: 8px; }
.nav-mobile.open { display: flex; }
.nav-mobile a { color: #fff; padding: 12px 16px; border-radius: 8px; font-size: 0.95rem; display: flex; align-items: center; gap: 12px; font-weight: 600; border: 1px solid transparent; }
.nav-mobile a i { width: 20px; text-align: center; }
.nav-mobile a.active, .nav-mobile a:hover { background: rgba(212,175,55,0.1); border-color: var(--p); color: var(--p); }

@media(max-width: 768px) {
    .nav-desktop { display: none; }
    .hamburger { display: flex; }
}

[data-theme="light"] .kth-header { background: rgba(255,255,255,0.9); }
[data-theme="light"] .logo { color: var(--p); }
[data-theme="light"] .logo span { color: #0f172a; }
[data-theme="light"] .logo:hover { color: #0f172a; }
[data-theme="light"] .theme-btn { color: #64748b; }
[data-theme="light"] .theme-btn:hover { background: rgba(0,0,0,0.05); color: var(--p); }
[data-theme="light"] .nav-mobile { background: rgba(255,255,255,0.95); }
[data-theme="light"] .nav-mobile a { color: #0f172a; }
[data-theme="light"] .hamburger span { background: #0f172a; }

/* HERO */
.hero { padding: 60px 0 40px; text-align: center; position: relative; overflow: hidden; }
.hero h1 { font-size: clamp(1.8rem, 5vw, 2.8rem); position: relative; z-index: 1; margin-bottom: 12px; background: linear-gradient(135deg, var(--p2) 0%, #fff 40%, var(--p) 70%, var(--accent) 100%); background-size: 300% auto; -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; animation: shimmer 5s linear infinite; }
.hero p { color: var(--muted); font-size: 1.05rem; max-width: 560px; margin: 0 auto; position: relative; z-index: 1; line-height: 1.7; }
@keyframes shimmer { to { background-position: 300% center; } }
[data-theme="light"] .hero h1 { background: linear-gradient(135deg, var(--p) 0%, #0f172a 40%, var(--p2) 70%, var(--accent) 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

/* SEARCH CARD */
.search-card { background: var(--card); border: 1px solid var(--border); padding: 30px; border-radius: 20px; box-shadow: 0 24px 64px rgba(0,0,0,.45); backdrop-filter: blur(20px); margin: 0 auto 40px; position: relative; z-index: 10; }
.form-group { margin-bottom: 20px; text-align: left; }
.form-group label { display: block; margin-bottom: 8px; color: var(--text); font-weight: 600; font-size: 0.95rem; }
.form-select { width: 100%; padding: 14px 18px; background: rgba(0,0,0,0.3); border: 2px solid var(--border); border-radius: 12px; color: var(--text); font-size: 1rem; font-family: inherit; outline: none; transition: all 0.3s; cursor: pointer; appearance: none; }
.form-select:focus { border-color: var(--p); box-shadow: 0 0 0 3px rgba(212,175,55,0.12); background: rgba(0,0,0,0.4); }
.form-select option { background: var(--bg); color: var(--text); }
.btn-primary { width: 100%; padding: 16px; background: linear-gradient(135deg, var(--p), var(--p2)); color: #000; border: none; border-radius: 12px; font-size: 1.1rem; font-weight: 700; font-family: 'Phudu', sans-serif; cursor: pointer; transition: all 0.3s; display: flex; align-items: center; justify-content: center; gap: 10px; letter-spacing: .5px; box-shadow: 0 4px 20px rgba(212,175,55,0.25); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 35px rgba(212,175,55,0.35); filter: brightness(1.05); }

[data-theme="light"] .search-card { background: rgba(255,255,255,0.95); box-shadow: 0 10px 40px rgba(0,0,0,0.08); }
[data-theme="light"] .form-group label { color: var(--text); }
[data-theme="light"] .form-select { background: #f8fafc; border-color: rgba(0,0,0,0.15); color: var(--text); }
[data-theme="light"] .form-select:focus { background: #fff; border-color: var(--p); box-shadow: 0 0 0 3px rgba(212,175,55,0.1); }
[data-theme="light"] .form-select option { background: #fff; color: var(--text); }
[data-theme="light"] .btn-primary { color: #fff; box-shadow: 0 4px 15px rgba(212,175,55,0.3); }

/* RESULT */
.result-box { display: none; animation: fadeUp .4s cubic-bezier(0.16,1,0.3,1); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.star-card { background: var(--card2); border: 1px solid var(--border); padding: 25px; border-radius: var(--radius); margin-bottom: 20px; backdrop-filter: blur(10px); }
.star-name { font-size: 28px; font-weight: 800; color: var(--p); margin: 10px 0; font-family: 'Phudu', sans-serif; text-align: center; text-transform: uppercase; letter-spacing: 2px; text-shadow: 0 0 10px rgba(212,175,55,0.3); }
.bad-star { color: var(--danger); text-shadow: 0 0 10px rgba(239,68,68,0.3); }
.good-star { color: var(--success); text-shadow: 0 0 10px rgba(34,197,94,0.3); }
.info-row { margin-bottom: 12px; color: var(--muted); font-size: 0.95rem; text-align: center; }
.highlight { color: #fff; font-weight: 700; font-size: 1.1rem; }
.desc-box { background: rgba(0,0,0,0.2); padding: 15px; border-radius: 10px; margin: 15px 0; border-left: 3px solid var(--p); font-size: 0.95rem; line-height: 1.6; }
.han-box { background: rgba(239,68,68,0.05); padding: 15px; border-radius: 10px; border-left: 3px solid var(--danger); text-align: left; }

[data-theme="light"] .star-card { background: #fff; border-color: rgba(0,0,0,0.08); box-shadow: 0 4px 12px rgba(0,0,0,0.03); }
[data-theme="light"] .highlight { color: var(--text); }
[data-theme="light"] .desc-box { background: rgba(212,175,55,0.05); color: #475569; }
[data-theme="light"] .ritual-box { background: #f8fafc !important; border-color: rgba(0,0,0,0.08) !important; }
[data-theme="light"] .han-box { background: rgba(239,68,68,0.03); border-color: var(--danger); }
[data-theme="light"] .extra-han-box { background: #f8fafc !important; border-color: rgba(0,0,0,0.08) !important; }
[data-theme="light"] .extra-han-box > div > div { background: #fff !important; border: 1px solid rgba(0,0,0,0.08) !important; border-left-width: 4px !important; }
[data-theme="light"] .extra-han-box strong { color: var(--text) !important; }

/* FOOTER */
.kth-footer { background: rgba(6,10,18,0.9); border-top: 1px solid var(--border); padding: 40px 0 24px; text-align: center; margin-top: auto; color: var(--muted); font-size: .85rem; backdrop-filter: blur(10px); }
.footer-links { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; margin-bottom: 14px; }
.footer-links a { color: var(--muted); transition: color 0.25s; }
.footer-links a:hover { color: var(--p2); }

[data-theme="light"] .kth-footer { background: #f8fafc; border-top-color: rgba(0,0,0,0.08); }

@media(max-width:768px) {
  .hero h1 { font-size: 1.8rem; }
  .search-card { padding: 20px; }
  .star-card { padding: 15px; }
}

/* SEO CONTENT HIDDEN */
.seo-content-wrapper { position: relative; max-width: 1200px; margin: 50px auto 40px; padding: 0 20px; }
.seo-content { height: 450px; overflow: hidden; transition: height 0.5s ease; position: relative; border-radius: 16px; border: 1px solid var(--border); background: #ffffff; content-visibility: auto; contain: paint; }
.seo-content::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 200px; background: linear-gradient(to bottom, transparent, #ffffff); pointer-events: none; transition: opacity 0.3s; }
.seo-content.expanded { height: auto; }
.seo-content.expanded::after { opacity: 0; display: none; }
.seo-readmore { text-align: center; margin-top: 25px; position: relative; z-index: 2; }
.seo-readmore button { background: linear-gradient(135deg, var(--p), var(--p2)); color: #000; border: none; padding: 14px 35px; border-radius: 99px; font-weight: 700; font-family: var(--heading); font-size: 1.05rem; cursor: pointer; transition: 0.3s; box-shadow: 0 4px 15px rgba(212,175,55,0.3); }
.seo-readmore button:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(212,175,55,0.4); }
