body {
    background-color: #121212;
    color: #e0e0e0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.container {
    background-color: #1e1e1e;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    max-width: 600px;
    width: 90%;
    text-align: center;
}

/* Specific styling for the result page to accommodate the chart */
.result-container {
    max-width: 800px; /* Wider for the chart */
}

h1 {
    color: #bb86fc;
    margin-bottom: 1.5rem;
}

h2 {
    color: #03dac6;
    margin-bottom: 1rem;
}

h3 {
    color: #cf6679;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #333;
    padding-bottom: 0.5rem;
}

p {
    line-height: 1.6;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.btn {
    background-color: #bb86fc;
    color: #000;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
    text-decoration: none;
    display: inline-block;
    margin: 5px;
}

.btn:hover {
    background-color: #9965f4;
}

.btn-secondary {
    background-color: #03dac6;
    color: #000;
}

.btn-secondary:hover {
    background-color: #018786;
}

/* Test Page Specifics */
.options-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 2rem;
}

.option-btn {
    background-color: #2d2d2d;
    color: #fff;
    border: 1px solid #bb86fc;
    padding: 12px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
}

.option-btn:hover, .option-btn.selected {
    background-color: #bb86fc;
    color: #000;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background-color: #2d2d2d;
    border-radius: 5px;
    margin-bottom: 2rem;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: #03dac6;
    width: 0%;
    transition: width 0.3s ease;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #1e1e1e;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    max-width: 400px;
    width: 80%;
    border: 1px solid #bb86fc;
}

/* Result Page Chart & Analysis */
.chart-wrapper {
    position: relative;
    width: 100%;
    height: 400px; /* Default height for desktop */
    margin-bottom: 2rem;
    background-color: #252525;
    border-radius: 10px;
    padding: 10px;
}

/* Mobile responsive adjustments for charts */
@media (max-width: 768px) {
    .chart-wrapper {
        height: 500px !important; /* Increase height for mobile to make charts bigger */
        padding: 5px;
    }
}

.center-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.2rem;
    font-weight: bold;
    color: #fff;
    background-color: rgba(0, 0, 0, 0.6);
    padding: 5px 10px;
    border-radius: 5px;
    pointer-events: none; /* Let clicks pass through */
    z-index: 10;
}

.score-summary {
    text-align: center;
    margin-bottom: 2rem;
}

.highlight {
    color: #bb86fc;
    font-weight: bold;
    font-size: 1.5rem;
}

.traits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    text-align: left;
    margin-bottom: 2rem;
}

.trait-card {
    background-color: #2d2d2d;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #bb86fc;
}

.trait-card h4 {
    margin-top: 0;
    color: #bb86fc;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.trait-score {
    font-size: 0.9rem;
    background-color: #1e1e1e;
    padding: 2px 8px;
    border-radius: 4px;
    color: #03dac6;
}

.all-traits-list {
    text-align: left;
    columns: 2; /* Split into two columns */
    list-style-position: inside;
    background-color: #2d2d2d;
    padding: 1.5rem;
    border-radius: 8px;
}

.all-traits-list li {
    margin-bottom: 0.5rem;
}

/* Loading Animation */
.loader-container {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto;
}

.circular-loader {
    animation: rotate 2s linear infinite;
    height: 100%;
    transform-origin: center center;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.loader-path {
    stroke-dasharray: 1, 200;
    stroke-dashoffset: 0;
    animation: dash 1.5s ease-in-out infinite, color 6s ease-in-out infinite;
    stroke-linecap: round;
}

.loader-percentage {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #03dac6;
    font-size: 1.2rem;
    font-weight: bold;
}

@keyframes rotate {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes dash {
    0% {
        stroke-dasharray: 1, 200;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 89, 200;
        stroke-dashoffset: -35px;
    }
    100% {
        stroke-dasharray: 89, 200;
        stroke-dashoffset: -124px;
    }
}

@keyframes color {
    100%,
    0% {
        stroke: #bb86fc;
    }
    40% {
        stroke: #03dac6;
    }
    66% {
        stroke: #cf6679;
    }
    80%,
    90% {
        stroke: #bb86fc;
    }
}
