:root {
    --primary-color: #3498db;
    --secondary-color: #2ecc71;
    --text-color: #333;
    --bg-color: #f9f9f9;
    --card-bg: #fff;
    --border-color: #ddd;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --slider-handle-color: #3498db;
    --transition: all 0.3s ease;
}

.dark-mode {
    --text-color: #f0f0f0;
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --border-color: #333;
    --shadow-color: rgba(0, 0, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    transition: var(--transition);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
header {
    background-color: var(--card-bg);
    box-shadow: 0 2px 10px var(--shadow-color);
    transition: var(--transition);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 1.5rem;
}

nav ul li a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
}

nav ul li a:hover {
    color: var(--primary-color);
}

.settings {
    display: flex;
    align-items: center;
}

#theme-toggle, #language-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-color);
    margin-left: 1rem;
    transition: var(--transition);
}

#theme-toggle:hover, #language-toggle:hover {
    color: var(--primary-color);
}

.language-selector {
    position: relative;
}

#current-language {
    font-weight: 600;
    font-size: 0.9rem;
}

/* Hero Section */
.hero {
    padding: 4rem 0;
    text-align: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
}

/* About Section */
.about {
    padding: 4rem 0;
    background-color: var(--bg-color);
}

.about h2, .comparison h2, .upload h2, .resources h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
}

.content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.text p, .text ul {
    margin-bottom: 1rem;
}

.text ul {
    padding-left: 2rem;
}

/* Comparison Section */
.comparison {
    padding: 1rem 0;
    background-color: var(--card-bg);
}

.comparison p {
    text-align: center;
    margin-bottom: 2rem;
}

.comparison-container {
    max-width: 800px;
    margin: 0 auto 3rem;
}

.comparison-slider {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 15px var(--shadow-color);
}

.img-container {
    position: relative;
    width: 100%;
    height: 400px;
}

.normal-img, .colorblind-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.colorblind-img {
    clip-path: polygon(50% 0, 100% 0, 100% 100%, 50% 100%);
    transition: opacity 0.2s ease;
}

.slider-handle {
    position: absolute;
    top: 0;
    left: 50%;
    width: 5px;
    height: 100%;
    background-color: white;
    transform: translateX(-50%);
    cursor: ew-resize;
    display: flex;
    justify-content: center;
    align-items: center;
}

.slider-line {
    position: absolute;
    width: 2px;
    height: 100%;
    background-color: white;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.slider-button {
    position: absolute;
    width: 40px;
    height: 40px;
    background-color: var(--slider-handle-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.labels {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    font-weight: 600;
}

/* Upload Section */
.upload {
    padding: 1rem 0;
    background-color: var(--bg-color);
}

.upload p {
    text-align: center;
    margin-bottom: 1.5rem;
}

.intensity-control {
    max-width: 600px;
    margin: 0 auto 2rem;
    text-align: center;
}

.slider-container {
    position: relative;
    width: 100%;
    align-items: center;
    gap: 10px;
}

.intensity-value {
    min-width: 50px;
    padding: 4px 8px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.9rem;
}

#apply-intensity {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

#apply-intensity:hover {
    background-color: var(--secondary-color);
}

#apply-intensity.highlight {
    animation: pulse 1.5s ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); box-shadow: 0 0 10px var(--primary-color); }
    100% { transform: scale(1); }
}

.intensity-control label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

#intensity-slider, #comparison-intensity-slider {
    width: 100%;
    height: 8px;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(to right, red,green);
    outline: none;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

#intensity-slider::-webkit-slider-thumb, #comparison-intensity-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--slider-handle-color);
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}

#intensity-slider::-moz-range-thumb, #comparison-intensity-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--slider-handle-color);
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}

.intensity-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text-color);
}

.upload-container {
    max-width: 400px;
    margin: 0 auto;
    text-align: center;
}

.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 3rem;
    margin: 1.5rem auto;
    cursor: pointer;
    transition: var(--transition);
    max-width: 800px;
}

.upload-area:hover {
    border-color: var(--primary-color);
}

.upload-area i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: block;
    text-align: center;
}

.btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn:hover {
    background-color: #2980b9;
}

.result-container {
    max-width: 800px;
    margin: 2rem auto 0;
}

/* Resources Section */
.resources {
    padding: 4rem 0;
    background-color: var(--card-bg);
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.resource-card {
    background-color: var(--bg-color);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 4px 10px var(--shadow-color);
    transition: var(--transition);
}

.resource-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px var(--shadow-color);
}

.resource-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.resource-card h3 {
    margin-bottom: 1rem;
}

/* Test Section */
.test {
    padding: 4rem 0;
    background-color: var(--card-bg);
}

.test h2 {
    text-align: center;
    margin-bottom: 1rem;
    font-size: 2rem;
}

.test p {
    text-align: center;
    margin-bottom: 2rem;
}

.test-container {
    max-width: 900px;
    margin: 0 auto 2rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px var(--shadow-color);
}

.test-iframe {
    width: 100%;
    height: 700px;
    border: none;
}

