/* Love Compatibility - Cosmic Romance Theme */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a0a2e 0%, #16213e 25%, #0f3460 50%, #533483 75%, #e94560 100%);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Animated Cosmic Background */
.cosmic-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.stars, .twinkling {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.stars {
    background: transparent url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><radialGradient id="star"><stop offset="0%" stop-color="%23fff" stop-opacity="1"/><stop offset="100%" stop-color="%23fff" stop-opacity="0"/></radialGradient></defs><circle cx="20" cy="20" r="1" fill="url(%23star)"/><circle cx="80" cy="40" r="0.8" fill="url(%23star)"/><circle cx="40" cy="60" r="1" fill="url(%23star)"/><circle cx="90" cy="80" r="0.5" fill="url(%23star)"/><circle cx="10" cy="90" r="0.8" fill="url(%23star)"/></svg>') repeat;
    background-size: 200px 200px;
}

.twinkling {
    background: transparent url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><radialGradient id="twinkle"><stop offset="0%" stop-color="%23ffb3d9" stop-opacity="1"/><stop offset="100%" stop-color="%23ffb3d9" stop-opacity="0"/></radialGradient></defs><circle cx="30" cy="30" r="0.5" fill="url(%23twinkle)"/><circle cx="70" cy="70" r="0.3" fill="url(%23twinkle)"/><circle cx="60" cy="20" r="0.4" fill="url(%23twinkle)"/></svg>') repeat;
    background-size: 300px 300px;
    animation: twinkle 8s linear infinite;
}

@keyframes twinkle {
    from { transform: translateX(0); }
    to { transform: translateX(-300px); }
}

/* Main Container */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 20px;
}

.back-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    color: #ffb3d9;
    text-decoration: none;
    font-size: 1.1em;
    transition: all 0.3s ease;
    padding: 10px 15px;
    border-radius: 20px;
    background: rgba(255, 179, 217, 0.1);
    backdrop-filter: blur(10px);
}

.back-btn:hover {
    background: rgba(255, 179, 217, 0.2);
    transform: translateX(-5px);
}

.header h1 {
    font-size: 3.5em;
    color: #fff;
    text-shadow: 2px 2px 10px rgba(233, 69, 96, 0.5);
    margin-bottom: 15px;
    background: linear-gradient(45deg, #ff6b9d, #ffc3e0, #ff6b9d);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: glow 3s ease-in-out infinite alternate;
}

@keyframes glow {
    from { text-shadow: 2px 2px 10px rgba(233, 69, 96, 0.5); }
    to { text-shadow: 2px 2px 20px rgba(233, 69, 96, 0.8), 0 0 30px rgba(255, 107, 157, 0.4); }
}

.subtitle {
    font-size: 1.3em;
    color: #ffb3d9;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Cosmic Cards */
.cosmic-card {
    background: rgba(13, 13, 30, 0.85);
    backdrop-filter: blur(15px);
    border-radius: 25px;
    border: 2px solid rgba(255, 179, 217, 0.3);
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 20px 50px rgba(233, 69, 96, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cosmic-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #ff6b9d, transparent, #ff6b9d);
    border-radius: 25px;
    z-index: -1;
    animation: borderGlow 3s linear infinite;
}

@keyframes borderGlow {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.7; }
}

.cosmic-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 60px rgba(233, 69, 96, 0.3);
}

/* Card Header */
.card-header {
    text-align: center;
    margin-bottom: 40px;
}

.heart-icon {
    font-size: 4em;
    margin-bottom: 20px;
    animation: heartbeat 2s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.card-header h2 {
    font-size: 2.5em;
    color: #fff;
    margin-bottom: 10px;
    text-shadow: 2px 2px 10px rgba(233, 69, 96, 0.5);
}

.card-header p {
    color: #ffb3d9;
    font-size: 1.2em;
}

/* Name Inputs */
.name-inputs {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.input-group {
    flex: 1;
    position: relative;
    min-width: 250px;
}

.input-group label {
    display: block;
    color: #ffb3d9;
    font-size: 1.1em;
    margin-bottom: 10px;
    font-weight: 500;
}

.input-group input {
    width: 100%;
    padding: 15px 20px 15px 50px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 179, 217, 0.3);
    border-radius: 15px;
    color: #fff;
    font-size: 1.2em;
    transition: all 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: #ff6b9d;
    box-shadow: 0 0 20px rgba(255, 107, 157, 0.3);
    background: rgba(255, 255, 255, 0.15);
}

.input-group input::placeholder {
    color: rgba(255, 179, 217, 0.7);
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 38px;
    font-size: 1.5em;
}

.heart-separator {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
}

.beating-heart {
    font-size: 2.5em;
    animation: beat 1.5s ease-in-out infinite;
}

@keyframes beat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.2) rotate(-5deg); }
    75% { transform: scale(1.1) rotate(5deg); }
}

