body {
    font-family: sans-serif;
    background-color: #050510;
    color: #eee;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
    padding: 60px 20px 20px 20px;
}

h1 {
    font-size: 1.8em;
    color: #aaccff;
    text-align: center;
    margin-bottom: 5px;
}

h2 {
    font-size: 1.3em;
    color: #8ac;
    margin-top: 30px;
    margin-bottom: 5px;
    text-align: center;
}

h3 {
    font-size: 1.4em;
    color: #9acfff;
    text-align: center;
    margin-top: 0;
    margin-bottom: 0px;
    display: inline-block;
}

h4 {
    color: #8ac;
    margin-top: 5px;
    margin-bottom: 10px;
    font-size: 1.1em;
    display: inline-block;
    vertical-align: middle;
}

p {
    font-size: 0.9em;
    color: #aaa;
    text-align: center;
    max-width: 600px;
    margin-bottom: 15px;
    line-height: 1.5;
}

body > p {
    margin-bottom: 25px;
}

.explanation-container {
    width: 90%;
    max-width: 700px;
    margin-bottom: 40px;
    padding: 15px 20px;
    background-color: #101018;
    border-radius: 8px;
    border: 1px solid #2a2a40;
    box-shadow: 0 0 15px rgba(80, 100, 180, 0.15);
    text-align: center;
}

.explanation-container .toggle-button {
    margin-left: 10px;
}

.explanation-container p {
    text-align: left;
    margin-bottom: 10px;
    max-width: none;
}

.explanation-container ul {
    list-style: none;
    padding-left: 0;
    margin-top: 0;
    text-align: left;
}

.explanation-container li {
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
    color: #bbb;
    line-height: 1.5;
}

.explanation-container li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: #79c;
    font-size: 1.2em;
    line-height: 1;
}

.explanation-container li strong {
    color: #cce;
}

.explanation-container .sub-explanation-section {
    margin-top: 15px;
    text-align: left;
    background-color: #181822;
    border: 1px solid #333348;
    border-radius: 5px;
    padding: 10px 15px;
}

.explanation-container .sub-explanation-section h4 {
    margin: 0;
    padding: 0;
    color: #9acfff;
    font-weight: bold;
}

.explanation-container .sub-explanation-section .toggle-button {
    margin-left: 10px;
}

.toggle-button {
    background: none;
    border: 1px solid #579;
    color: #9cf;
    padding: 3px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8em;
    margin-left: 8px;
    vertical-align: middle;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.toggle-button:hover {
    background-color: rgba(100, 150, 200, 0.2);
    color: #adf;
}

.toggle-button:active {
    background-color: rgba(100, 150, 200, 0.4); 
}

.collapsible-content {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out, opacity 0.4s ease-out, margin-top 0.5s ease-out, padding 0.5s ease-out;
    margin-top: 0;
    padding-top: 0;
    padding-bottom: 0;
    box-sizing: border-box;
}

.collapsible-content.expanded {
    max-height: 2000px; 
    opacity: 1;
    margin-top: 15px;
    padding-top: 10px;
    padding-bottom: 10px;
    overflow: visible; 
}

.sub-explanation-section .collapsible-content.expanded {
    max-height: 2500px; 
}

#epr-paradox-content.expanded {
    max-height: 3000px; 
}

#key-concepts-content.expanded {
    max-height: 3000px; 
}

.demo-container {
    width: 90%;
    max-width: 700px;
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.demo-description p {
    font-size: 0.9em;
    color: #aaa;
    text-align: left;
    max-width: 600px;
    margin-bottom: 8px;
    margin-top: 0;
    line-height: 1.5;
}

.demo-description p:last-child {
    margin-bottom: 15px;
}

.demo-description p.directions {
    color: #bee;
    font-style: italic;
}

.demo-description p strong {
    color: #ccc;
    font-weight: 600;
}

.demo-description {
    width: 100%;
    max-width: 600px;
    margin-bottom: 10px;
}

.visualization-container {
    width: 100%;
    max-width: 600px; 
    background-color: #101020;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(100, 150, 255, 0.2);
    touch-action: none; 
    position: relative; 
    overflow: hidden; 
}

.three-js-container {
    height: 400px; 
    overflow: hidden;
}

.three-js-container canvas {
    width: 100%;
    height: 100%;
    display: block; 
    border-radius: 10px; 
}

#visualization-container-epr {
    height: 400px; 
    margin-top: 15px; 
    margin-bottom: 15px;
    position: relative;
    overflow: hidden;
}

.epr-controls {
    position: absolute; 
    bottom: 20px; 
    left: 50%; 
    transform: translateX(-50%); 
    z-index: 10; 
    display: flex;
    gap: 10px; 
}

.epr-button {
    background-color: rgba(40, 80, 120, 0.7); 
    color: #eef; 
    border: 1px solid #79c; 
    border-radius: 4px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease; 
}

.epr-button:hover {
    background-color: rgba(60, 100, 160, 0.8);
}

.epr-button:active {
    transform: translateX(-50%) scale(0.95); 
}

.epr-info {
    position: absolute; 
    top: 10px;
    background-color: rgba(0, 10, 30, 0.7); 
    color: #eef;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    z-index: 10;
    max-width: 250px; 
}

.demo-caption {
    font-size: 0.85em;
    color: #adf;
    font-style: italic;
    margin-top: 5px;
    text-align: center;
}

.demo-description img {
    display: block; 
    margin: 10px auto; 
    max-width: 100%; 
    height: auto; 
    border: 1px solid #444; 
    border-radius: 5px;
}

#language-toggle-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.language-toggle-btn {
    background: linear-gradient(135deg, #2a4365, #3182ce);
    border: 2px solid #4299e1;
    border-radius: 25px;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(66, 153, 225, 0.3);
}

.language-toggle-btn:hover {
    background: linear-gradient(135deg, #3182ce, #4299e1);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(66, 153, 225, 0.4);
}

.language-toggle-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(66, 153, 225, 0.3);
}

.flag-icon {
    font-size: 18px;
    line-height: 1;
}

.language-text {
    font-family: inherit;
    font-size: 14px;
    white-space: nowrap;
}

.program-notes-image-container {
    margin: 20px 0;
    text-align: center;
}

.program-notes-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid #444;
    box-shadow: 0 4px 12px rgba(100, 150, 255, 0.1);
    opacity: 1.0;
    max-height: 600px;
}

/* @tweakable responsive adjustments for translation button on smaller screens */
@media (max-width: 768px) {
    body {
        padding-top: 80px;
    }
    
    #language-toggle-container {
        top: 15px;
        right: 15px;
    }
    
    .language-toggle-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
}

/* @tweakable additional spacing for very small screens */
@media (max-width: 480px) {
    body {
        padding-top: 90px;
    }
    
    h1 {
        margin-top: 10px;
    }
}