
:root {
    --primary-color: #ffb347; /* Soft orange */
    --secondary-color: #ffd6e0; /* Light pink */
    --accent-color: #7ed6df; /* Pastel blue */
    --background-color: #f9fafb; /* Very light gray */
    --card-bg: #fff8e7;
    --shadow-color: rgba(255, 179, 71, 0.15);
    --border-color: #ffe0b2;
    --text-color: #3d3d3d;
}

body {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    margin: 0;
    padding: 0;
    background: var(--background-color);
    color: var(--text-color);
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 30px;
    background: #fff;
    border-radius: 32px;
    box-shadow: 0 8px 64px var(--shadow-color);
    margin-top: 60px;
    position: relative;
}

.container::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    border-radius: 40px;
    z-index: -1;
    opacity: 0.1;
}

.screen {
    display: none;
    text-align: center;
    animation: fadeIn 0.5s ease-in;
}

.screen.active {
    display: block;
}

.cards-container {
    display: flex;
    justify-content: space-around;
    margin: 40px 0;
}

.card {
    background: var(--card-bg);
    padding: 60px 40px;
    border-radius: 24px;
    border: 2px solid var(--border-color);
    box-shadow: 0 4px 24px var(--shadow-color);
    width: 280px;
    cursor: pointer;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    color: var(--text-color);
    text-align: center;
    font-size: 18px;
    font-weight: 500;
}

.card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, var(--accent-color) 0%, transparent 70%);
    opacity: 0.08;
    transform: rotate(45deg);
    pointer-events: none;
}

.card:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 8px 48px var(--shadow-color);
    border-color: var(--primary-color);
}


h1, h2 {
    color: var(--primary-color);
    background: none;
    text-shadow: 0 2px 8px var(--shadow-color);
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
}

button {
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 14px 32px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 16px;
    box-shadow: 0 4px 16px var(--shadow-color);
    transition: all 0.3s ease;
    font-family: inherit;
    letter-spacing: 0.5px;
    font-weight: 600;
    text-transform: uppercase;
    margin-top: 20px;
}

button:hover {
    background: var(--accent-color);
    color: #222;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 32px var(--shadow-color);
}

button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.loading::after {
    content: "...";
    animation: loading 1.5s infinite;
}

input {
    background: #fff;
    border: 2px solid var(--border-color);
    color: var(--text-color);
    padding: 14px 24px;
    border-radius: 30px;
    width: 80%;
    max-width: 350px;
    margin: 20px 0;
    font-size: 16px;
    box-shadow: 0 2px 12px var(--shadow-color);
    transition: all 0.3s ease;
    font-family: inherit;
}

input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 179, 71, 0.2);
}

p {
    font-size: 18px;
    color: var(--text-color);
    margin-bottom: 30px;
    text-align: center;
}

input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 179, 71, 0.2);
}

#results-screen {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 40px 0;
}

#results-screen.active {
    display: flex;
}

#compatibility-score {
    font-size: 24px;
    margin: 20px 0;
    color: var(--primary-color);
    background: none;
}

.progress-container {
    width: 80%;
    max-width: 400px;
    margin: 20px auto;
    background: var(--secondary-color);
    border-radius: 15px;
    padding: 4px;
    border: 1px solid var(--border-color);
    box-shadow: inset 0 0 10px var(--shadow-color);
}

.progress-bar {
    height: 20px;
    background: var(--primary-color);
    border-radius: 15px;
    transition: width 1s ease-in-out;
    box-shadow: 0 0 10px var(--shadow-color);
}

.choices-comparison-container {
    max-height: 300px;
    overflow-y: auto;
    width: 90%;
    max-width: 500px;
    margin: 20px 0;
    padding: 10px;
    /* Styling the scrollbar */
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) rgba(147, 51, 234, 0.1);
}

.comparison-card {
    background: var(--card-bg);
    border-radius: 15px;
    border: 1px solid var(--border-color);
    box-shadow: 0 0 10px var(--shadow-color);
    margin: 15px 0;
    padding: 15px;
}

.player-choice {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    margin: 5px 0;
}

.choice-label {
    font-size: 0.9em;
    color: var(--accent-color);
}

.choice-value {
    font-size: 1.1em;
    color: var(--primary-color);
}

.matching {
    background: var(--secondary-color);
    border-radius: 10px;
}

/* Scrollbar styling for webkit browsers */
.choices-comparison-container::-webkit-scrollbar {
    width: 8px;
}

.choices-comparison-container::-webkit-scrollbar-track {
    background: rgba(147, 51, 234, 0.1);
    border-radius: 4px;
}

.choices-comparison-container::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes loading {
    0% { content: "."; }
    33% { content: ".."; }
    66% { content: "..."; }
}

@keyframes twinkle {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

/* Media queries for responsive design */
@media screen and (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .cards-container {
        flex-direction: column;
        gap: 20px;
    }

    .card {
        width: auto;
        margin: 0 20px;
        padding: 30px;
        min-height: 100px;
    }

    input {
        width: 90%;
        font-size: 14px;
    }

    h1 {
        font-size: 24px;
    }

    h2 {
        font-size: 20px;
    }

    button {
        padding: 10px 20px;
        font-size: 14px;
        width: 90%;
        max-width: 300px;
    }

    .choices-comparison-container {
        width: 95%;
    }

    .comparison-card {
        padding: 10px;
    }

    .player-choice {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .choice-label {
        font-size: 0.8em;
    }

    .choice-value {
        font-size: 1em;
    }

    .progress-container {
        width: 90%;
    }

    #compatibility-score {
        font-size: 20px;
    }
}

/* Touch device optimizations */
@media (hover: none) {
    .card:hover {
        transform: none;
        box-shadow: 0 0 20px var(--shadow-color),
                    inset 0 0 20px rgba(147, 51, 234, 0.2);
    }

    .card:active {
        transform: scale(0.98);
    }

    button:hover {
        transform: none;
    }

    button:active {
        transform: scale(0.98);
    }
}