/* Calculate Button */
.calculate-btn {
    width: 100%;
    padding: 20px;
    background: linear-gradient(135deg, #ff6b9d, #e94560, #ff6b9d);
    border: none;
    border-radius: 15px;
    color: #fff;
    font-size: 1.3em;
    font-weight: bold;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(233, 69, 96, 0.4);
}

.calculate-btn:active {
    transform: translateY(0);
}

.btn-sparkles {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.calculate-btn:hover .btn-sparkles {
    left: 100%;
}

/* Loading Animation */
.loading-section .cosmic-card {
    text-align: center;
    padding: 60px 40px;
}

.spinning-hearts {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 30px;
}

.heart {
    position: absolute;
    font-size: 2em;
    animation: spinHearts 3s linear infinite;
}

.heart1 { top: 0; left: 50%; transform: translateX(-50%); animation-delay: 0s; }
.heart2 { top: 50%; right: 0; transform: translateY(-50%); animation-delay: 0.75s; }
.heart3 { bottom: 0; left: 50%; transform: translateX(-50%); animation-delay: 1.5s; }
.heart4 { top: 50%; left: 0; transform: translateY(-50%); animation-delay: 2.25s; }

@keyframes spinHearts {
    0% { opacity: 1; transform: scale(1); }
    25% { opacity: 0.7; transform: scale(1.2); }
    50% { opacity: 0.4; transform: scale(0.8); }
    75% { opacity: 0.7; transform: scale(1.1); }
    100% { opacity: 1; transform: scale(1); }
}

.loading-animation h3 {
    color: #fff;
    font-size: 1.8em;
    margin-bottom: 15px;
}

.loading-animation p {
    color: #ffb3d9;
    font-size: 1.2em;
}

/* Results Section */
.results-header {
    text-align: center;
    margin-bottom: 40px;
}

.results-header h2 {
    font-size: 2.5em;
    color: #fff;
    margin-bottom: 20px;
    text-shadow: 2px 2px 10px rgba(233, 69, 96, 0.5);
}

.couple-names {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    font-size: 1.3em;
    color: #ffb3d9;
    flex-wrap: wrap;
}

.couple-names span {
    font-weight: bold;
    color: #fff;
    padding: 10px 20px;
    background: rgba(255, 107, 157, 0.2);
    border-radius: 25px;
    border: 1px solid rgba(255, 107, 157, 0.3);
}

.heart-connector {
    font-size: 1.5em;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Compatibility Score */
.compatibility-score {
    text-align: center;
    margin-bottom: 40px;
}

.score-circle {
    width: 200px;
    height: 200px;
    margin: 0 auto;
    border-radius: 50%;
    background: conic-gradient(from 0deg, #ff6b9d 0%, #e94560 var(--percentage, 0%), transparent var(--percentage, 0%));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    animation: scoreReveal 2s ease-out;
}

.score-circle::before {
    content: '';
    position: absolute;
    width: 160px;
    height: 160px;
    background: rgba(13, 13, 30, 0.9);
    border-radius: 50%;
    z-index: 1;
}

.score-number, .score-label {
    position: relative;
    z-index: 2;
}

.score-number {
    font-size: 3.5em;
    font-weight: bold;
    color: #fff;
    text-shadow: 2px 2px 10px rgba(233, 69, 96, 0.5);
}

.score-label {
    font-size: 1.1em;
    color: #ffb3d9;
    margin-top: -10px;
}

@keyframes scoreReveal {
    from { transform: scale(0) rotate(-180deg); }
    to { transform: scale(1) rotate(0deg); }
}

/* Compatibility Message */
.compatibility-message {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px;
    background: rgba(255, 107, 157, 0.1);
    border-radius: 20px;
    border: 1px solid rgba(255, 107, 157, 0.2);
}

.compatibility-message h3 {
    font-size: 2em;
    color: #fff;
    margin-bottom: 15px;
}

.compatibility-message p {
    font-size: 1.2em;
    color: #ffb3d9;
    line-height: 1.6;
}

/* Cosmic Insights */
.cosmic-insights h4 {
    color: #fff;
    font-size: 1.8em;
    text-align: center;
    margin-bottom: 25px;
    text-shadow: 2px 2px 10px rgba(233, 69, 96, 0.3);
}

.insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.insight-card {
    background: rgba(255, 107, 157, 0.1);
    border: 1px solid rgba(255, 107, 157, 0.2);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.insight-card:hover {
    background: rgba(255, 107, 157, 0.2);
    transform: translateY(-3px);
}

.insight-icon {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.insight-label {
    color: #ffb3d9;
    font-size: 1.1em;
    margin-bottom: 8px;
}

.insight-value {
    color: #fff;
    font-size: 1.3em;
    font-weight: bold;
}

/* Love Advice */
.love-advice h4 {
    color: #fff;
    font-size: 1.8em;
    text-align: center;
    margin-bottom: 20px;
    text-shadow: 2px 2px 10px rgba(233, 69, 96, 0.3);
}

.love-advice div {
    background: rgba(255, 107, 157, 0.1);
    border: 1px solid rgba(255, 107, 157, 0.2);
    border-radius: 15px;
    padding: 25px;
    color: #ffb3d9;
    font-size: 1.2em;
    line-height: 1.6;
    margin-bottom: 40px;
    text-align: center;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.action-btn {
    padding: 15px 30px;
    border: none;
    border-radius: 25px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.action-btn.primary {
    background: linear-gradient(135deg, #ff6b9d, #e94560);
    color: #fff;
}

.action-btn.secondary {
    background: transparent;
    color: #ff6b9d;
    border: 2px solid #ff6b9d;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(233, 69, 96, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header h1 {
        font-size: 2.5em;
    }
    
    .name-inputs {
        flex-direction: column;
        gap: 20px;
    }
    
    .heart-separator {
        order: 1;
        transform: rotate(90deg);
    }
    
    .input-group {
        min-width: 100%;
    }
    
    .insights-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-btn {
        width: 100%;
        justify-content: center;
    }
    
    .score-circle {
        width: 150px;
        height: 150px;
    }
    
    .score-circle::before {
        width: 120px;
        height: 120px;
    }
    
    .score-number {
        font-size: 2.5em;
    }
}

@media (max-width: 480px) {
    .cosmic-card {
        padding: 25px;
        margin-bottom: 20px;
    }
    
    .header h1 {
        font-size: 2em;
    }
    
    .subtitle {
        font-size: 1.1em;
    }
    
    .insights-grid {
        grid-template-columns: 1fr;
    }
}