/* Fun Palette: Soft pinks, purples, gradients for that romantic whimsy */
body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 50%, #fecfef 100%);
    margin: 0;
    padding: 20px;
    color: #333;
    min-height: 100vh;
}

#container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    padding: 30px;
    text-align: center;
    border-bottom: 3px solid #ff6b6b;
    position: relative;
}



#progress {
    background: #f8f9fa;
    padding: 15px;
    text-align: center;
    border-bottom: 2px solid #e9ecef;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff6b6b, #4ecdc4);
    width: 0%;
    transition: width 0.5s ease;
}

.stage-info {
    font-weight: bold;
    color: #6c757d;
}

.quiz-section {
    padding: 40px;
    display: none;
}

/* Language Toggle Styling */
.language-toggle {
    position: absolute;
    top: 15px;
    left: 15px;
    display: flex;
    gap: 5px;
    background: rgba(255, 255, 255, 0.3);
    padding: 5px;
    border-radius: 25px;
    backdrop-filter: blur(10px);
    border-color: #333;
    border-width: 1px;
}

/* Theme Toggle Styling (mirrors language toggle) */
.theme-toggle {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    gap: 5px;
    background: rgba(255, 255, 255, 0.3);
    padding: 5px;
    border-radius: 25px;
    backdrop-filter: blur(10px);
    border-color: #333;
    border-width: 1px;
}

.language-toggle button {
    background: transparent;
    color: #495057;
    border: 2px solid transparent;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: bold;
    cursor: pointer;
    margin: 0;
}

.language-toggle button:hover {
    background: rgba(255, 255, 255, 0.5);
    border-width: 1px;
    border-color: #312e81 ;
    box-shadow: 0 2px 8px  #312e81 ;
}

.language-toggle button.active {
    background: white;
    color: #d63384;
    border-color: #d63384;
    box-shadow: 0 2px 8px rgba(214, 51, 132, 0.3);
}



.theme-toggle button {
    background: transparent;
    color: #495057;
    border: 2px solid transparent;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: bold;
    cursor: pointer;
    margin: 0;
}

.theme-toggle button:hover {
    background: rgba(255, 255, 255, 0.5);
    border-width: 1px;
    border-color: #312e81 ;
    box-shadow: 0 2px 8px  #312e81 ;
}

.theme-toggle button.active {
    background: white;
    color: #d63384;
    border-color: #d63384;
    box-shadow: 0 2px 8px rgba(214, 51, 132, 0.3);
}

h1 {
    padding: 15px;
    margin-top: 25px;
    color: #d63384;
    font-size: 2.5em;
}

header p {
    margin: 10px 0 0 0;
    color: #495057;
}

.quiz-section.active {
    display: block;
}

.question-card {
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    border: 2px solid #dee2e6;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
}

.question-text {
    font-size: 1.2em;
    font-weight: bold;
    color: #495057;
    margin-bottom: 20px;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option {
    display: flex;
    align-items: flex-start;
    padding: 15px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.option:hover {
    background: #e3f2fd;
    border-color: #2196f3;
    transform: translateX(5px);
}

.option.selected {
    background: linear-gradient(135deg, #ff9a9e, #fecfef);
    border-color: #d63384;
    color: white;
    font-weight: bold;
}

.option input[type="radio"] {
    margin-right: 12px;
    margin-top: 3px;
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.option label {
    cursor: pointer;
    flex: 1;
    line-height: 1.5;
}

button {
    background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1.1em;
    cursor: pointer;
    transition: transform 0.3s ease;
    margin: 10px;
}

button:hover {
    transform: scale(1.05);
}

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

.results-section {
    margin: 30px 0;
}

.results-section h3 {
    color: #d63384;
    text-align: center;
    margin-bottom: 20px;
}

#givingBars, #receivingBars {
    margin: 20px 0;
}

.score-container {
    margin: 15px 0;
}

.score-label {
    font-weight: bold;
    color: #495057;
    margin-bottom: 5px;
    display: flex;
    justify-content: space-between;
}

.score-bar {
    width: 100%;
    height: 25px;
    background: #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.score-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff6b6b, #4ecdc4);
    border-radius: 12px;
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
    color: white;
    font-weight: bold;
    font-size: 0.9em;
}

.ranked-list {
    max-width: 500px;
    margin: 20px auto;
}

.rank-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    margin: 8px 0;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #ff6b6b;
}

.rank-item:nth-child(1) {
    border-left-color: #ff6b6b;
    background: linear-gradient(90deg, #fff5f5, #f8f9fa);
}

.rank-item:nth-child(2) {
    border-left-color: #4ecdc4;
}

.rank-item:nth-child(3) {
    border-left-color: #fdcb6e;
}

.rank-number {
    font-weight: bold;
    color: #d63384;
    margin-right: 10px;
}

.rank-name {
    flex: 1;
}

.rank-score {
    font-weight: bold;
    color: #6c757d;
}

.match-tip {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 2px dashed #fdcb6e;
    border-radius: 15px;
    padding: 25px;
    margin: 30px 0;
}

.match-tip h3 {
    color: #856404;
    margin-top: 0;
}

.insight {
    margin: 15px 0;
    padding: 15px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 10px;
    line-height: 1.6;
}

.insight strong {
    color: #d63384;
}

.section-divider {
    border-top: 3px solid #ff6b6b;
    margin: 30px 0;
}

/* Intro section specific */
#intro {
    text-align: center;
}

#intro h2 {
    color: #d63384;
}

#intro p {
    font-size: 1.1em;
    line-height: 1.8;
    max-width: 600px;
    margin: 20px auto;
}

