/* ============================================================
   Aksara Langit — Global Stylesheet
   Dark midnight theme | Gold accent | Mobile-first
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;0,700;1,300;1,400&family=Inter:wght@300;400;500;600&display=swap');

/* ── Variables ── */
:root {
    --color-bg:          #0a0a1a;
    --color-bg-card:     #11112a;
    --color-bg-input:    #0d0d22;
    --color-gold:        #f5c842;
    --color-gold-light:  #fad96a;
    --color-gold-dim:    #c9a320;
    --color-text:        #e8e8f0;
    --color-text-muted:  #7878a0;
    --color-border:      #2a2a4a;
    --color-star:        rgba(245, 200, 66, 0.6);

    --font-heading: 'Cormorant Garamond', Georgia, serif;
    --font-body:    'Inter', system-ui, sans-serif;

    --radius:    12px;
    --radius-lg: 20px;
    --shadow:    0 4px 24px rgba(0, 0, 0, 0.5);

    --transition: 0.25s ease;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family:      var(--font-body);
    font-size:        16px;
    line-height:      1.6;
    color:            var(--color-text);
    background-color: var(--color-bg);
    min-height:       100vh;
    overflow-x:       hidden;
}

img, svg { display: block; max-width: 100%; }

a { color: var(--color-gold); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-gold-light); }

/* ── Starfield background ── */
.starfield {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.star {
    position: absolute;
    border-radius: 50%;
    background: white;
    animation: twinkle var(--dur, 3s) ease-in-out infinite;
    animation-delay: var(--delay, 0s);
    opacity: 0;
}

@keyframes twinkle {
    0%, 100% { opacity: 0;   transform: scale(0.8); }
    50%       { opacity: 0.8; transform: scale(1.2); }
}

/* ── Container ── */
.container {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* ── Typography ── */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
}

h1 { font-size: clamp(2rem, 6vw, 4rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.8rem); }
h3 { font-size: clamp(1.2rem, 3vw, 1.8rem); }

.text-gold { color: var(--color-gold); }
.text-muted { color: var(--color-text-muted); }
.text-center { text-align: center; }

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-gold) 0%, var(--color-gold-dim) 100%);
    color: #0a0a1a;
    font-weight: 600;
    box-shadow: 0 0 20px rgba(245, 200, 66, 0.25);
}
.btn-primary:hover {
    background: linear-gradient(135deg, var(--color-gold-light) 0%, var(--color-gold) 100%);
    color: #0a0a1a;
    box-shadow: 0 0 32px rgba(245, 200, 66, 0.45);
    transform: translateY(-2px);
}
.btn-primary:active { transform: translateY(0); }

.btn-outline {
    background: transparent;
    color: var(--color-gold);
    border: 1.5px solid var(--color-gold);
}
.btn-outline:hover {
    background: rgba(245, 200, 66, 0.1);
    color: var(--color-gold-light);
}

.btn-lg {
    padding: 18px 40px;
    font-size: 17px;
    border-radius: 14px;
}

.btn:disabled, .btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ── Forms ── */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-muted);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.form-control {
    background:    var(--color-bg-input);
    border:        1.5px solid var(--color-border);
    border-radius: var(--radius);
    color:         var(--color-text);
    font-family:   var(--font-body);
    font-size:     15px;
    padding:       12px 16px;
    width:         100%;
    transition:    border-color var(--transition), box-shadow var(--transition);
    outline:       none;
    -webkit-appearance: none;
}

.form-control:focus {
    border-color: var(--color-gold);
    box-shadow:   0 0 0 3px rgba(245, 200, 66, 0.12);
}

.form-control::placeholder { color: var(--color-text-muted); }

.form-control::-webkit-calendar-picker-indicator {
    filter: invert(1) sepia(1) saturate(3) hue-rotate(5deg);
    cursor: pointer;
}

select.form-control {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237878a0' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
    cursor: pointer;
}

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

.form-error {
    font-size: 12px;
    color: #f87171;
    display: none;
}
.form-error.visible { display: block; }

