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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', 'Roboto', sans-serif;
    background: #0a0a0f;
    min-height: 100vh;
    padding: 40px 20px;
    overflow-x: auto;
    color: #e0e0e0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: linear-gradient(145deg, #1a1a24 0%, #151520 100%);
    border-radius: 16px;
    padding: 60px 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

h1 {
    text-align: center;
    color: #ffffff;
    margin-bottom: 8px;
    font-size: 2.8rem;
    font-weight: 300;
    letter-spacing: -0.5px;
}

.instructions {
    text-align: center;
    color: #888;
    margin-bottom: 50px;
    font-size: 0.95rem;
    font-weight: 400;
    letter-spacing: 0.3px;
}

.wheel-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    aspect-ratio: 1;
}

#emotion-wheel {
    width: 100%;
    height: 100%;
}

.center-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.2rem;
    font-weight: 300;
    color: #fff;
    pointer-events: none;
    z-index: 10;
}

/* Petal styles */
.petal {
    cursor: pointer;
    transition: all 0.3s ease;
    stroke: rgba(0, 0, 0, 0.3);
    stroke-width: 1;
}

.petal:hover {
    filter: brightness(1.2);
    stroke: rgba(255, 255, 255, 0.4);
    stroke-width: 2;
}

.petal-text {
    font-size: 14px;
    font-weight: 500;
    fill: rgba(255, 255, 255, 0.95);
    stroke: rgba(0, 0, 0, 0.6);
    stroke-width: 3px;
    paint-order: stroke fill;
    pointer-events: none;
    text-anchor: middle;
    dominant-baseline: middle;
    letter-spacing: 0.5px;
}

.compound-emotion-label {
    font-size: 10px;
    font-weight: 600;
    fill: rgba(255, 255, 255, 0.95);
    stroke: rgba(0, 0, 0, 0.5);
    stroke-width: 2.5px;
    paint-order: stroke fill;
    pointer-events: none;
    letter-spacing: 1px;
}

.compound-box {
    cursor: pointer;
    transition: all 0.3s ease;
}

.compound-box:hover {
    fill: rgba(50, 60, 80, 0.95);
    stroke: rgba(255, 255, 255, 0.6);
    filter: brightness(1.2);
}

.compound-connector {
    transition: all 0.3s ease;
}

.compound-label-group:hover .compound-connector {
    stroke: rgba(255, 255, 255, 0.5);
    stroke-width: 2;
}

/* Tooltip styles */
.tooltip {
    position: fixed;
    padding: 10px 16px;
    background: rgba(20, 25, 35, 0.98);
    color: #e0e0e0;
    font-size: 0.85rem;
    font-weight: 400;
    border-radius: 6px;
    max-width: 280px;
    text-align: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10000;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    line-height: 1.4;
    letter-spacing: 0.2px;
    white-space: normal;
}

.tooltip.visible {
    opacity: 1;
}

.tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(20, 25, 35, 0.98);
}

/* Legend */
.legend {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.legend-box {
    width: 30px;
    height: 20px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.intensity-strong {
    opacity: 1;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
}

.intensity-moderate {
    opacity: 0.7;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
}

.intensity-mild {
    opacity: 0.4;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
}

.legend-item span {
    color: #aaa;
    font-size: 0.9rem;
}
