/* Love Compatibility Premium Design - Final Polish */

:root {
    --glass-surface-premium: rgba(20, 20, 35, 0.6);
    --glass-border-premium: rgba(255, 255, 255, 0.12);
    --primary-gradient: linear-gradient(135deg, #FFC857 0%, #D4AF37 100%);
    --secondary-gradient: linear-gradient(135deg, #BB86FC 0%, #7F39FB 100%);
    --bg-animation-duration: 60s;
}

body {
    background: #0b091e;
    min-height: 100vh;
}

/* --- Dynamic Background --- */
.cosmos-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: radial-gradient(circle at center, #1a1635 0%, #0b091e 100%);
}

.nebula-glow {
    position: absolute;
    width: 150%;
    height: 150%;
    top: -25%;
    left: -25%;
    background-image:
        radial-gradient(circle at 50% 50%, rgba(187, 134, 252, 0.15), transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 200, 87, 0.1), transparent 40%),
        radial-gradient(circle at 20% 80%, rgba(255, 117, 151, 0.1), transparent 40%);
    filter: blur(60px);
    animation: nebulaMove var(--bg-animation-duration) infinite alternate ease-in-out;
}

@keyframes nebulaMove {
    0% {
        transform: scale(1) rotate(0deg);
    }

    100% {
        transform: scale(1.1) rotate(5deg);
    }
}

/* --- Container & Typing --- */
.app-container {
    position: relative;
    z-index: 1;
}

.content-center {
    max-width: 700px;
    margin: 0 auto;
    width: 100%;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    text-align: center;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 0 20px rgba(255, 200, 87, 0.2));
}

.subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 3rem;
    font-weight: 300;
}

/* --- Premium Glass Form --- */
.glass-form {
    background: var(--glass-surface-premium);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid var(--glass-border-premium);
    border-radius: 30px;
    padding: 3rem;
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.5),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    width: 100%;
}

.form-section h3 {
    font-family: var(--font-display);
    color: #fff;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-section h3::before {
    content: '';
    display: block;
    width: 4px;
    height: 1.5rem;
    background: var(--secondary-gradient);
    border-radius: 2px;
}

/* Input Fields - Optimized for Touch */
.input-group {
    margin-bottom: 2rem;
}

.input-group label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.5rem;
    display: block;
}

input,
select {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.2rem 1.2rem;
    /* Larger touch target */
    font-size: 1.1rem;
    /* Readable text prevents zoom on iOS */
    color: #fff;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.2);
}

input:focus,
select:focus {
    border-color: #bb86fc;
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 0 3px rgba(187, 134, 252, 0.2);
    outline: none;
}

/* Button */
.btn-primary {
    width: 100%;
    margin-top: 2.5rem;
    padding: 1.5rem;
    /* Larger button */
    background: var(--primary-gradient);
    border: none;
    border-radius: 16px;
    color: #000;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    box-shadow: 0 10px 20px rgba(255, 200, 87, 0.2);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 40px rgba(255, 200, 87, 0.4);
    filter: brightness(1.1);
}

.btn-secondary {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 1rem 2rem;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
}

/* --- Wizard Styles --- */
.wizard-progress {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 2.5rem;
    gap: 1rem;
}

.step-dot {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.5);
    transition: all 0.4s ease;
}

.step-dot.active {
    background: var(--accent-gold);
    color: #000;
    border-color: var(--accent-gold);
    box-shadow: 0 0 10px rgba(255, 200, 87, 0.3);
}

.step-dot.current {
    box-shadow: 0 0 20px var(--accent-gold-glow);
    transform: scale(1.15);
    z-index: 2;
    animation: dotPulse 2s infinite;
}

@keyframes dotPulse {
    0% {
        box-shadow: 0 0 10px rgba(255, 200, 87, 0.4);
    }

    50% {
        box-shadow: 0 0 25px rgba(255, 200, 87, 0.8);
    }

    100% {
        box-shadow: 0 0 10px rgba(255, 200, 87, 0.4);
    }
}

.step-line {
    width: 50px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
}

.wizard-step {
    animation: fadeIn 0.5s ease forwards;
}

.wizard-step.hidden {
    display: none;
}

.wizard-nav {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    align-items: center;
}

.wizard-nav .btn-primary {
    margin-top: 0;
    /* Reset default margin */
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Mobile Optimizations --- */
@media (max-width: 768px) {
    .glass-form {
        padding: 1.5rem;
        border-radius: 20px;
        margin-top: 1rem;
    }

    .form-group-row {
        flex-direction: column;
        gap: 2.5rem;
    }

    input,
    select {
        padding: 1rem;
        font-size: 16px;
        /* Explicit 16px prevents iOS zoom */
    }

    .result-container {
        padding: 1rem;
    }

    .executive-summary {
        padding: 1.5rem !important;
    }
}

/* --- Shuffle Stage Card Styling --- */
#deck-container {
    width: 200px;
    height: 340px;
    margin: 4rem auto;
    position: relative;
}

.tarot-card {
    width: 200px !important;
    height: 340px !important;
    position: absolute;
    top: 0;
    left: 0;
}

.tarot-card .card-back {
    width: 100%;
    height: 100%;
}

/* --- Result Page Clean Redesign --- */

.result-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

.result-header {
    text-align: center;
    margin-bottom: 3rem;
}

