/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

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

html {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0f1f3d 0%, #1e3c72 50%, #2a5298 100%);
    background-attachment: fixed;
    background-position: top left;
    color: #ffffff;
    min-height: 100vh;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
    width: 100%;
}

/* Typography system */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 0.5em;
}

p, .question-explanation, .footer-text, .verantwoording-sub {
    line-height: 1.6;
    margin-bottom: 1em;
}

/* Specific heading styles */
h1 {
    font-size: 2.5rem;
    font-weight: 700;
}

h2 {
    font-size: 2rem;
    font-weight: 600;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
}

h4 {
    font-size: 1.25rem;
    font-weight: 600;
}

html, body { height: 100%; }

/* Screen reader only content */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Results table for screen readers */
.results-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.results-table th,
.results-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.results-table th {
    background: rgba(255, 107, 107, 0.1);
    font-weight: bold;
    color: #ff6b6b;
}

.results-table tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Theme results styling */
.theme-section {
    margin: 30px 0;
}

.theme-section h4 {
    color: #ff6b6b;
    margin-bottom: 15px;
    font-size: 18px;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 20px;
    flex: 1 0 auto;
}

/* Standardize all screen containers to same ACTUAL content width */
.verantwoording-container,
.changelog-container,
.welcome-screen,
.question-screen,
.results-screen,
.priority-screen,
.comparison-screen {
    width: 920px; /* Absolute width: 960px - 40px padding = 920px content */
    max-width: 920px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
    overflow-x: hidden; /* Prevent horizontal overflow */
    overflow-y: visible; /* Allow vertical scrolling and tooltips */
}

/* Responsive adjustments for different screen sizes */
@media (max-width: 1000px) {
    .verantwoording-container,
    .changelog-container,
    .welcome-screen,
    .question-screen,
    .results-screen,
    .priority-screen,
    .digital-agenda-screen,
    .comparison-screen {
        width: 90vw;
        max-width: 90vw;
        padding: 20px;
        overflow-x: hidden;
    }
}

@media (max-width: 768px) {
    .verantwoording-container,
    .changelog-container,
    .welcome-screen,
    .question-screen,
    .results-screen,
    .priority-screen,
    .digital-agenda-screen,
    .comparison-screen {
        width: 95vw;
        max-width: 95vw;
        padding: 15px;
        overflow-x: hidden;
    }
}

/* iPhone 16 Pro and similar devices (393px) */
@media (max-width: 393px) {
    .verantwoording-container,
    .changelog-container,
    .welcome-screen,
    .question-screen,
    .results-screen,
    .priority-screen,
    .digital-agenda-screen,
    .comparison-screen {
        width: 100vw;
        max-width: 100vw;
        padding: 8px 8px 8px 4px; /* Minder padding links (4px) dan rechts (8px) */
        margin: 0;
        overflow-x: hidden;
    }
    
    /* Ensure no horizontal overflow */
    body {
        overflow-x: hidden;
    }
    
    /* Force all elements to stay within viewport */
    * {
        max-width: 100vw;
    }
    
    /* Adjust font sizes for better fit */
    .welcome-screen h1 {
        font-size: 1.6rem;
    }
    
    .question-text {
        font-size: 1rem;
        line-height: 1.3;
    }
    
    .slider-value {
        font-size: 2.2rem;
    }
    
    .slider-label-left, .slider-label-right {
        font-size: 1.8rem;
        max-width: 45px; /* Zeer compact voor iPhone 16 Pro */
    }
    
    .slider-header {
        gap: 6px; /* Minimale gap voor iPhone 16 Pro */
        justify-content: space-between;
        align-items: center;
    }
    
    .slider-value {
        min-width: 45px;
        font-size: 2rem; /* Behoud leesbaarheid */
    }
    
    .action-btn {
        width: 160px;
        min-width: 160px;
        max-width: 160px;
        padding: 10px 20px;
        font-size: 1rem;
    }
    
    .results-buttons .action-btn {
        flex: 0 0 160px;
    }
    
    /* Better table handling for small screens */
    .comparison-table {
        font-size: 0.75rem;
    }
    
    .comparison-table th,
    .comparison-table td {
        padding: 6px 4px;
        min-width: 60px;
    }

    .breakdown-table {
        font-size: 0.75rem;
    }
    
    .breakdown-table th,
    .breakdown-table td {
        padding: 6px 4px;
        min-width: 60px;
    }
    
    .comparison-table th:first-child,
    .comparison-table td:first-child {
        max-width: 100px;
        word-wrap: break-word;
    }
    
    /* Improve tooltip positioning */
    .tooltip-content {
        max-width: 250px;
        min-width: 180px;
        font-size: 12px;
        padding: 10px 12px;
    }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
    .verantwoording-container,
    .changelog-container,
    .welcome-screen,
    .question-screen,
    .results-screen,
    .priority-screen,
    .digital-agenda-screen,
    .comparison-screen {
        width: 98vw;
        max-width: 98vw;
        padding: 10px 10px 10px 6px; /* Minder padding links (6px) dan rechts (10px) */
        overflow-x: hidden;
    }
    
    /* Improve touch targets */
    .action-btn, .nav-btn, .start-btn {
        min-height: 48px;
        min-width: 48px;
        padding: 14px 20px;
    }
    
    /* Better spacing for small screens */
    .slider-container {
        padding: 20px 15px;
        margin: 20px 0;
    }
    
    .party-card {
        padding: 15px;
        gap: 12px;
    }
    
    .party-logo {
        width: 60px;
        height: 60px;
    }
}

/* Very small mobile devices */
@media (max-width: 360px) {
    .verantwoording-container,
    .changelog-container,
    .welcome-screen,
    .question-screen,
    .results-screen,
    .priority-screen,
    .digital-agenda-screen,
    .comparison-screen {
        width: 100vw;
        max-width: 100vw;
        padding: 8px 8px 8px 3px; /* Nog minder padding links (3px) dan rechts (8px) */
        overflow-x: hidden;
    }
    
    .slider-container {
        padding: 15px 10px;
    }
    
    .welcome-features {
        gap: 15px;
    }
    
    .feature-item {
        min-width: 100px;
        padding: 12px;
    }
}

