/* =============================================
   COSMIC CONNECTION — FUNKY GLOBAL STYLES
   ============================================= */

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

:root {
    --pink:    #ff2d78;
    --purple:  #9b27ff;
    --cyan:    #00d4ff;
    --yellow:  #ffdd00;
    --orange:  #ff6b2b;
    --green:   #00e676;
    --bg-dark: #0d0015;
    --bg-mid:  #1a0030;
    --card-bg: rgba(255,255,255,0.06);
    --card-border: rgba(255,255,255,0.12);
    --text-light: #f0e6ff;
    --text-muted: #b09ec7;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg-dark);
    color: var(--text-light);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* ---- ANIMATED BACKGROUND ---- */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 20% 10%, rgba(155,39,255,0.35) 0%, transparent 60%),
        radial-gradient(ellipse 70% 50% at 80% 80%, rgba(255,45,120,0.30) 0%, transparent 60%),
        radial-gradient(ellipse 60% 40% at 50% 40%, rgba(0,212,255,0.15) 0%, transparent 60%),
        linear-gradient(160deg, #0d0015 0%, #1a0030 40%, #0a001a 100%);
    z-index: 0;
    pointer-events: none;
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        radial-gradient(circle 1px at 15% 25%, rgba(255,221,0,0.6) 0%, transparent 100%),
        radial-gradient(circle 1px at 75% 15%, rgba(0,212,255,0.6) 0%, transparent 100%),
        radial-gradient(circle 1.5px at 40% 70%, rgba(255,45,120,0.7) 0%, transparent 100%),
        radial-gradient(circle 1px at 85% 55%, rgba(155,39,255,0.6) 0%, transparent 100%),
        radial-gradient(circle 1px at 60% 90%, rgba(255,107,43,0.5) 0%, transparent 100%),
        radial-gradient(circle 2px at 5% 80%, rgba(0,230,118,0.5) 0%, transparent 100%),
        radial-gradient(circle 1px at 95% 35%, rgba(255,221,0,0.5) 0%, transparent 100%),
        radial-gradient(circle 1.5px at 30% 45%, rgba(0,212,255,0.5) 0%, transparent 100%);
    z-index: 0;
    pointer-events: none;
    animation: twinkle 4s ease-in-out infinite alternate;
}

@keyframes twinkle {
    0%   { opacity: 0.5; }
    100% { opacity: 1; }
}

/* All content sits above the background */
header, main, footer, nav {
    position: relative;
    z-index: 1;
}

/* ---- RAINBOW GRADIENT TEXT ---- */
.rainbow-text {
    background: linear-gradient(90deg, var(--pink), var(--purple), var(--cyan), var(--yellow), var(--orange), var(--pink));
    background-size: 300% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: rainbow-shift 4s linear infinite;
}

@keyframes rainbow-shift {
    0%   { background-position: 0% center; }
    100% { background-position: 300% center; }
}

/* ---- GLOW TEXTS ---- */
.glow-pink  { text-shadow: 0 0 20px rgba(255,45,120,0.8), 0 0 40px rgba(255,45,120,0.4); }
.glow-cyan  { text-shadow: 0 0 20px rgba(0,212,255,0.8), 0 0 40px rgba(0,212,255,0.4); }

/* ---- FLOATING ANIMATION ---- */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(-2deg); }
    50%       { transform: translateY(-14px) rotate(2deg); }
}
.animate-float { animation: float 5s ease-in-out infinite; }

/* ---- FADE IN ---- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}
.animate-fade-in { animation: fadeInUp 0.7s ease-out forwards; }

/* ---- PULSE GLOW ---- */
@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(155,39,255,0.4), 0 0 60px rgba(255,45,120,0.2); }
    50%       { box-shadow: 0 0 40px rgba(155,39,255,0.8), 0 0 80px rgba(255,45,120,0.5); }
}

