:root {
    --primary-color: #2F4F4F;
    --secondary-color: #3d5c5c;
    --background-color: #ffffff;
    --text-color: #213547;
    --nav-color: #2F4F4F;
    --header-bg: #ffffff;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.5;
    margin: 0;
    min-height: 100vh;
    background-color: #eddfda;
    color: var(--text-color);
}

.site-header {
    background-color: var(--header-bg);
    padding: 1rem 0;
    border-bottom: 1px solid #eaeaea;
}

.site-title {
    font-size: 2.5rem;
    font-weight: bold;
    text-align: center;
    margin: 0;
    padding: 0.5rem 0;
    color: #1a1a1a;
}

.nav-bar {
    background-color: var(--nav-color);
    padding: 0.5rem 0;
    margin-bottom: 2rem;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 1rem;
}

#quiz-container, #results-container {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-top: 1rem;
}

h1, h2 {
    text-align: center;
    color: var(--nav-color);
    margin-bottom: 1.5rem;
}

.question {
    margin-bottom: 1.5rem;
}

.question h3 {
    color: var(--nav-color);
    margin-bottom: 1rem;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

button {
    background-color: var(--nav-color);
    color: white;
    border: none;
    padding: 0.8em 1.5em;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

button:hover {
    background-color: var(--secondary-color);
}

#navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 1.5rem;
}

.resource-link {
    color: var(--nav-color);
    text-decoration: none;
    margin: 0.5rem 0;
    display: block;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.resource-link:hover {
    background-color: #f5f5f5;
    color: var(--secondary-color);
}

select, input {
    width: 100%;
    padding: 0.8rem;
    margin: 0.5rem 0;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

select:focus, input:focus {
    outline: none;
    border-color: var(--nav-color);
    box-shadow: 0 0 0 2px rgba(47, 79, 79, 0.1);
}

.results {
    background-color: #f9f9f9;
    padding: 1.5rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

.results h3 {
    color: var(--nav-color);
    margin-bottom: 1rem;
}

.resources {
    border-top: 2px solid #eaeaea;
    padding-top: 1.5rem;
    margin-top: 1.5rem;
}

.strategy-section {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.strategy-content {
    margin-top: 1rem;
}

.strategy-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--nav-color);
    margin-bottom: 1rem;
}

.implementation-steps {
    background-color: white;
    border-radius: 6px;
    padding: 1.2rem;
    margin-top: 1rem;
}

.implementation-steps h4 {
    color: var(--nav-color);
    margin-bottom: 1rem;
    font-size: 1rem;
}

.steps-list {
    padding-left: 1.5rem;
    margin: 0;
}

.steps-list li {
    margin-bottom: 0.8rem;
    line-height: 1.4;
    color: #4a4a4a;
}

.steps-list li:last-child {
    margin-bottom: 0;
}

.explanation-section {
    background-color: #fff;
    border-left: 4px solid var(--nav-color);
    padding: 1.2rem;
    margin: 1.5rem 0;
}

.confidence-section {
    margin: 1.5rem 0;
    position: relative;
}

.confidence-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.confidence-info {
    cursor: pointer;
    background: var(--nav-color);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
}

.confidence-tooltip {
    display: none;
    position: absolute;
    background: white;
    border: 1px solid #ddd;
    padding: 1rem;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    width: 250px;
    z-index: 1000;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 0.5rem;
}

.confidence-tooltip.show {
    display: block;
}

.score-container {
    background-color: #e9ecef;
    border-radius: 4px;
    height: 2rem;
    overflow: hidden;
    margin-top: 0.5rem;
}

.score-bar {
    background-color: var(--nav-color);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    transition: width 0.5s ease-in-out;
}

.directory-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
}

.directory-section h2 {
    color: #2f4f4f;
    text-align: center;
    margin-bottom: 2rem;
}

.directory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.directory-item {
    text-align: center;
}

.directory-item a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
    display: block;
    padding: 1rem;
    background: #2f4f4f;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.directory-item a:hover {
    color: var(--secondary-color);
    background: #f1f5f9;
}

@media (max-width: 640px) {
    .directory-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .directory-item a {
        padding: 0.8rem;
    }
}

/* Progress indicator */
.progress-bar {
    background: #eee;
    height: 4px;
    border-radius: 2px;
    margin-bottom: 2rem;
    overflow: hidden;
}

.progress-fill {
    background: var(--nav-color);
    height: 100%;
    transition: width 0.3s ease;
}

.question-counter {
    text-align: right;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
}

/* Loading state */
.loading {
    display: none;
    text-align: center;
    padding: 2rem;
}

.loading.show {
    display: block;
}

.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--nav-color);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error message */
.error-message {
    color: #dc3545;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    display: none;
}

.error-message.show {
    display: block;
}

/* Mobile tooltip adjustments */
@media (max-width: 768px) {
    .confidence-tooltip {
        position: fixed;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        width: 90%;
        max-width: none;
        margin: 0 auto;
    }
    
    .confidence-tooltip::after {
        content: '×';
        position: absolute;
        right: 1rem;
        top: 0.5rem;
        font-size: 1.5rem;
        cursor: pointer;
    }
}