.test-disclaimer {
    font-size: 0.9rem;
    color: #777;
    font-style: italic;
    text-align: center;
    margin-top: 1rem;
}

/* Responsive adjustments for test iframe */
@media (max-width: 768px) {
    .test-iframe {
        height: 600px;
    }
}

@media (max-width: 480px) {
    .test-iframe {
        height: 500px;
    }
}

/* Legal Pages (Impressum & Datenschutz) */
.legal {
    padding: 4rem 0;
    background-color: var(--bg-color);
}

.legal h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
    color: var(--primary-color);
}

.legal-content {
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 4px 15px var(--shadow-color);
}

.legal-content .intro {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    line-height: 1.7;
    border-left: 4px solid var(--primary-color);
    padding-left: 1rem;
}

.legal-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.legal-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.legal-section h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    font-size: 1.3rem;
}

.legal-section h3 i {
    margin-right: 0.5rem;
}

.legal-section h4 {
    margin: 1.5rem 0 0.5rem;
    color: var(--text-color);
}

.legal-section p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.legal-section ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.legal-section ul li {
    margin-bottom: 0.5rem;
}

.rights-list {
    list-style: none;
    margin-left: 0 !important;
}

.rights-list li {
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
}

.rights-list li i {
    margin-right: 0.5rem;
    color: var(--primary-color);
    width: 20px;
    text-align: center;
}

.footer-links {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-color);
}

footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Logo Link Styling */
.logo a {
    text-decoration: none;
    color: var(--primary-color);
}

/* Footer */
footer {
    background-color: var(--card-bg);
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

/* FAQ Section */
.faq {
    padding: 4rem 0;
    background-color: var(--bg-color);
}

.faq h2 {
    text-align: center;
    margin-bottom: 1rem;
    font-size: 2rem;
}

.faq > .container > p {
    text-align: center;
    margin-bottom: 2.5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.faq-category {
    text-align: center;
    margin: 2rem 0 1.5rem;
    font-size: 1.5rem;
    color: var(--primary-color);
    position: relative;
}

.faq-category:after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 0.5rem auto 0;
    border-radius: 2px;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto 2rem;
}

.faq-item {
    margin-bottom: 1rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px var(--shadow-color);
    background-color: var(--card-bg);
    transition: all 0.3s ease;
}

.faq-item:hover {
    box-shadow: 0 4px 12px var(--shadow-color);
    transform: translateY(-2px);
}

.faq-question {
    padding: 1.2rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
}

.faq-question h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
}

.faq-question i {
    color: var(--primary-color);
    transition: transform 0.3s ease;
    min-width: 20px;
    text-align: center;
    margin-left: 15px;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    background-color: var(--card-bg);
}

.faq-item.active .faq-answer {
    padding: 1.5rem;
    max-height: 500px;
}

.faq-answer p {
    margin: 0;
    line-height: 1.6;
}

/* Responsive adjustments for FAQ */
@media (max-width: 768px) {
    .faq-question {
        padding: 1rem;
    }
    
    .faq-question h3 {
        font-size: 1rem;
    }
    
    .faq-item.active .faq-answer {
        padding: 1rem;
    }
    
    .faq-category {
        font-size: 1.3rem;
        margin: 1.5rem 0 1rem;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        width: 95%;
        padding: 0 10px;
    }
    
    header .container {
        flex-direction: row;
        padding: 0.8rem 10px;
    }
    
    .logo {
        font-size: 1.3rem;
    }
    
    .hero {
        padding: 2.5rem 0;
    }
    
    .hero h2 {
        font-size: 1.8rem;
        margin-bottom: 0.8rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .about, .comparison, .upload, .test, .faq, .resources {
        padding: 2rem 0;
    }
    
    .about h2, .comparison h2, .upload h2, .test h2, .faq h2, .resources h2 {
        font-size: 1.6rem;
        margin-bottom: 1.5rem;
    }
    
    .img-container {
        height: 300px;
    }
    
    .resources-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .intensity-control {
        margin: 0 auto 1.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        width: 100%;
        padding: 0 10px;
    }
    
    header .container {
        padding: 0.7rem 10px;
    }
    
    .logo {
        font-size: 1.2rem;
    }
    
    .img-container {
        height: 200px;
    }
    
    .upload-area {
        padding: 1.5rem;
    }
    
    .hero {
        padding: 2rem 0;
    }
    
    .hero h2 {
        font-size: 1.5rem;
    }
    
    .hero p {
        font-size: 0.95rem;
    }
    
    .about, .comparison, .upload, .test, .faq, .resources {
        padding: 1.5rem 0;
    }
    
    .slider-button {
        width: 32px;
        height: 32px;
    }
    
    .intensity-control label {
        margin-bottom: 0.3rem;
    }
    
    .intensity-value {
        min-width: 45px;
        padding: 3px 6px;
        font-size: 0.8rem;
    }
    
    #intensity-slider, #comparison-intensity-slider {
        height: 6px;
    }
}