/* General Styles */
body {
    padding-top: 120px;
    font-family: Arial, sans-serif;
    margin: 0;
    background-color: #f4f4f9;
}

header {
    background-color: #4CAF50;
    color: white;
    padding: 15px 0;
    text-align: center;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

header h1 {
    margin: 0 0 15px 0;
}

.container {
    max-width: 1000px;
    margin: 20px auto;
    padding: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

h2 {
    color: #333;
}

.test-section, .explanation-section {
    margin-bottom: 20px;
}

/* Language Selector */
.lang-select {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 5px;
}

.lang-list {
    display: flex;
    gap: 15px;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 15px;
    border-radius: 25px;
}

.lang-list a {
    color: white;
    text-decoration: none;
    font-size: 0.9em;
    padding: 5px 12px;
    border-radius: 15px;
    transition: all 0.3s ease;
}

.lang-list a:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lang-list a.active {
    background: white;
    color: #4CAF50;
}

/* Test Container Styles */
#test-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 20px;
    background: #eee;
    border-radius: 10px;
    margin-bottom: 30px;
    position: relative;
}

.progress {
    width: 4%;
    height: 100%;
    background: #27ae60;
    border-radius: 10px;
    transition: width 0.3s ease;
}

#question-counter {
    position: absolute;
    right: 0;
    top: -25px;
    font-size: 0.9em;
    color: #666;
}

/* Question Container */
.question-container {
    text-align: center;
}

#current-question {
    font-size: 1.2em;
    margin-bottom: 30px;
    color: #2c3e50;
}

/* Likert Scale */
.likert-scale {
    margin: 30px 0;
}

.scale-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    color: #666;
    font-size: 0.9em;
}

.radio-group {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.radio-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

.radio-container input[type="radio"] {
    margin: 10px 0;
}

.radio-container span {
    background: #f5f6fa;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.radio-container:hover span {
    background: #e8e8e8;
}

input[type="radio"]:checked + span {
    background: #27ae60;
    color: white;
}

/* Navigation Buttons */
.navigation-buttons {
    margin-top: 30px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.navigation-buttons button {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    background: #27ae60;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.navigation-buttons button:hover {
    background: #219a52;
}

.navigation-buttons button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Results Section */
.hidden {
    display: none;
}

#results-section {
    text-align: center;
    margin: 40px 0;
}

.results-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

#dimension-scores {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    width: 100%;
    max-width: 800px;
}

.dimension-score {
    background: #f5f6fa;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.dimension-score h3 {
    color: #27ae60;
    margin: 0 0 10px 0;
}

#result-explanation {
    max-width: 800px;
    text-align: left;
    padding: 20px;
    background: #f5f6fa;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Retest Button */
.retest-button {
    margin-top: 30px;
    padding: 12px 24px;
    background-color: #27ae60;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.retest-button:hover {
    background-color: #219a52;
}

/* Privacy Notice Styling */
.privacy-notice {
    background-color: #f8f9fa;
    border-left: 4px solid #4CAF50;
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
}

.privacy-notice p {
    margin: 0;
    color: #2c3e50;
    font-size: 0.9em;
    line-height: 1.5;
}

/* Updated Footer Styling */
footer {
    text-align: center;
    padding: 20px;
    background-color: #333;
    color: white;
    width: 100%;
    position: static;
}

footer p {
    margin: 10px 0;
}

