/* ============================================
   Star399 — 星隙 (Stellar Gap) Theme
   Deep Space + Editorial Typography
   ============================================ */

/* ---------- Base ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
    background: #090D14;
    color: #E2E8F0;
    font-family: 'Inter', 'Noto Sans SC', system-ui, sans-serif;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* subtle bg texture via radial gradient */
body::before {
    content: '';
    position: fixed; top: 0; left: 0; right: 0; height: 60vh;
    background: radial-gradient(ellipse at 50% 0%, rgba(6,182,212,0.04) 0%, transparent 70%);
    pointer-events: none; z-index: 0;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: #090D14; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.10); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.18); }

/* ---------- Typography ---------- */
h1, h2, h3 { font-family: 'DM Serif Display', 'Noto Serif SC', Georgia, serif; font-weight: 400; }
h1 { font-size: 3rem; line-height: 1.15; letter-spacing: -0.02em; color: #E2E8F0; }
h2 { font-size: 2.25rem; line-height: 1.2; color: #E2E8F0; }
h3 { font-size: 1.5rem; line-height: 1.3; color: #E2E8F0; }
h4 { font-family: 'Inter', sans-serif; font-weight: 600; font-size: 1.125rem; color: #E2E8F0; }
p  { line-height: 1.75; color: #94A3B8; }
a  { color: #06B6D4; text-decoration: none; transition: color 0.2s; }
a:hover { color: #22D3EE; }

/* ---------- Cards ---------- */
.card, .glass-card {
    background: #111827;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 16px;
    padding: 28px 32px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px rgba(0,0,0,0.25);
}
.card:hover, .glass-card:hover {
    background: #161E2C;
    border-color: rgba(255,255,255,0.10);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

/* ---------- Buttons ---------- */
.btn-primary {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 28px;
    background: linear-gradient(135deg, #06B6D4, #0891B2);
    color: #090D14; font-weight: 600; font-size: 0.95rem;
    border-radius: 12px; border: none; cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 20px rgba(6,182,212,0.12);
    text-decoration: none;
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 32px rgba(6,182,212,0.25);
    color: #090D14;
}
.btn-secondary {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 28px;
    background: #111827; color: #E2E8F0; font-weight: 500; font-size: 0.95rem;
    border-radius: 12px; border: 1px solid rgba(255,255,255,0.08); cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
}
.btn-secondary:hover {
    background: #161E2C;
    border-color: rgba(6,182,212,0.3);
    color: #22D3EE;
}

/* accent tag */
.accent-tag {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 12px; border-radius: 20px;
    background: rgba(129,140,248,0.12); color: #A5B4FC;
    font-size: 0.8rem; font-weight: 500;
}

/* ---------- Section Headings ---------- */
.section-heading {
    text-align: center; padding: 64px 0 32px;
}
.section-heading h2 {
    font-size: 2rem; margin-bottom: 10px;
}
.section-heading p {
    color: #64748B; font-size: 1rem; max-width: 560px;
    margin: 0 auto;
}

/* ---------- Cards Grid ---------- */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

/* ---------- Horoscope Card ---------- */
.horoscope-card {
    background: #111827;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 20px;
    padding: 36px 40px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0; transform: translateY(16px);
}
.horoscope-card.loaded {
    opacity: 1; transform: translateY(0);
}
.horoscope-card:hover {
    background: #161E2C;
    border-color: rgba(6,182,212,0.15);
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.5);
}
.color-swatch {
    display: inline-flex; align-items: center; padding: 6px 18px;
    border-radius: 20px; font-weight: 600; font-size: 0.85rem;
}
.harmony-bar {
    height: 6px; border-radius: 3px; background: rgba(255,255,255,0.06);
    overflow: hidden;
}
.harmony-progress {
    height: 100%; border-radius: 3px; transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Inputs ---------- */
input[type="text"], input[type="email"], input[type="password"], input[type="search"],
textarea, select {
    background: #0F1623;
    border: 1px solid rgba(255,255,255,0.06);
    color: #E2E8F0;
    border-radius: 10px;
    padding: 12px 16px;
    font-family: inherit; font-size: 0.95rem;
    transition: all 0.2s;
    outline: none;
}
input:focus, textarea:focus, select:focus {
    border-color: #06B6D4;
    box-shadow: 0 0 0 3px rgba(6,182,212,0.10);
}
textarea { resize: vertical; min-height: 100px; }
::placeholder { color: #475569; }

/* ---------- Toast ---------- */
.toast {
    position: fixed; top: 24px; right: 24px; z-index: 9999;
    padding: 14px 24px; border-radius: 12px;
    background: rgba(17,24,39,0.96);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 12px 32px rgba(0,0,0,0.5);
    animation: toastIn 0.3s ease;
    max-width: 360px; font-size: 0.9rem; color: #E2E8F0;
}
.toast-success { border-left: 3px solid #34D399; }
.toast-error   { border-left: 3px solid #FB7185; }
.toast-info    { border-left: 3px solid #06B6D4; }
.toast-warning { border-left: 3px solid #FBBF24; }

@keyframes toastIn {
    from { opacity: 0; transform: translateX(80px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ---------- Music Player ---------- */
#lyricsContent .lyric-line {
    padding: 4px 0; transition: all 0.3s ease; color: #64748B;
    font-size: 0.9rem; cursor: default;
}
#lyricsContent .lyric-line.active {
    color: #06B6D4; font-weight: 600; font-size: 1.05rem;
}

/* ---------- Loading ---------- */
.loading-spinner {
    width: 36px; height: 36px; border: 3px solid rgba(255,255,255,0.06);
    border-top-color: #06B6D4; border-radius: 50%;
    animation: spin-slow 0.8s linear infinite; margin: 0 auto;
}

/* ---------- Animations ---------- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes float {
    0%,100% { transform: translateY(0); }
    50%     { transform: translateY(-10px); }
}
@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
@keyframes glow-pulse {
    0%,100% { box-shadow: 0 0 20px rgba(6,182,212,0.12); }
    50%     { box-shadow: 0 0 40px rgba(6,182,212,0.22); }
}

.animate-fade-in   { animation: fadeInUp 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards; }
.animate-float     { animation: float 5s ease-in-out infinite; }
.animate-spin-slow { animation: spin-slow 20s linear infinite; }
.animate-glow      { animation: glow-pulse 3s ease-in-out infinite; }

/* ---------- Blog Content ---------- */
.blog-content h2 { font-size: 1.6rem; margin: 2em 0 0.5em; }
.blog-content h3 { font-size: 1.3rem; margin: 1.5em 0 0.5em; }
.blog-content p   { margin: 0.9em 0; line-height: 1.85; }
.blog-content img { max-width: 100%; border-radius: 14px; margin: 1.2em 0; }
.blog-content a   { color: #06B6D4; border-bottom: 1px solid rgba(6,182,212,0.3); }
.blog-content a:hover { border-bottom-color: #06B6D4; }
.blog-content blockquote {
    border-left: 3px solid #06B6D4; padding: 14px 24px;
    margin: 1.2em 0; background: rgba(6,182,212,0.04);
    border-radius: 0 10px 10px 0; color: #94A3B8;
    font-style: italic;
}
.blog-content pre {
    background: #0F1623; padding: 20px 24px; border-radius: 14px;
    overflow-x: auto; font-size: 0.85rem; border: 1px solid rgba(255,255,255,0.05);
}
.blog-content code { font-family: 'JetBrains Mono', 'Consolas', monospace; }

/* ---------- Gallery Image ---------- */
.img-hover-zoom { overflow: hidden; border-radius: 14px; }
.img-hover-zoom img { transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1); }
.img-hover-zoom:hover img { transform: scale(1.04); }

/* ---------- Divider ---------- */
.section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
    margin: 0 auto; max-width: 600px;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    h1 { font-size: 2.25rem; }
    h2 { font-size: 1.75rem; }
    .section-heading { padding: 48px 0 24px; }
    .horoscope-card { padding: 24px 20px; }
    .cards-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    h1 { font-size: 1.8rem; }
    .btn-primary, .btn-secondary { padding: 10px 20px; font-size: 0.9rem; }
}