/* Responsive design */
@media (max-width: 600px) {
    body {
        padding: 10px;
    }

    #language-toggle {
        position: static;
        margin: 0 auto 15px auto;
        width: fit-content;
        border-color: #333;
        border-width: 1px;
    }

    #theme-toggle {
        position: static;
        margin: 0 auto 15px auto;
        width: fit-content;
        border-color: #333;
        border-width: 1px;
    }


    h1 {
        font-size: 1.8em;
    }
    
    .quiz-section {
        padding: 20px;
    }
    
    .option {
        padding: 12px;
    }
    
    button {
        padding: 12px 24px;
        font-size: 1em;
        
    }
    
   
    
    header {
        padding: 20px 15px;
    }
}

/* Dark Mode Theme: Elegant cold dark blue/purple tones */
body.dark {
    background: linear-gradient(135deg, #1e1e2e 0%, #27272a 50%, #1e1e2e 100%);
    color: #d4d4d8;
}

body.dark #container {
    background: #18181b;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

body.dark header {
    background: linear-gradient(135deg, #312e81 0%, #4c1d95 100%);
    border-bottom: 3px solid #a855f7;
}

body.dark #progress {
    background: #18181b;
    border-bottom: 2px solid #27272a;
}

body.dark .progress-bar {
    background: #27272a;
}

body.dark .progress-fill {
    background: linear-gradient(90deg, #a855f7, #6366f1);
}

body.dark .stage-info {
    color: #a1a1aa;
}

body.dark .language-toggle,
body.dark .theme-toggle {
    background: rgba(39, 39, 42, 0.5);
    border-color: #64748b;
}

body.dark .language-toggle button,
body.dark .theme-toggle button {
    color: #a1a1aa;
}

body.dark .language-toggle button:hover,
body.dark .theme-toggle button:hover {
    background: rgba(39, 39, 42, 0.8);
    border-width: 1px;
}

body.dark .language-toggle button.active,
body.dark .theme-toggle button.active {
    background: #27272a;
    color: #c084fc;
    border-color: #c084fc;
    box-shadow: 0 2px 8px rgba(192, 132, 252, 0.3);
}

body.dark h1 {
    color: #c084fc;
}

body.dark header p {
    color: #a1a1aa;
}

body.dark .question-card {
    background: linear-gradient(135deg, #18181b 0%, #27272a 100%);
    border: 2px solid #3f3f46;
}

body.dark .question-text {
    color: #a1a1aa;
}

body.dark .option {
    border: 2px solid #3f3f46;
    background: #18181b;
}

body.dark .option:hover {
    background: #3f3f46;
    border-color: #6366f1;
}

body.dark .option.selected {
    background: linear-gradient(135deg, #4c1d95, #6d28d9);
    border-color: #c084fc;
    color: #f4f4f5;
}

body.dark button {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #f4f4f5;
}

body.dark .results-section h3 {
    color: #c084fc;
}

body.dark .score-label {
    color: #a1a1aa;
}

body.dark .score-bar {
    background: #27272a;
}

body.dark .score-fill {
    background: linear-gradient(90deg, #a855f7, #6366f1);
    color: #f4f4f5;
}

body.dark .rank-item {
    background: #27272a;
    border-left: 4px solid #a855f7;
}

body.dark .rank-item:nth-child(1) {
    background: linear-gradient(90deg, #3f3f46, #27272a);
}

body.dark .rank-item:nth-child(2) {
    border-left-color: #6366f1;
}

body.dark .rank-item:nth-child(3) {
    border-left-color: #a5b4fc;
}

body.dark .rank-number {
    color: #c084fc;
}

body.dark .rank-score {
    color: #a1a1aa;
}

body.dark .match-tip {
    background: linear-gradient(135deg, #27272a 0%, #3f3f46 100%);
    border: 2px dashed #a5b4fc;
}

body.dark .match-tip h3 {
    color: #a5b4fc;
}

body.dark .insight {
    background: rgba(39, 39, 42, 0.6);
}

body.dark .insight strong {
    color: #c084fc;
}

body.dark .section-divider {
    border-top: 3px solid #a855f7;
}

body.dark #intro h2 {
    color: #c084fc;
}

body.dark #intro p {
    color: #a1a1aa;
}

/* Responsive overrides for dark mode */
@media (max-width: 600px) {
    body.dark .language-toggle,
    body.dark .theme-toggle {
        background: rgba(39, 39, 42, 0.5);
        border-color: #64748b;
    }
}