/* Grow page containers to push footer */
.verantwoording-container,
.changelog-container {
    flex: 1 0 auto;
    background: linear-gradient(135deg, #0f1f3d 0%, #1e3c72 100%);
}

.welcome-screen {
    text-align: center;
}

.welcome-screen h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    background: linear-gradient(45deg, #00d4ff, #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.welcome-screen p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: #e0e0e0;
}

.start-btn {
    background: linear-gradient(45deg, #00d4ff, #ff6b6b);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.2rem;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    font-weight: bold;
    margin-top: 30px;
    margin-bottom: 20px;
}

.start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.start-btn:focus {
    outline: 3px solid #ffffff;
    outline-offset: 3px;
    box-shadow: 0 0 0 6px rgba(0, 212, 255, 0.8), 0 10px 25px rgba(255, 107, 107, 0.4);
}

.party-positions-btn {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 12px 24px;
    font-size: 1rem;
    border-radius: 25px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
    margin-top: 20px;
}

.party-positions-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    color: white;
}

.party-positions-btn:focus {
    outline: 3px solid #ffffff;
    outline-offset: 3px;
    box-shadow: 0 0 0 6px rgba(0, 212, 255, 0.8), 0 4px 15px rgba(0, 0, 0, 0.2);
}

.digital-agenda-btn {
    display: inline-block;
    background: linear-gradient(135deg, #4a9eff 0%, #6bb6ff 100%);
    color: #ffffff;
    border: 1px solid #4a9eff;
    padding: 12px 24px;
    font-size: 1rem;
    border-radius: 25px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 600;
    margin-top: 12px;
    margin-left: 12px;
    box-shadow: 0 4px 15px rgba(74, 158, 255, 0.3);
}

.digital-agenda-btn:hover {
    background: linear-gradient(135deg, #6bb6ff 0%, #8cc8ff 100%);
    border-color: #6bb6ff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 158, 255, 0.4);
    color: white;
}

.digital-agenda-btn:focus {
    outline: 3px solid #ffffff;
    outline-offset: 3px;
    box-shadow: 0 0 0 6px rgba(0, 212, 255, 0.8), 0 6px 20px rgba(74, 158, 255, 0.4);
}

.question-screen {
    display: none;
}

.question-header {
    text-align: center;
    margin-bottom: 40px;
}

.question-number {
    font-size: 1.1rem;
    color: #00d4ff;
    margin-bottom: 10px;
}

.question-text {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 20px;
    line-height: 1.3;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.question-explanation {
    font-size: 1rem;
    color: #b0b0b0;
    max-width: 800px;
    margin: 0 auto;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Question transition states */
.question-text.fade-out,
.question-explanation.fade-out {
    opacity: 0;
    transform: translateY(-10px);
}

.question-text.fade-in,
.question-explanation.fade-in {
    opacity: 1;
    transform: translateY(0);
}

/* Logo focus styling */
.welcome-logo a:focus {
    outline: 3px solid rgba(0, 212, 255, 0.8);
    outline-offset: 3px;
    border-radius: 8px;
}

/* Close button styling */
.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 107, 107, 0.2);
    border: 2px solid rgba(255, 107, 107, 0.4);
    color: #ff6b6b;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 18px;
    font-weight: bold;
}

.close-btn:hover {
    background: rgba(255, 107, 107, 0.3);
    border-color: rgba(255, 107, 107, 0.6);
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.close-btn:focus {
    outline: 3px solid #ffffff;
    outline-offset: 3px;
    box-shadow: 0 0 0 6px rgba(0, 212, 255, 0.8), 0 4px 15px rgba(255, 107, 107, 0.3);
}

/* Mobile responsive close button */
@media (max-width: 768px) {
    .close-btn {
        width: 36px;
        height: 36px;
        font-size: 16px;
        top: 15px;
        right: 15px;
    }
}

/* Progress text animation */
.progress-text {
    transition: all 0.3s ease;
}

.progress-text.updating {
    color: #00d4ff;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
    transform: scale(1.05);
}

/* Nieuwe Slider Container */
.slider-container {
    margin: 40px 0;
    text-align: center;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    padding: 30px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    position: relative;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    overflow-x: hidden;
    width: 100%;
    box-sizing: border-box;
}

/* Slider Track */
.slider-track {
    position: relative;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    margin: 30px 0;
    overflow: visible;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
    cursor: grab;
    transition: all 0.2s ease;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    /* Improve touch targets while keeping visual size small */
    min-height: 8px; /* Keep visual height small */
    padding: 12px 0; /* Add invisible padding for better touch area */
    -webkit-tap-highlight-color: transparent; /* Remove tap highlight on iOS */
    touch-action: none; /* Prevent default touch behaviors */
}

.slider-track:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scaleY(1.2);
}

.slider-track:active {
    cursor: grabbing;
}

.slider-track.dragging {
    background: rgba(255, 255, 255, 0.2);
    transform: scaleY(1.3);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

/* Slider Progress Fill */
.slider-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, #00d4ff 0%, #ff6b6b 100%);
    border-radius: 10px;
    transition: width 0.5s ease;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

.progress-fill.updating {
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.6);
    animation: progressPulse 0.5s ease;
}

@keyframes progressPulse {
    0% { transform: scaleY(1); }
    50% { transform: scaleY(1.1); }
    100% { transform: scaleY(1); }
}

/* Slider Input */
.slider {
    position: absolute;
    top: -10px;
    left: 0;
    width: 100%;
    height: calc(100% + 20px);
    opacity: 0;
    cursor: pointer;
    z-index: 5;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
}

.slider:focus {
    opacity: 0.1;
    outline: 3px solid rgba(0, 212, 255, 0.8);
    outline-offset: 5px;
    border-radius: 10px;
}

.slider:focus + .slider-thumb {
    transform: translate(-50%, -50%) scale(1.3);
    box-shadow: 0 0 0 4px rgba(0, 212, 255, 0.6), 0 6px 20px rgba(255, 107, 107, 0.6), 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Slider Thumb */
.slider-thumb {
    position: absolute;
    top: 50%;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #ff6b6b, #ff4757);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4), 0 2px 4px rgba(0, 0, 0, 0.3);
    border: 3px solid rgba(255, 255, 255, 0.9);
    cursor: pointer;
    z-index: 10;
    /* Improve touch targets while keeping visual size */
    -webkit-tap-highlight-color: transparent; /* Remove tap highlight on iOS */
    touch-action: none; /* Prevent default touch behaviors */
}

.slider-thumb:hover {
    transform: translate(-50%, -50%) scale(1.2);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.6), 0 2px 4px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #ff7675, #ff6b6b);
}

.slider-thumb:active {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.5), 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Slider Value Display */
.slider-value {
    font-size: 3rem;
    font-weight: 700;
    color: #00d4ff;
    margin: 20px 0;
    text-align: center;
    text-shadow: 0 0 30px rgba(0, 212, 255, 0.6);
    transition: all 0.3s ease;
    position: relative;
    font-family: 'Space Grotesk', 'Inter', sans-serif;
}

.slider-value::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { 
        opacity: 0.3; 
        transform: translate(-50%, -50%) scale(1); 
    }
    50% { 
        opacity: 0.6; 
        transform: translate(-50%, -50%) scale(1.1); 
    }
}

.navigation-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid rgba(255, 107, 107, 0.4);
    padding: 12px 25px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.nav-btn:hover {
    background: rgba(255, 107, 107, 0.2);
    border-color: rgba(255, 107, 107, 0.8);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.nav-btn:focus {
    outline: 3px solid #ffffff;
    outline-offset: 3px;
    box-shadow: 0 0 0 6px rgba(0, 212, 255, 0.8), 0 4px 15px rgba(255, 107, 107, 0.3);
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    margin: 20px 0;
    overflow: hidden;
    border: 1px solid rgba(255, 107, 107, 0.3);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(45deg, #00d4ff, #ff6b6b);
    transition: width 0.3s ease;
    border-radius: 3px;
    box-shadow: 0 0 10px rgba(255, 107, 107, 0.5);
}

.results-screen {
    display: none;
    text-align: center;
}

.results-title {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 30px;
    background: linear-gradient(45deg, #00d4ff, #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    flex-shrink: 0;
    display: block;
    vertical-align: middle;
    line-height: 1.2;
}

.party-results {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 40px 0;
    overflow-x: hidden;
    width: 100%;
    box-sizing: border-box;
}

.party-card {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 15px;
    padding: 20px;
    border: 1px solid rgba(255, 107, 107, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    align-items: center;
    gap: 15px;
}

.party-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(255, 107, 107, 0.2);
    border-color: rgba(255, 107, 107, 0.4);
}

.party-card:focus,
.party-card:focus-within {
    outline: 3px solid #ffffff;
    outline-offset: 3px;
    transform: translateY(-5px);
    box-shadow: 0 0 0 6px rgba(0, 212, 255, 0.8), 0 10px 25px rgba(255, 107, 107, 0.2);
    border-color: #ff6b6b;
}

.party-logo {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.party-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 0;
}

.party-info {
    flex: 1;
}

.party-name {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.party-score {
    font-size: 2rem;
    font-weight: bold;
    color: #00d4ff;
    margin-bottom: 10px;
}

.party-percentage {
    font-size: 0.9rem;
    color: #b0b0b0;
}

/* Restart-btn styling verwijderd - nu gewoon action-btn */

.results-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 30px;
    align-items: stretch;
    width: 100%;
}

.results-buttons .action-btn {
    flex: 0 0 220px;
}

.action-btn {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    background: linear-gradient(45deg, #00d4ff, #ff6b6b);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.2rem;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    width: 220px;
    min-width: 220px;
    max-width: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-shrink: 0;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 107, 107, 0.4);
    background: linear-gradient(45deg, #00e6ff, #ff7b7b);
}

.action-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.action-btn:focus {
    outline: 3px solid #ffffff;
    outline-offset: 3px;
    box-shadow: 0 0 0 6px rgba(0, 212, 255, 0.8), 0 10px 25px rgba(255, 107, 107, 0.4);
}

.more-results {
    margin-top: 20px;
}

.priority-screen,
.digital-agenda-screen {
    display: none;
    text-align: center;
}

.priority-questions {
    max-width: 700px;
    margin: 30px auto;
    text-align: left;
}

.priority-question {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
    border: 1px solid rgba(255, 107, 107, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
}

.priority-question:hover {
    background: rgba(255, 107, 107, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.2);
    border-color: rgba(255, 107, 107, 0.4);
}

.priority-question input[type="checkbox"] {
    margin-right: 15px;
    transform: scale(1.2);
    accent-color: #00d4ff;
}

.priority-question label {
    cursor: pointer;
    font-size: 1rem;
    line-height: 1.4;
    color: #ffffff;
}

.priority-buttons,
.digital-agenda-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
    align-items: stretch;
}

.digital-agenda-intro {
    margin-bottom: 30px;
}

.digital-agenda-tip {
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 12px;
    padding: 20px;
    margin-top: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1rem;
    color: #e0e0e0;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.2);
}

.digital-agenda-tip .tip-icon {
    font-size: 1.2rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.digital-agenda-options {
    max-width: 600px;
    margin: 30px auto;
    text-align: left;
}

.digital-agenda-option {
    margin-bottom: 20px;
    padding: 25px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    transition: all 0.3s ease;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.digital-agenda-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(0, 212, 255, 0.1), rgba(255, 107, 107, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.digital-agenda-option:hover {
    border-color: #00d4ff;
    background: rgba(0, 212, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.3);
}

.digital-agenda-option:hover::before {
    opacity: 1;
}

.digital-agenda-option input[type="radio"] {
    display: none;
}

.digital-agenda-option input[type="radio"]:checked + label {
    color: #00d4ff;
}

.digital-agenda-option input[type="radio"]:checked ~ * {
    border-color: #00d4ff;
    background: rgba(0, 212, 255, 0.1);
}

.digital-agenda-option:has(input[type="radio"]:checked) {
    border-color: #00d4ff;
    background: linear-gradient(45deg, rgba(0, 212, 255, 0.2), rgba(255, 107, 107, 0.1));
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.4);
}

.digital-agenda-option:has(input[type="radio"]:checked)::before {
    opacity: 1;
}

.digital-agenda-option label {
    display: block;
    cursor: pointer;
    margin: 0;
    position: relative;
    z-index: 1;
}

.option-title {
    display: block;
    font-weight: 600;
    font-size: 1.3rem;
    margin-bottom: 8px;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.option-description {
    display: block;
    font-size: 1rem;
    color: #e0e0e0;
    line-height: 1.5;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.comparison-screen {
    display: none;
    text-align: center;
}

.comparison-content {
    max-width: 1100px;
    margin: 0 auto;
}

.comparison-header {
    font-size: 2rem;
    margin-bottom: 30px;
    background: linear-gradient(45deg, #00d4ff, #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 24px;
    backdrop-filter: blur(10px);
    overflow-x: auto; /* Allow horizontal scroll only for table if needed */
    overflow-y: visible; /* Allow tooltips */
    max-width: 100%;
    box-sizing: border-box;
    color: #ffffff;
}

.comparison-table th,
.comparison-table td {
    padding: 12px 8px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
}

.comparison-table th {
    background: rgba(255, 255, 255, 0.08);
    font-weight: 600;
    color: #ffffff;
    position: sticky;
    top: 0;
    z-index: 10;
    border-radius: 6px 6px 0 0;
}

.comparison-table td {
    color: #e0e0e0;
    background: transparent;
}

/* Center the score columns (user and party scores) */
.comparison-table td:nth-child(2),
.comparison-table td:nth-child(3),
.comparison-table td:nth-child(4) {
    text-align: center;
    font-weight: 600;
}

/* Score column styling */
.comparison-table td:nth-child(4) {
    color: #4a9eff;
    font-weight: 600;
}

/* Explanation and source columns */
.explanation-cell {
    max-width: 300px;
}

.explanation-text {
    font-size: 14px;
    line-height: 1.4;
    color: #e0e0e0;
    max-height: 80px;
    overflow-y: auto;
}

.source-cell {
    text-align: center;
    position: relative;
}

/* Tooltip explanation */
.explain-icon {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.3);
    background: transparent;
    color: rgba(255,255,255,0.85);
    font-weight: 700;
    line-height: 20px;
    text-align: center;
    cursor: help;
    position: relative;
}

/* Ensure tooltip is always visible by checking container boundaries */
.explanation-cell {
    position: relative;
    overflow: visible; /* Allow tooltip to extend beyond cell */
}

.tooltip-content {
    position: absolute;
    left: 28px;
    top: 50%;
    transform: translateY(-50%);
    max-width: 400px; /* Reduced from 600px to fit better */
    min-width: 300px; /* Reduced from 500px */
    padding: 16px 20px;
    background: rgba(15, 17, 24, 0.98);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 12px;
    color: #e6e6e6;
    font-size: 14px;
    line-height: 1.6;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    display: none;
    z-index: 99999; /* Increased z-index */
    word-wrap: break-word; /* Ensure long text wraps */
    white-space: normal; /* Allow text to wrap */
}

.explain-icon:hover + .tooltip-content,
.explain-icon:focus + .tooltip-content {
    display: block;
}

.explain-icon:focus {
    outline: 3px solid rgba(0, 212, 255, 0.8);
    outline-offset: 2px;
    background: rgba(0, 212, 255, 0.1);
    border-color: rgba(0, 212, 255, 0.6);
}

/* Source icon - same styling as explain-icon */
.source-icon {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.3);
    background: transparent;
    color: rgba(255,255,255,0.85);
    font-weight: 700;
    line-height: 20px;
    text-align: center;
    cursor: pointer;
    position: relative;
    font-size: 14px;
    transition: all 0.2s ease;
}

.source-icon:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.5);
    transform: scale(1.1);
}

.source-icon:focus {
    outline: 3px solid rgba(0, 212, 255, 0.8);
    outline-offset: 2px;
    background: rgba(0, 212, 255, 0.1);
    border-color: rgba(0, 212, 255, 0.6);
}

/* Legacy source-chip styling (kept for backward compatibility) */
.source-chip {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(0,212,255,0.18), rgba(0,122,204,0.18));
    border: 1px solid rgba(0, 184, 255, 0.35);
    color: #aee8ff;
    text-decoration: none;
    font-size: 12px;
}

.source-chip:hover {
    background: linear-gradient(135deg, rgba(0,212,255,0.28), rgba(0,122,204,0.28));
    color: #ffffff;
}

.comparison-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
    transition: all 0.2s ease;
}

.calculation-breakdown {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
}

.breakdown-header {
    color: #ffffff;
    margin-bottom: 15px;
    font-size: 1.2rem;
    border-bottom: 2px solid #00d4ff;
    padding-bottom: 8px;
}

.breakdown-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
    background: transparent;
    border-radius: 6px;
    overflow: hidden;
    color: #ffffff;
}

.breakdown-table th {
    background: rgba(255,255,255,0.05);
    color: #ffffff;
    padding: 12px 8px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.breakdown-table td {
    padding: 10px 8px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    font-size: 0.9rem;
    color: #e0e0e0;
}

.breakdown-table tr:last-child td {
    border-bottom: none;
}

.breakdown-table tbody tr:hover {
    background: rgba(255,255,255,0.05);
}

.breakdown-total {
    background: rgba(255,255,255,0.1) !important;
    font-weight: 600;
    color: #ffffff !important;
}

.breakdown-percentage {
    background: rgba(0,212,255,0.2) !important;
    color: #ffffff !important;
    font-weight: 600;
}

.breakdown-percentage td {
    border-bottom: none !important;
}

.breakdown-explanation {
    background: rgba(255,255,255,0.05);
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid #00d4ff;
    backdrop-filter: blur(10px);
}

.breakdown-explanation p {
    margin: 0 0 10px 0;
    font-weight: 600;
    color: #ffffff;
}

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

.breakdown-explanation li {
    margin-bottom: 5px;
    color: #e0e0e0;
    line-height: 1.4;
}

.comparison-buttons {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    align-items: stretch;
}

/* Back button styling */
.back-button {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    display: inline-block;
    background: linear-gradient(45deg, #00d4ff, #ff6b6b);
    color: white;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: none;
    cursor: pointer;
}

.back-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    color: white;
    text-decoration: none;
}

.back-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.back-button:focus {
    outline: 3px solid #ffffff;
    outline-offset: 3px;
    box-shadow: 0 0 0 6px rgba(0, 212, 255, 0.8), 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* Footer - MAXIMALE SPECIFICITEIT OM ALLE CONFLICTEN TE OVERWINNEN */
body .site-footer,
html body .site-footer,
#nerdwijzer .site-footer,
.nerdwijzer .site-footer {
    margin-top: auto !important;
    padding: 16px 24px 20px !important;
    background: linear-gradient(135deg, rgba(18, 20, 28, 1) 0%, rgba(30, 60, 114, 0.8) 100%) !important;
    border-top: 1px solid rgba(255, 107, 107, 0.3) !important;
    position: relative !important;
    overflow: hidden !important;
    box-shadow: inset 0 1px 0 rgba(255, 107, 107, 0.1) !important;
    min-height: 80px !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    flex: 0 0 auto !important;
}

body .site-footer::before,
html body .site-footer::before,
#nerdwijzer .site-footer::before,
.nerdwijzer .site-footer::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 2px !important;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(0, 212, 255, 0.4) 25%, 
        rgba(255, 107, 107, 0.8) 50%, 
        rgba(0, 212, 255, 0.4) 75%, 
        transparent 100%) !important;
    z-index: 9999 !important;
}

body .footer-inner,
html body .footer-inner,
#nerdwijzer .footer-inner,
.nerdwijzer .footer-inner {
    max-width: 1200px !important;
    margin: 0 auto !important;
    position: relative !important;
    z-index: 1 !important;
}

body .footer-text,
html body .footer-text,
#nerdwijzer .footer-text,
.nerdwijzer .footer-text {
    margin: 0 0 16px 0 !important;
    font-size: 13px !important;
    line-height: 1.6 !important;
    color: rgba(255, 255, 255, 0.85) !important;
    text-align: center !important;
}

/* Subtle styling for links in footer text */
body .footer-text a,
html body .footer-text a,
#nerdwijzer .footer-text a,
.nerdwijzer .footer-text a {
    color: rgba(255, 255, 255, 0.9) !important;
    text-decoration: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3) !important;
    transition: all 0.2s ease !important;
}

body .footer-text a:hover,
html body .footer-text a:hover,
#nerdwijzer .footer-text a:hover,
.nerdwijzer .footer-text a:hover {
    color: rgba(255, 255, 255, 1) !important;
    border-bottom-color: rgba(255, 255, 255, 0.6) !important;
}

body .footer-inner,
html body .footer-inner,
#nerdwijzer .footer-inner,
.nerdwijzer .footer-inner {
    max-width: 800px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    font-weight: 400 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
    display: block !important;
    visibility: visible !important;
}

body .footer-meta,
html body .footer-meta,
#nerdwijzer .footer-meta,
.nerdwijzer .footer-meta {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 16px !important;
    font-size: 14px !important;
    color: rgba(255, 255, 255, 0.8) !important;
    flex-wrap: wrap !important;
    padding: 12px 0 !important;
    visibility: visible !important;
}

.footer-parties {
    text-align: center;
    margin-top: 8px;
    padding: 8px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-parties small {
    color: rgba(255, 255, 255, 0.6);
    font-size: 11px;
    line-height: 1.4;
    display: block;
    max-width: 600px;
    margin: 0 auto;
}

.footer-link {
    color: #ff6b6b;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 8px;
    background: rgba(255, 107, 107, 0.15);
    border: 1px solid rgba(255, 107, 107, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.footer-link:hover {
    color: #ffffff;
    background: rgba(255, 107, 107, 0.25);
    border-color: rgba(255, 107, 107, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.footer-link:focus {
    outline: 3px solid #ffffff;
    outline-offset: 3px;
    color: #ffffff;
    background: rgba(255, 107, 107, 0.4);
    border-color: #ff6b6b;
}

.footer-sep {
    opacity: 0.5;
    color: rgba(255, 255, 255, 0.6);
    font-size: 18px;
    font-weight: 300;
}

#app-version {
    padding: 6px 12px;
    background: rgba(255, 107, 107, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(255, 107, 107, 0.3);
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .welcome-screen h1 {
        font-size: 2rem;
    }
    
    .beta-notification {
        flex-direction: column;
        gap: 8px;
        padding: 15px;
        margin: 15px auto 25px auto;
        max-width: 90%;
    }
    
    .beta-text {
        font-size: 0.9rem;
        line-height: 1.4;
    }
    
    .question-text {
        font-size: 1.2rem;
        line-height: 1.4;
    }
    
    .question-explanation {
        font-size: 0.95rem;
        line-height: 1.5;
    }
    
    .slider {
        max-width: 100%;
    }
    
    .navigation-buttons {
        flex-direction: column;
        gap: 15px;
    }
    
    .party-results {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    /* Improve touch targets for mobile while keeping visual size reasonable */
    .slider-thumb {
        width: 32px;
        height: 32px;
        border-width: 3px;
    }
    
    .slider-track {
        min-height: 8px; /* Keep visual height small */
        padding: 15px 0; /* Invisible padding for touch area */
    }
    
    .slider-scale > div {
        padding: 15px 8px;
        min-height: 60px;
    }
    
    .priority-question {
        padding: 18px;
        margin-bottom: 12px;
    }
    
    .priority-question input[type="checkbox"] {
        transform: scale(1.4);
        margin-right: 18px;
    }
    
    /* Better button spacing */
    .results-buttons {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
    
    .priority-buttons,
    .digital-agenda-buttons {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    .digital-agenda-option {
        padding: 20px;
        margin-bottom: 15px;
    }

    .option-title {
        font-size: 1.1rem;
    }

    .option-description {
        font-size: 0.9rem;
    }

    .digital-agenda-tip {
        padding: 15px;
        font-size: 0.9rem;
    }

    .digital-agenda-option {
        padding: 18px;
        margin-bottom: 12px;
    }

    .option-title {
        font-size: 1rem;
    }

    .option-description {
        font-size: 0.85rem;
    }
    
    .comparison-buttons {
        flex-direction: column;
        align-items: center;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.question-screen, .results-screen {
    animation: fadeIn 0.5s ease;
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #00d4ff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Wider layout for large screens */
@media (min-width: 1440px) {
    .container,
    .verantwoording-container,
    .changelog-container,
    .welcome-screen,
    .question-screen,
    .results-screen,
    .priority-screen,
    .digital-agenda-screen,
    .comparison-screen,
    .comparison-content {
        width: 1160px; /* 1200px - 40px padding = 1160px content */
        max-width: 1160px;
    }
}

@media (min-width: 1920px) {
    .container,
    .verantwoording-container,
    .changelog-container,
    .welcome-screen,
    .question-screen,
    .results-screen,
    .priority-screen,
    .digital-agenda-screen,
    .comparison-screen,
    .comparison-content {
        width: 1360px; /* 1400px - 40px padding = 1360px content */
        max-width: 1360px;
    }
}
/* Logo Styles */
.site-header { text-align: center; padding: 20px 0; margin-bottom: 20px; }
.header-logo-img { height: 60px; width: auto; filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3)); transition: transform 0.3s ease; }
.welcome-logo-img { max-width: 400px; width: 100%; height: auto; filter: drop-shadow(0 10px 30px rgba(0, 212, 255, 0.3)); animation: logoFloat 3s ease-in-out infinite; }

/* Logo Link Styles */
.header-logo a, .welcome-logo a {
    text-decoration: none;
    display: inline-block;
    transition: transform 0.3s ease;
}

.header-logo a:hover, .welcome-logo a:hover {
    transform: scale(1.05);
}

.header-logo a:hover .header-logo-img, .welcome-logo a:hover .welcome-logo-img {
    filter: drop-shadow(0 6px 20px rgba(0, 0, 0, 0.4));
}
@keyframes logoFloat { 0%, 100% { transform: translateY(0px); } 50% { transform: translateY(-10px); } }
.results-mark { 
    width: 32px; 
    height: 32px; 
    filter: brightness(0) saturate(100%) invert(100%) sepia(0%) saturate(0%) hue-rotate(93deg) brightness(104%) contrast(101%); 
    opacity: 0.9; 
    flex-shrink: 0;
    display: block;
    vertical-align: middle;
}


/* Additional Logo Styles */
.results-header { 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 15px; 
    margin-bottom: 20px; 
    flex-wrap: wrap;
    text-align: center;
}

.results-header h2 {
    margin: 0;
    padding: 0;
}
.question-header-top { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 15px; }
.question-mark { width: 24px; height: 24px; filter: brightness(0) saturate(100%) invert(100%) sepia(0%) saturate(0%) hue-rotate(93deg) brightness(104%) contrast(101%); opacity: 0.8; }

/* Verbeterde voorpagina styling */

/* Beta Notification */
.beta-notification {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: linear-gradient(135deg, #ff6b6b, #ff8e53);
    border-radius: 12px;
    padding: 12px 20px;
    margin: 20px auto 30px auto;
    max-width: 600px;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: betaPulse 2s ease-in-out infinite;
}

.beta-badge {
    background: rgba(255, 255, 255, 0.9);
    color: #ff6b6b;
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 4px 8px;
    border-radius: 6px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.beta-text {
    color: #ffffff;
    font-weight: 500;
    font-size: 0.95rem;
    text-align: center;
}

@keyframes betaPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
    }
}

/* Verbeterde welkomstpagina */
.welcome-content {
    max-width: 800px;
    margin: 0 auto;
}

.welcome-description {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.welcome-subtitle {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: #00d4ff;
    margin-bottom: 15px;
    line-height: 1.3;
}

.welcome-description p {
    line-height: 1.6;
    margin-bottom: 1em;
}

.how-it-works, .why-nerdwijzer {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 25px;
    margin: 20px 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.how-it-works h2, .why-nerdwijzer h2 {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: #00d4ff;
    margin-bottom: 15px;
    line-height: 1.3;
}

.how-it-works ol, .why-nerdwijzer ul {
    margin: 0;
    padding-left: 0;
    display: inline-block;
    text-align: left;
}

.how-it-works li, .why-nerdwijzer li {
    line-height: 1.6;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.9);
}

.how-it-works li:last-child, .why-nerdwijzer li:last-child {
    margin-bottom: 0;
}

.welcome-features {
    margin: 25px 0;
    border: none;
}

.welcome-features {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    min-width: 150px;
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.feature-item span:last-child {
    font-size: 0.9rem;
    text-align: center;
    color: #e0e0e0;
}

/* Verbeterde voortgangsbalk */
.progress-container {
    margin-bottom: 30px;
}

.progress-text {
    text-align: center;
    margin-top: 10px;
    font-size: 0.9rem;
    color: #b0b0b0;
}

.progress-text span:first-child {
    color: #00d4ff;
    font-weight: bold;
}

/* Slider Header */
.slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.slider-label-left, .slider-label-right {
    font-size: 2.8rem;
    color: #b0b0b0;
    max-width: 140px;
    text-align: center;
    flex-shrink: 0;
    font-weight: 600;
    transition: all 0.3s ease;
    line-height: 1.1;
    font-family: 'Space Grotesk', 'Inter', sans-serif;
}

.slider-label-left:hover, .slider-label-right:hover {
    color: #00d4ff;
    transform: scale(1.05);
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.4);
}

/* Slider Scale */
.slider-scale {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    font-size: 0.9rem;
    color: #888;
    position: relative;
    width: 100%;
    font-weight: 500;
}

.slider-scale > div {
    position: relative;
    text-align: center;
    width: 20%;
    padding: 12px 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.slider-scale > div:hover {
    color: #00d4ff;
    background: rgba(0, 212, 255, 0.1);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.2);
}

.slider-scale > div:focus {
    outline: 3px solid rgba(0, 212, 255, 0.8);
    outline-offset: 2px;
    color: #00d4ff;
    background: rgba(0, 212, 255, 0.2);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.3);
}

/* Scale number and description styling */
.scale-number {
    font-size: 1rem;
    font-weight: 700;
    color: inherit;
    font-family: 'Space Grotesk', 'Inter', sans-serif;
}

.scale-description {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.3;
    text-align: center;
    max-width: 100%;
    word-wrap: break-word;
}

/* Active scale value highlighting */
.slider-scale > div.active {
    color: #00d4ff;
    background: rgba(0, 212, 255, 0.2);
    font-weight: bold;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 212, 255, 0.3);
}

.slider-scale > div.active .scale-number {
    color: #00d4ff;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.slider-scale > div.active .scale-description {
    color: rgba(0, 212, 255, 0.9);
}

.keyboard-tip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.keyboard-tip:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.keyboard-tip .tip-icon {
    font-size: 16px;
    flex-shrink: 0;
}

/* Priority checkbox styling */
.priority-checkbox-container {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.priority-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
    user-select: none;
}

.priority-checkbox-label:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.priority-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.priority-checkbox:checked {
    background: linear-gradient(45deg, #00d4ff, #ff6b6b);
    border-color: #00d4ff;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.4);
}

.priority-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.priority-checkbox:focus {
    outline: 3px solid rgba(0, 212, 255, 0.5);
    outline-offset: 2px;
}

.priority-checkbox-text {
    font-weight: 500;
    line-height: 1.4;
}

/* Desktop-only tooltip */
.desktop-only {
    display: flex;
}

/* Verberg op mobiele apparaten */
@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }
}

/* Verberg op touch apparaten (iPad, iPhone, Android) */
@media (hover: none) and (pointer: coarse) {
    .desktop-only {
        display: none !important;
    }
    
    /* Improve touch interactions */
    .slider-thumb {
        width: 36px;
        height: 36px;
    }
    
    .slider-thumb:hover {
        transform: translate(-50%, -50%) scale(1.1);
    }
    
    .action-btn, .nav-btn, .start-btn {
        min-height: 50px;
        padding: 16px 24px;
    }
    
    .priority-question {
        padding: 20px;
        margin-bottom: 15px;
    }
    
    .priority-question input[type="checkbox"] {
        transform: scale(1.5);
        margin-right: 20px;
    }
    
    .slider-scale > div {
        padding: 18px 10px;
        min-height: 70px;
    }
    
    .explain-icon, .source-icon {
        width: 28px;
        height: 28px;
        line-height: 26px;
        font-size: 16px;
    }
    
    /* Remove hover effects on touch devices */
    .party-card:hover,
    .feature-item:hover,
    .priority-question:hover,
    .slider-scale > div:hover {
        transform: none;
        box-shadow: none;
    }
}

/* Verbeterde navigatieknoppen */
.nav-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.btn-icon {
    font-size: 1.1rem;
}

/* Verbeterde resultatenpagina */
.results-intro {
    text-align: center;
    margin-bottom: 30px;
}

.formula-explanation {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    text-align: left;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.formula-explanation h3 {
    color: #ffffff;
    margin-bottom: 15px;
    font-size: 1.2rem;
    text-align: center;
}

.formula-details {
    color: #e0e0e0;
    line-height: 1.6;
}

.formula-details p {
    margin: 10px 0;
}

.formula-details ul {
    margin: 8px 0 15px 20px;
}

.formula-details li {
    margin: 5px 0;
}

.formula-details strong {
    color: #ffffff;
    font-weight: 600;
}

.results-summary {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.summary-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.08);
    padding: 12px 20px;
    border-radius: 25px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.summary-icon {
    font-size: 1.2rem;
}

/* Verbeterde prioriteitspagina */
.priority-intro {
    text-align: center;
    margin-bottom: 30px;
}

.priority-tip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 212, 255, 0.1);
    padding: 12px 20px;
    border-radius: 25px;
    border: 1px solid rgba(0, 212, 255, 0.2);
    margin-top: 15px;
    font-size: 0.9rem;
    color: #b0e0ff;
}

.tip-icon {
    font-size: 1.1rem;
}

/* Verbeterde vergelijkingspagina */
.comparison-intro {
    text-align: center;
    margin-bottom: 25px;
    color: #e0e0e0;
}

/* Verbeterde actieknoppen */
.action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Responsive verbeteringen */
@media (max-width: 768px) {
    .welcome-features {
        gap: 20px;
    }
    
    .feature-item {
        min-width: 120px;
        padding: 15px;
    }
    
    .slider-header {
        flex-direction: row; /* Blijf horizontaal op mobiel */
        gap: 10px; /* Kleinere gap voor mobiel */
        max-width: 90vw;
        justify-content: space-between; /* Verdeel ruimte gelijkmatig */
        align-items: center;
    }
    
    .slider-label-left, .slider-label-right {
        max-width: 60px; /* Kleinere max-width voor mobiel */
        font-size: 2.2rem;
        flex-shrink: 0; /* Voorkom dat ze krimpen */
    }
    
    .slider-value {
        flex-shrink: 0; /* Voorkom dat het cijfer krimpt */
        min-width: 60px; /* Zorg voor minimale breedte */
    }
    
    .slider-container {
        max-width: 90vw;
        padding: 20px;
    }
    
    .slider-scale {
        font-size: 0.8rem;
    }
    
    .slider-scale > div {
        padding: 8px 4px;
    }
    
    .scale-number {
        font-size: 0.9rem;
    }
    
    .scale-description {
        font-size: 0.7rem;
    }
    
    .results-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .results-summary {
        gap: 20px;
    }
    
    .summary-item {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    .action-btn {
        width: 180px;
        min-width: 180px;
        max-width: 180px;
        padding: 12px 30px;
        font-size: 1.1rem;
        flex: 0 0 180px;
    }
    
    /* Improve comparison table for mobile */
    .comparison-table {
        font-size: 0.85rem;
    }
    
    .comparison-table th,
    .comparison-table td {
        padding: 8px 6px;
    }

    .breakdown-table {
        font-size: 0.85rem;
    }
    
    .breakdown-table th,
    .breakdown-table td {
        padding: 8px 6px;
    }
    
    .comparison-table th:first-child,
    .comparison-table td:first-child {
        max-width: 120px;
        word-wrap: break-word;
    }
    
    /* Better tooltip positioning on mobile */
    .tooltip-content {
        max-width: 280px;
        min-width: 200px;
        font-size: 13px;
        padding: 12px 16px;
    }
    
    /* Improve footer on mobile */
    .footer-meta {
        flex-direction: column;
        gap: 12px;
    }
    
    .footer-link {
        display: inline-block;
        margin: 4px 8px;
    }
}

/* Additional mobile optimizations for very small screens */
@media (max-width: 480px) {
    .welcome-screen h1 {
        font-size: 1.8rem;
    }
    
    .beta-notification {
        padding: 12px;
        margin: 10px auto 20px auto;
        max-width: 95%;
    }
    
    .beta-text {
        font-size: 0.85rem;
    }
    
    .beta-badge {
        font-size: 0.75rem;
        padding: 3px 6px;
    }
    
    .question-text {
        font-size: 1.1rem;
    }
    
    .slider-value {
        font-size: 2.5rem;
    }
    
    .slider-label-left, .slider-label-right {
        font-size: 2rem;
        max-width: 50px; /* Nog kleiner voor zeer kleine schermen */
    }
    
    .slider-header {
        gap: 8px; /* Nog kleinere gap */
    }
    
    .slider-value {
        min-width: 50px; /* Kleinere minimale breedte */
        font-size: 2.2rem; /* Behoud leesbare grootte */
    }
    
    .feature-item {
        min-width: 100px;
        padding: 12px;
    }
    
    .feature-icon {
        font-size: 2rem;
    }
    
    .party-name {
        font-size: 1.1rem;
    }
    
    .party-score {
        font-size: 1.6rem;
    }
    
    .results-title {
        font-size: 2rem;
    }
    
    .comparison-header {
        font-size: 1.6rem;
    }
    
    /* Stack comparison table columns on very small screens */
    .comparison-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .comparison-table th,
    .comparison-table td {
        min-width: 80px;
        padding: 6px 4px;
    }

    .breakdown-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .breakdown-table th,
    .breakdown-table td {
        min-width: 80px;
        padding: 6px 4px;
    }
}
/* Source icon - same styling as explain-icon */
.source-icon {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.3);
    background: transparent;
    color: rgba(255,255,255,0.85);
    font-weight: 700;
    line-height: 20px;
    text-align: center;
    cursor: pointer;
    position: relative;
    font-size: 14px;
    transition: all 0.2s ease;
}

.source-icon:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.5);
    transform: scale(1.1);
}

/* Global overflow prevention for all mobile devices */
@media (max-width: 768px) {
    html, body {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* Ensure all containers respect viewport width */
    .container,
    .verantwoording-container,
    .changelog-container,
    .welcome-screen,
    .question-screen,
    .results-screen,
    .priority-screen,
    .digital-agenda-screen,
    .comparison-screen {
        overflow-x: hidden !important;
        max-width: 100vw !important;
        box-sizing: border-box !important;
    }
    
    /* Asymmetric padding for mobile - more space on left */
    @media (max-width: 393px) {
        .container,
        .verantwoording-container,
        .changelog-container,
        .welcome-screen,
        .question-screen,
        .results-screen,
        .priority-screen,
        .digital-agenda-screen,
        .comparison-screen {
            padding-left: 4px !important;
            padding-right: 8px !important;
        }
    }
    
    @media (max-width: 480px) and (min-width: 394px) {
        .container,
        .verantwoording-container,
        .changelog-container,
        .welcome-screen,
        .question-screen,
        .results-screen,
        .priority-screen,
        .digital-agenda-screen,
        .comparison-screen {
            padding-left: 6px !important;
            padding-right: 10px !important;
        }
    }
    
    /* Prevent any element from exceeding viewport */
    * {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* Specific fixes for common overflow culprits */
    .slider-container,
    .party-results,
    .comparison-table,
    .welcome-features,
    .results-buttons,
    .priority-buttons,
    .digital-agenda-buttons,
    .comparison-buttons {
        overflow-x: hidden !important;
        max-width: 100% !important;
    }
}