/* ---- SHAKE ANIMATION ---- */
@keyframes shake {
    0%,100% { transform: translateX(0); }
    20%      { transform: translateX(-4px) rotate(-1deg); }
    40%      { transform: translateX(4px)  rotate(1deg); }
    60%      { transform: translateX(-3px); }
    80%      { transform: translateX(3px); }
}
.shake { animation: shake 0.5s ease; }

/* ---- SCORE CIRCLE ---- */
#score-circle {
    transition: stroke-dashoffset 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 0 8px currentColor);
}

.animation-delay-2000 { animation-delay: 2s; }

/* ======================================
   TOP NAV BAR
   ====================================== */
.top-nav {
    background: rgba(255,255,255,0.04);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--card-border);
    padding: 12px 24px;
    display: flex;
    justify-content: center;
    gap: 32px;
}
.top-nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    transition: color 0.2s;
}
.top-nav a:hover { color: #fff; }
.top-nav a[aria-current="page"] {
    color: #fff;
    position: relative;
}
.top-nav a[aria-current="page"]::after {
    content: '';
    position: absolute;
    bottom: -14px;
    left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--pink), var(--purple));
    border-radius: 2px;
}

/* ======================================
   HEADER
   ====================================== */
.site-header {
    text-align: center;
    padding: 60px 20px 40px;
}

.site-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.4rem, 7vw, 5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 16px;
    display: block;
}

.site-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: var(--text-muted);
    max-width: 560px;
    margin: 0 auto 24px;
    line-height: 1.6;
}

.badge-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 0;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    border: 1px solid;
}
.badge-pink   { background: rgba(255,45,120,0.15);  border-color: rgba(255,45,120,0.4);  color: #ff7eb3; }
.badge-cyan   { background: rgba(0,212,255,0.12);   border-color: rgba(0,212,255,0.35);  color: #7ee8ff; }
.badge-yellow { background: rgba(255,221,0,0.12);   border-color: rgba(255,221,0,0.35);  color: #ffe869; }

/* ======================================
   MAIN LAYOUT
   ====================================== */
.main-wrap {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 20px 80px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* ======================================
   CARDS
   ====================================== */
.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    backdrop-filter: blur(16px);
    padding: 32px;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 40px rgba(155,39,255,0.2);
}

/* Card color accents */
.card::before {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 180px; height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(155,39,255,0.25) 0%, transparent 70%);
    pointer-events: none;
}

.card-pink::before   { background: radial-gradient(circle, rgba(255,45,120,0.3) 0%, transparent 70%); }
.card-cyan::before   { background: radial-gradient(circle, rgba(0,212,255,0.25) 0%, transparent 70%); }
.card-yellow::before { background: radial-gradient(circle, rgba(255,221,0,0.2) 0%, transparent 70%); }
.card-green::before  { background: radial-gradient(circle, rgba(0,230,118,0.2) 0%, transparent 70%); }

/* Corner accent bottom-left */
.card::after {
    content: '';
    position: absolute;
    bottom: -40px; left: -40px;
    width: 120px; height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0,212,255,0.15) 0%, transparent 70%);
    pointer-events: none;
}

/* ======================================
   CALCULATOR FORM
   ====================================== */
.calc-card {
    animation: pulse-glow 3s ease-in-out infinite;
}

.partner-block {
    border-radius: 18px;
    padding: 22px;
    border: 1px solid;
    position: relative;
    z-index: 1;
}

.partner-block.p1 {
    background: rgba(255,45,120,0.08);
    border-color: rgba(255,45,120,0.25);
}

.partner-block.p2 {
    background: rgba(155,39,255,0.08);
    border-color: rgba(155,39,255,0.25);
}

.partner-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.partner-num {
    width: 28px; height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 800;
    flex-shrink: 0;
}
.p1 .partner-num { background: var(--pink); color: #fff; }
.p2 .partner-num { background: var(--purple); color: #fff; }

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.form-grid .full { grid-column: 1 / -1; }

label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 6px;
}

input[type="text"],
input[type="date"],
select {
    width: 100%;
    padding: 11px 14px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 12px;
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    -webkit-appearance: none;
    appearance: none;
}

input[type="text"]::placeholder { color: rgba(255,255,255,0.3); }

input[type="text"]:focus,
input[type="date"]:focus,
select:focus {
    border-color: var(--purple);
    box-shadow: 0 0 0 3px rgba(155,39,255,0.25);
    background: rgba(255,255,255,0.10);
}

input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1) opacity(0.5);
    cursor: pointer;
}