.result-header h2 {
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    margin-bottom: 0.75rem;
    font-family: var(--font-display);
    background: linear-gradient(135deg, #fff 0%, #ffd700 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.report-meta {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 0.5rem;
    letter-spacing: 1px;
}

/* Glass Card Component */
.glass-card {
    background: rgba(25, 25, 40, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-radius: 20px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
}

/* Card Headers */
.card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.card-header.compact {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
}

.card-header h3,
.card-header h4 {
    margin: 0;
    font-size: 1.5rem;
    font-family: var(--font-display);
    color: #fff;
    font-weight: 600;
}

.card-header h4 {
    font-size: 1.1rem;
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.card-icon.small {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
}

.card-icon.success {
    background: rgba(76, 217, 100, 0.1);
    border-color: rgba(76, 217, 100, 0.3);
}

.card-icon.warning {
    background: rgba(255, 94, 94, 0.1);
    border-color: rgba(255, 94, 94, 0.3);
}

.card-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

/* Score Hero */
.score-hero {
    text-align: center;
    padding: 3rem 2rem;
    background: radial-gradient(circle at center, rgba(255, 200, 87, 0.08) 0%, rgba(25, 25, 40, 0.7) 70%);
    border-color: rgba(255, 200, 87, 0.2);
}

.score-ring-container {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.score-ring-track {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 6px solid rgba(255, 255, 255, 0.05);
}

/* Removed spinning animation - static ring looks cleaner */

.big-score {
    font-size: 4.5rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
    z-index: 2;
}

.score-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--accent-gold);
    font-weight: 700;
    margin-bottom: 1rem;
}

.score-description {
    font-size: 1.15rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
    max-width: 600px;
    margin: 0 auto;
}

/* Metrics Row - 3 Columns on Desktop */
.metrics-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .metrics-row {
        grid-template-columns: repeat(3, 1fr);
    }
}

.metric-card {
    padding: 2rem;
    margin-bottom: 0;
    text-align: center;
}

.zodiac-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.zodiac-sign {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.sign-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
}

.sign-element {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent-gold);
    opacity: 0.8;
}

.plus-sign {
    font-size: 1.5rem;
    opacity: 0.3;
    color: #fff;
}

.lifepath-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 1.5rem 0;
}

.path-number {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.path-number.match {
    border-color: #ffd700;
    background: rgba(255, 215, 0, 0.15);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
    color: #ffd700;
}

.connector-line {
    width: 40px;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
}

.intuition-value {
    font-size: 4rem;
    font-family: var(--font-display);
    color: #BB86FC;
    line-height: 1;
    margin: 1rem 0;
    text-shadow: 0 0 30px rgba(187, 134, 252, 0.4);
}

.metric-description {
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.75);
    margin: 0;
}

/* Tarot Card Section */
.tarot-card-section {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    background: linear-gradient(135deg, rgba(20, 20, 35, 0.7), rgba(40, 20, 60, 0.4));
    border-color: rgba(187, 134, 252, 0.2);
}

@media (min-width: 768px) {
    .tarot-card-section {
        flex-direction: row;
        align-items: center;
    }
}

.tarot-content-wrapper {
    flex: 1;
}

.tarot-card-name {
    font-size: 2.5rem;
    margin: 0 0 1.5rem 0;
    color: #BB86FC;
    font-family: var(--font-display);
    line-height: 1.2;
}

.tarot-meaning {
    font-size: 1.2rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    color: rgba(255, 255, 255, 0.95);
}

.tarot-note {
    font-size: 1rem;
    font-style: italic;
    color: rgba(255, 255, 255, 0.6);
    border-left: 3px solid #BB86FC;
    padding-left: 1.5rem;
    margin: 0;
}

.tarot-image-wrapper {
    flex: 0 0 240px;
    perspective: 1200px;
}

.tarot-image-wrapper img {
    width: 100%;
    max-width: 240px;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transform: rotateY(-10deg) rotateZ(2deg);
    transition: transform 0.6s ease;
}

.tarot-card-section:hover .tarot-image-wrapper img {
    transform: rotateY(0) scale(1.05);
}

/* Insights Lists */
.insights-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.insights-list li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    font-size: 1.05rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
}

.check-icon,
.alert-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: bold;
    flex-shrink: 0;
    margin-top: 2px;
}

.check-icon {
    background: rgba(76, 217, 100, 0.15);
    color: #4cd964;
}

.alert-icon {
    background: rgba(255, 94, 94, 0.15);
    color: #ff5e5e;
}

/* Action Steps */
.action-steps-section {
    border: 1px solid rgba(255, 200, 87, 0.3);
}

.action-steps {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .action-steps {
        grid-template-columns: repeat(3, 1fr);
    }
}

.action-step {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 2rem 1.5rem 1.5rem;
    position: relative;
    transition: background 0.3s ease;
}

.action-step:hover {
    background: rgba(255, 255, 255, 0.06);
}

.step-number {
    position: absolute;
    top: -16px;
    left: 1.5rem;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #FFC857 0%, #FFB100 100%);
    color: #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1.2rem;
    box-shadow: 0 6px 20px rgba(255, 200, 87, 0.5), 0 2px 8px rgba(0, 0, 0, 0.3);
    border: 3px solid #0b091e;
}

.action-step p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
}

/* Result Actions */
.result-actions {
    margin-top: 4rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.text-link {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.text-link:hover {
    color: var(--accent-gold);
}

@keyframes spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .result-container {
        padding: 2rem 1rem;
    }

    .glass-card {
        padding: 1.75rem;
    }

    .score-hero {
        padding: 2rem 1.5rem;
    }

    .metric-card {
        padding: 1.5rem;
    }

    .card-header h3 {
        font-size: 1.25rem;
    }

    .tarot-card-name {
        font-size: 2rem;
    }
}