:root {
    --primary-color: #ff6b6b;
    --secondary-color: #ff9ff3;
    --text-color: #2d3436;
    --white: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.25);
    --glass-border: rgba(255, 255, 255, 0.5);
    --shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

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

body {
    font-family: 'Montserrat', sans-serif;
    background: linear-gradient(45deg, #ff9a9e 0%, #fad0c4 99%, #fad0c4 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    overflow-y: auto;
    color: var(--text-color);
    padding: 2rem 0;
}

.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

/* Floating Hearts Animation */
.heart {
    position: absolute;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.4);
    transform: rotate(45deg);
    animation: float 15s linear infinite;
    bottom: -100px;
}

.heart:before,
.heart:after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: inherit;
    border-radius: 50%;
}

.heart:before {
    top: -10px;
    left: 0;
}

.heart:after {
    left: -10px;
    top: 0;
}

.x1 {
    left: 10%;
    width: 30px;
    height: 30px;
    animation-duration: 12s;
}

.x1:before,
.x1:after {
    width: 30px;
    height: 30px;
}

.x2 {
    left: 30%;
    width: 15px;
    height: 15px;
    animation-duration: 18s;
    animation-delay: 2s;
}

.x2:before,
.x2:after {
    width: 15px;
    height: 15px;
}

.x3 {
    left: 50%;
    width: 40px;
    height: 40px;
    animation-duration: 14s;
    animation-delay: 4s;
}

.x3:before,
.x3:after {
    width: 40px;
    height: 40px;
}

.x4 {
    left: 70%;
    width: 25px;
    height: 25px;
    animation-duration: 16s;
    animation-delay: 1s;
}

.x4:before,
.x4:after {
    width: 25px;
    height: 25px;
}

.x5 {
    left: 90%;
    width: 35px;
    height: 35px;
    animation-duration: 13s;
    animation-delay: 3s;
}

.x5:before,
.x5:after {
    width: 35px;
    height: 35px;
}

@keyframes float {
    0% {
        bottom: -100px;
        transform: rotate(45deg) translateX(0);
        opacity: 1;
    }

    100% {
        bottom: 100%;
        transform: rotate(45deg) translateX(-20px);
        opacity: 0;
    }
}

.container {
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    padding: 3rem;
    width: 90%;
    max-width: 500px;
    box-shadow: var(--shadow);
    text-align: center;
    position: relative;
    z-index: 10;
}

header h1 {
    font-family: 'Dancing Script', cursive;
    font-size: 4rem;
    color: var(--primary-color);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 0.5rem;
}

header p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: #555;
}

/* Form Styles */
.input-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #444;
}

input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.5);
    font-size: 1rem;
    color: #333;
    transition: all 0.3s ease;
    font-family: inherit;
}

input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--white);
    box-shadow: 0 0 10px rgba(255, 107, 107, 0.2);
}

select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.5);
    font-size: 1rem;
    color: #333;
    transition: all 0.3s ease;
    font-family: inherit;
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, #666 50%),
        linear-gradient(135deg, #666 50%, transparent 50%),
        linear-gradient(to right, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.2));
    background-position: calc(100% - 20px) calc(1em + 2px),
        calc(100% - 15px) calc(1em + 2px),
        0 0;
    background-size: 5px 5px, 5px 5px, 100% 100%;
    background-repeat: no-repeat;
}

select:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--white);
    box-shadow: 0 0 10px rgba(255, 107, 107, 0.2);
}

/* Textarea styles */
textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.5);
    font-size: 1rem;
    color: #333;
    transition: all 0.3s ease;
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
}

textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--white);
    box-shadow: 0 0 10px rgba(255, 107, 107, 0.2);
}

/* Link box for sharing */
.link-box {
    margin: 1rem 0;
}

.link-box input {
    width: 100%;
    padding: 12px;
    font-size: 0.9rem;
}

/* Message display box */
.message-box {
    background: rgba(255, 240, 245, 0.6);
    padding: 1.5rem;
    border-radius: 12px;
    border: 2px dashed var(--secondary-color);
    margin: 1rem 0;
}

/* Error message */
.error-msg {
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.icon-heart {
    font-size: 2rem;
    margin: -10px 0 10px;
    animation: beat 1s infinite alternate;
}

@keyframes beat {
    to {
        transform: scale(1.2);
    }
}

/* Button Styles */
button {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 50px;
    background: var(--primary-color);
    color: var(--white);
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    overflow: hidden;
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 1rem;
}

button:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

button:active {
    transform: translateY(1px);
}

/* Result Styles */
.result-container {
    margin-top: 2rem;
    perspective: 1000px;
}

.result-container.hidden {
    display: none;
}

.card {
    background: rgba(255, 255, 255, 0.9);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform-style: preserve-3d;
    animation: flipIn 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes flipIn {
    from {
        opacity: 0;
        transform: rotateX(-90deg);
    }

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

#resultTitle {
    font-family: 'Dancing Script', cursive;
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

#resultMessage {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

#resetBtn {
    background: var(--secondary-color);
    margin-top: 0;
    font-size: 1rem;
    padding: 10px;
}

.zodiac-actions {
    display: flex;
    justify-content: center;
}

.ghost-button {
    width: auto;
    padding: 8px 16px;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    background: rgba(255, 255, 255, 0.7);
    color: var(--text-color);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: none;
}

.ghost-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.zodiac-card {
    background: rgba(255, 255, 255, 0.95);
}

.zodiac-pair {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #444;
    margin-bottom: 0.5rem;
}

.zodiac-connector {
    color: var(--secondary-color);
}

.score-circle {
    width: 140px;
    height: 140px;
    margin: 1rem auto;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: conic-gradient(var(--primary-color) calc(var(--score, 0) * 1%), rgba(255, 255, 255, 0.6) 0);
    position: relative;
}

.score-circle::after {
    content: '';
    position: absolute;
    inset: 12px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
}

.score-text {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    font-weight: 600;
}

.score-text span {
    font-size: 1.8rem;
    color: var(--primary-color);
}

.score-text small {
    font-size: 0.8rem;
    color: #777;
    font-weight: 500;
}

.zodiac-vibe {
    font-family: 'Dancing Script', cursive;
    font-size: 2rem;
    color: var(--primary-color);
    margin-top: 0.5rem;
}

.zodiac-insight {
    font-size: 0.95rem;
    color: #666;
    margin-top: 0.5rem;
}

footer {
    margin-top: 2rem;
    font-size: 0.9rem;
    color: #666;
}

footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    width: 100%;
}

.feature-card {
    background: rgba(255, 255, 255, 0.6);
    padding: 1.5rem;
    border-radius: 15px;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.feature-card h2 {
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
    font-weight: 600;
}

.feature-card p {
    font-size: 0.8rem;
    color: #666;
}

.coming-soon {
    opacity: 0.7;
    cursor: default;
}

.coming-soon:hover {
    transform: none;
    background: rgba(255, 255, 255, 0.6);
}

/* Hidden class utility */
.hidden {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        width: 95%;
        padding: 2rem 1.5rem;
    }

    header h1 {
        font-size: 3rem;
    }

    header p {
        font-size: 1rem;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .feature-card {
        padding: 1.2rem;
    }

    .card-icon {
        font-size: 2rem;
    }

    #resultTitle {
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    body {
        padding: 1rem 0;
    }

    .container {
        padding: 1.5rem 1rem;
    }

    header h1 {
        font-size: 2.5rem;
    }

    button {
        font-size: 1rem;
        padding: 12px;
    }

    #resultTitle {
        font-size: 2rem;
    }
}