/* ── Cards ── */
.card {
    background:    var(--color-bg-card);
    border:        1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding:       28px;
    transition:    border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.card:hover {
    border-color: rgba(245, 200, 66, 0.3);
    transform:    translateY(-3px);
    box-shadow:   var(--shadow);
}

/* ── Site header ── */
.site-header {
    padding:         24px 0;
    border-bottom:   1px solid var(--color-border);
    position:        relative;
    z-index:         10;
}

.site-header .container {
    display:         flex;
    align-items:     center;
    justify-content: space-between;
}

.logo {
    font-family:     var(--font-heading);
    font-size:       1.5rem;
    font-weight:     700;
    color:           var(--color-gold);
    letter-spacing:  0.03em;
    text-decoration: none;
}

.logo span {
    color: var(--color-text);
    font-weight: 300;
}

.nav-links {
    display:     flex;
    gap:         28px;
    list-style:  none;
    align-items: center;
}

.nav-links a {
    color:       var(--color-text-muted);
    font-size:   14px;
    font-weight: 500;
    transition:  color var(--transition);
}
.nav-links a:hover { color: var(--color-gold); }

/* ── Section spacing ── */
.section {
    padding: 80px 0;
    position: relative;
    z-index: 1;
}

.section-label {
    font-size:       12px;
    font-weight:     600;
    letter-spacing:  0.12em;
    text-transform:  uppercase;
    color:           var(--color-gold-dim);
    margin-bottom:   12px;
}

.section-title {
    font-family: var(--font-heading);
    margin-bottom: 16px;
}

.section-sub {
    color:      var(--color-text-muted);
    max-width:  540px;
    font-size:  1.05rem;
    line-height: 1.7;
}

/* ── Loading spinner ── */
.spinner {
    display:          inline-block;
    width:            20px;
    height:           20px;
    border:           2.5px solid rgba(10, 10, 26, 0.3);
    border-top-color: #0a0a1a;
    border-radius:    50%;
    animation:        spin 0.7s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-overlay {
    display:         none;
    position:        fixed;
    inset:           0;
    background:      rgba(10, 10, 26, 0.85);
    z-index:         100;
    flex-direction:  column;
    align-items:     center;
    justify-content: center;
    gap:             20px;
    backdrop-filter: blur(4px);
}
.loading-overlay.active { display: flex; }

.loading-text {
    font-family: var(--font-heading);
    font-size:   1.4rem;
    color:       var(--color-gold);
    font-style:  italic;
}

.loading-spinner-lg {
    width:            56px;
    height:           56px;
    border:           3px solid rgba(245, 200, 66, 0.2);
    border-top-color: var(--color-gold);
    border-radius:    50%;
    animation:        spin 0.9s linear infinite;
}

/* ── Zodiac badge ── */
.zodiac-badge {
    display:       inline-flex;
    align-items:   center;
    gap:           6px;
    background:    rgba(245, 200, 66, 0.08);
    border:        1px solid rgba(245, 200, 66, 0.2);
    border-radius: 20px;
    padding:       5px 14px;
    font-size:     13px;
    color:         var(--color-gold);
}

/* ── Planet table ── */
.planet-table {
    width:           100%;
    border-collapse: separate;
    border-spacing:  0;
    font-size:       14px;
}

.planet-table th {
    color:         var(--color-text-muted);
    font-weight:   500;
    font-size:     11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding:       10px 12px;
    border-bottom: 1px solid var(--color-border);
    text-align:    left;
}

.planet-table td {
    padding:       10px 12px;
    border-bottom: 1px solid rgba(42, 42, 74, 0.5);
    vertical-align: middle;
}

.planet-table tr:last-child td { border-bottom: none; }

.planet-symbol {
    font-size: 1.2rem;
    width:     28px;
    display:   inline-block;
    text-align: center;
}

.retrograde-badge {
    font-size:     10px;
    color:         #f87171;
    background:    rgba(248, 113, 113, 0.1);
    border-radius: 4px;
    padding:       1px 5px;
    margin-left:   4px;
}

/* ── Footer ── */
.site-footer {
    border-top: 1px solid var(--color-border);
    padding:    40px 0;
    position:   relative;
    z-index:    1;
}

.site-footer .container {
    display:         flex;
    flex-direction:  column;
    align-items:     center;
    gap:             12px;
    text-align:      center;
}

.footer-tagline {
    color:     var(--color-text-muted);
    font-size: 13px;
    font-style: italic;
}

.footer-copy {
    color:     var(--color-text-muted);
    font-size: 12px;
}

/* ── Alert / Notice ── */
.alert {
    padding:       14px 18px;
    border-radius: var(--radius);
    font-size:     14px;
    margin-bottom: 16px;
    display:       flex;
    align-items:   flex-start;
    gap:           10px;
}

.alert-info {
    background: rgba(96, 165, 250, 0.08);
    border:     1px solid rgba(96, 165, 250, 0.25);
    color:      #93c5fd;
}

.alert-success {
    background: rgba(52, 211, 153, 0.08);
    border:     1px solid rgba(52, 211, 153, 0.25);
    color:      #6ee7b7;
}

.alert-error {
    background: rgba(248, 113, 113, 0.08);
    border:     1px solid rgba(248, 113, 113, 0.25);
    color:      #fca5a5;
}

/* ── Divider ── */
.divider {
    height:     1px;
    background: linear-gradient(to right, transparent, var(--color-border), transparent);
    margin:     40px 0;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .section { padding: 56px 0; }

    .nav-links { display: none; }

    .card { padding: 20px; }

    .btn-lg { padding: 16px 28px; font-size: 16px; }
}

@media (max-width: 480px) {
    body { font-size: 15px; }

    .container { padding: 0 16px; }
}
