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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
        'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    min-height: 100vh;
    padding: 1rem;
    color: #333;
}

nav {
    margin-bottom: 2rem;
}

nav a {
    color: white;
    text-decoration: none;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    transition: background 0.3s ease;
    display: inline-block;
}

nav a:hover {
    background: rgba(255, 255, 255, 0.2);
}

main {
    max-width: 1400px;
    margin: 0 auto;
}

header {
    text-align: center;
    color: white;
    margin-bottom: 2rem;
}

h1 {
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 0.5rem;
}

.description {
    font-size: 1.1rem;
    opacity: 0.9;
}

.controls {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.religion-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid white;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.religion-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.religion-btn.active {
    background: white;
    color: #1e3c72;
}

.diagram-container {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    margin-bottom: 2rem;
}

#venn-diagram {
    width: 100%;
    height: auto;
    display: block;
}

.religion-circle {
    cursor: pointer;
    transition: opacity 0.3s ease, stroke-width 0.3s ease;
}

.religion-circle:hover {
    stroke-width: 4;
}

.religion-circle.dimmed {
    opacity: 0.2;
}

.religion-label {
    font-size: 18px;
    font-weight: 600;
    pointer-events: none;
    user-select: none;
}

.info-panel {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    margin-bottom: 2rem;
    min-height: 200px;
}

#info-title {
    color: #1e3c72;
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

#info-content {
    color: #555;
    line-height: 1.8;
}

#info-content ul {
    margin: 1rem 0;
    padding-left: 2rem;
}

#info-content li {
    margin: 0.5rem 0;
}

.legend {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.legend h3 {
    color: #1e3c72;
    margin-bottom: 1rem;
}

.legend-items {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.legend-color {
    width: 40px;
    height: 30px;
    border-radius: 6px;
    border: 2px solid #333;
}

.legend-color.overlap {
    background: linear-gradient(135deg, #FF6B6B 0%, #4ECDC4 50%, #45B7D1 100%);
    opacity: 0.7;
}

.legend-color.unique {
    background: #FF6B6B;
    opacity: 0.4;
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    .controls {
        gap: 0.5rem;
    }

    .religion-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .diagram-container {
        padding: 1rem;
    }

    #info-title {
        font-size: 1.4rem;
    }
}