select option {
    background: #1a0030;
    color: #fff;
}

.heart-divider {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin: 4px 0;
    position: relative;
    z-index: 2;
}

.heart-divider span {
    font-size: 1.8rem;
    animation: float 3s ease-in-out infinite;
    filter: drop-shadow(0 0 8px rgba(255,45,120,0.8));
}

/* ---- SUBMIT BUTTON ---- */
.calc-btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--pink) 0%, var(--purple) 50%, var(--cyan) 100%);
    background-size: 200% 200%;
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    cursor: pointer;
    position: relative;
    z-index: 1;
    transition: transform 0.2s, box-shadow 0.2s;
    animation: btn-shimmer 3s ease infinite;
    box-shadow: 0 4px 30px rgba(155,39,255,0.5);
    margin-top: 8px;
}

@keyframes btn-shimmer {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.calc-btn:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 8px 40px rgba(255,45,120,0.6);
}

.calc-btn:active { transform: translateY(0) scale(0.99); }

/* ======================================
   RESULTS SECTION
   ====================================== */
#results-section {
    text-align: center;
    padding-top: 28px;
    border-top: 1px solid rgba(255,255,255,0.08);
    margin-top: 20px;
}

.results-names {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.score-ring-wrap {
    position: relative;
    width: 160px;
    height: 160px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.score-ring-wrap svg {
    position: absolute;
    top: 0; left: 0;
    transform: rotate(-90deg);
    filter: drop-shadow(0 0 12px rgba(255,45,120,0.6));
}

.score-number {
    font-size: 3rem;
    font-weight: 900;
    line-height: 1;
}

.score-pct {
    font-size: 1.1rem;
    color: var(--text-muted);
    font-weight: 500;
}

.verdict-box {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 18px;
    padding: 22px 24px;
    text-align: left;
    margin-bottom: 20px;
}

.verdict-label {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.verdict-text {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-light);
    font-style: italic;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 12px;
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
}

.share-btn:hover {
    background: rgba(255,255,255,0.14);
    box-shadow: 0 4px 20px rgba(155,39,255,0.3);
    transform: translateY(-1px);
}

/* ======================================
   INFO SECTIONS
   ====================================== */
.section-label {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.label-pink   { color: var(--pink); }
.label-cyan   { color: var(--cyan); }
.label-yellow { color: var(--yellow); }
.label-green  { color: var(--green); }
.label-purple { color: #c084fc; }

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.4rem, 3.5vw, 1.9rem);
    font-weight: 700;
    margin-bottom: 14px;
    color: #fff;
}

.section-body {
    color: var(--text-muted);
    line-height: 1.75;
    font-size: 0.97rem;
}

.section-body strong { color: var(--text-light); }

/* ---- FORMULA BOX ---- */
.formula-box {
    background: rgba(0,0,0,0.4);
    border: 1px solid rgba(0,212,255,0.25);
    border-radius: 14px;
    padding: 18px 22px;
    margin: 20px 0;
    font-family: 'Courier New', monospace;
    font-size: 0.92rem;
    color: var(--cyan);
    line-height: 1.8;
    position: relative;
    overflow: hidden;
}

.formula-box::before {
    content: '{ formula }';
    position: absolute;
    top: 8px; right: 14px;
    font-size: 0.65rem;
    color: rgba(0,212,255,0.3);
    letter-spacing: 0.1em;
}

/* ---- HOW TO STEPS ---- */
.steps-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 12px;
}

.step-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.step-num {
    width: 36px; height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
    flex-shrink: 0;
}
.step-1 { background: rgba(255,45,120,0.2);  color: var(--pink);   border: 1px solid rgba(255,45,120,0.4); }
.step-2 { background: rgba(155,39,255,0.2);  color: #c084fc;       border: 1px solid rgba(155,39,255,0.4); }
.step-3 { background: rgba(0,212,255,0.15);  color: var(--cyan);   border: 1px solid rgba(0,212,255,0.35); }
.step-4 { background: rgba(255,221,0,0.15);  color: var(--yellow); border: 1px solid rgba(255,221,0,0.35); }
.step-5 { background: rgba(0,230,118,0.15);  color: var(--green);  border: 1px solid rgba(0,230,118,0.35); }

.step-content h3 {
    font-size: 0.97rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
}
.step-content p {
    font-size: 0.87rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ---- TIPS GRID ---- */
.tips-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 12px;
}

.tip-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 16px;
    transition: transform 0.2s, background 0.2s;
}
.tip-card:hover {
    transform: translateY(-2px);
    background: rgba(255,255,255,0.07);
}

.tip-emoji { font-size: 1.5rem; margin-bottom: 8px; display: block; }
.tip-card h3 { font-size: 0.9rem; font-weight: 700; color: #fff; margin-bottom: 4px; }
.tip-card p  { font-size: 0.82rem; color: var(--text-muted); line-height: 1.5; }

/* ---- SCORE TABLE ---- */
.score-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    font-size: 0.88rem;
}
.score-table th {
    padding: 10px 14px;
    text-align: left;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.score-table td {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    color: var(--text-light);
    line-height: 1.4;
}
.score-table tr:last-child td { border-bottom: none; }
.score-table .range-pill {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.82rem;
}

/* ---- FAQ ACCORDION ---- */
.faq-list { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }

.faq-item {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.faq-item.open { border-color: rgba(155,39,255,0.4); }

.faq-q {
    width: 100%;
    background: none;
    border: none;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: left;
    transition: background 0.2s;
}
.faq-q:hover { background: rgba(255,255,255,0.04); }

.faq-icon {
    width: 22px; height: 22px;
    border-radius: 50%;
    background: rgba(155,39,255,0.2);
    border: 1px solid rgba(155,39,255,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
    color: #c084fc;
    transition: transform 0.25s;
}
.faq-item.open .faq-icon { transform: rotate(45deg); }

.faq-a {
    display: none;
    padding: 0 18px 16px;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.7;
}
.faq-item.open .faq-a { display: block; }

/* ======================================
   FOOTER
   ====================================== */
.site-footer {
    background: rgba(0,0,0,0.5);
    border-top: 1px solid rgba(255,255,255,0.07);
    padding: 48px 20px 32px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 28px;
    margin-bottom: 24px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    transition: color 0.2s;
}
.footer-links a:hover { color: #fff; }

.footer-copy {
    color: rgba(255,255,255,0.3);
    font-size: 0.8rem;
    line-height: 1.6;
    max-width: 560px;
    margin: 0 auto;
}

/* ======================================
   BACK TO TOP
   ====================================== */
.back-to-top {
    position: fixed;
    bottom: 28px;
    right: 24px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--purple), var(--pink));
    color: #fff;
    border: none;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(155,39,255,0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
    transition: opacity 0.3s, transform 0.3s, box-shadow 0.2s;
    z-index: 999;
}
.back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}
.back-to-top:hover {
    box-shadow: 0 6px 28px rgba(255,45,120,0.6);
    transform: translateY(-2px);
}

/* ======================================
   RESPONSIVE
   ====================================== */
@media (max-width: 600px) {
    .form-grid { grid-template-columns: 1fr; }
    .form-grid .full { grid-column: 1; }
    .tips-grid { grid-template-columns: 1fr; }
    .card { padding: 22px 18px; }
    .top-nav { gap: 16px; padding: 10px 16px; flex-wrap: wrap; }
    .score-table { font-size: 0.82rem; }
    .score-table th, .score-table td { padding: 8px 10px; }
    .score-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .back-to-top { bottom: 18px; right: 14px; width: 40px; height: 40px; font-size: 1rem; }
}