footer a {
    color: #4CAF50;
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: #45a049;
    text-decoration: underline;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    /* Header adjustments */
    header {
        padding: 10px 0;
    }

    header h1 {
        font-size: 1.5em;
        margin: 0 0 10px 0;
    }

    .lang-list {
        gap: 8px;
        padding: 5px 10px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .lang-list a {
        font-size: 0.8em;
        padding: 4px 8px;
    }

    /* Container adjustments */
    .container {
        margin: 10px;
        padding: 15px;
    }

    /* Test section adjustments */
    #test-container {
        padding: 10px;
    }

    #current-question {
        font-size: 1em;
        margin-bottom: 20px;
    }

    /* Likert scale adjustments */
    .likert-scale {
        margin: 20px 0;
    }

    .scale-labels {
        font-size: 0.8em;
    }

    .radio-group {
        gap: 5px;
    }

    .radio-container span {
        width: 35px;
        height: 35px;
        font-size: 0.9em;
    }

    /* Navigation buttons adjustments */
    .navigation-buttons {
        flex-direction: row;
        gap: 10px;
    }

    .navigation-buttons button {
        padding: 8px 15px;
        font-size: 0.9em;
        width: 50%;
    }

    /* Results section adjustments */
    #pentagon-chart {
        width: 100%;
        max-width: 300px;
        height: auto;
    }

    #dimension-scores {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .dimension-score {
        padding: 10px;
    }

    /* Privacy notice adjustments */
    .privacy-notice {
        padding: 10px;
        margin: 15px 0;
    }

    .privacy-notice p {
        font-size: 0.8em;
    }

    /* Footer adjustments */
    footer {
        padding: 15px;
        font-size: 0.9em;
    }

    footer p {
        margin: 5px 0;
    }
}

/* Extra small devices */
@media screen and (max-width: 375px) {
    body {
        padding-top: 100px;
    }

    header h1 {
        font-size: 1.3em;
    }

    .lang-list {
        gap: 5px;
    }

    .lang-list a {
        font-size: 0.75em;
        padding: 3px 6px;
    }

    .radio-container span {
        width: 30px;
        height: 30px;
        font-size: 0.8em;
    }

    .scale-labels {
        font-size: 0.7em;
    }

    #current-question {
        font-size: 0.9em;
    }
}

/* Ensure canvas is responsive */
canvas {
    max-width: 100%;
    height: auto;
}

/* Fix for iOS Safari 100vh issue */
@supports (-webkit-touch-callout: none) {
    .container {
        min-height: -webkit-fill-available;
    }
}

/* Improve touch targets on mobile */
button, 
.radio-container,
.lang-list a {
    min-height: 44px;  /* Minimum touch target size */
}

/* Prevent text overflow */
p, h1, h2, h3, span {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Ensure proper spacing in small screens */
section {
    margin-bottom: 1.5em;
}

/* Improve readability on mobile */
p, li {
    line-height: 1.5;
}

/* Explanation Section Styling */
.explanation-section {
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin: 30px 0;
}

.explanation-section h2 {
    color: #2c3e50;
    margin-bottom: 25px;
    font-size: 1.8em;
}

.explanation-section h3 {
    color: #27ae60;
    margin: 25px 0 15px;
    font-size: 1.4em;
}

.dimension-details, .importance-section, .development-tips {
    margin: 25px 0;
}

.intro-text {
    font-size: 1.1em;
    line-height: 1.6;
    color: #34495e;
    margin-bottom: 30px;
}

.explanation-section ul {
    padding-left: 20px;
    margin: 15px 0;
}

.explanation-section li {
    margin: 10px 0;
    line-height: 1.5;
    color: #2c3e50;
}

.explanation-section p {
    line-height: 1.6;
    color: #34495e;
    margin: 15px 0;
}

/* Responsive adjustments for the explanation section */
@media screen and (max-width: 768px) {
    .explanation-section {
        padding: 15px;
        margin: 20px 0;
    }

    .explanation-section h2 {
        font-size: 1.5em;
    }

    .explanation-section h3 {
        font-size: 1.2em;
    }

    .intro-text {
        font-size: 1em;
    }

    .explanation-section li {
        margin: 8px 0;
    }
}

/* Blog Link */
.blog-link {
    margin-top: 20px;
    padding: 10px;
    background-color: #f0f7f0;
    border-radius: 5px;
    text-align: center;
}

.blog-link a {
    color: #27ae60;
    font-weight: bold;
    text-decoration: none;
    transition: color 0.3s;
}

.blog-link a:hover {
    color: #219a52;
    text-decoration: underline;
}
