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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1f39a9 0%, #5f2a93 100%);
    height: 100vh;
    overflow: hidden;
}

.container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    padding: 0;
    box-sizing: border-box;
    overflow: hidden;
}

.header {
    text-align: center;
    color: white;
    margin-top: 0px;
    margin-bottom: 0px;
}

.symbol {
    font-size: 1.2em;
    margin-bottom: 3px;
}

.title {
    font-size: 2.3em;
    font-weight: 600;
    margin-bottom: 5px;
}

#sunburst {
    flex: 1 1 auto;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

#sunburst svg {
    width: 100%;
    height: 100%;
    display: block;
    max-width: 100%;
    max-height: 100%;
}

/* INPUT AREA */
.input-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 18px 0 8px;
    align-items: flex-start;
}

.input-group {
    flex: 2;
    max-width: 500px;
}

#textInput {
    width: 100%;
    height: 70px;
    padding: 12px 20px;
    font-size: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.9);
    outline: none;
    transition: all 0.3s ease;
    resize: vertical;
}

#textInput:focus {
    border-color: rgba(255, 255, 255, 0.8);
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.control-group {
    flex: 1;
    max-width: 300px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.control-group .top {
    display: flex;
    gap: 12px;
    align-items: center;
}

.control-group .control {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.control-group label, span {
    font-size: 0.9em;
    font-weight: 500;
    color: #ccc;
    white-space: nowrap;
}

.control-group select,
.control-group input[type="range"] {
    padding: 6px 8px;
    border-radius: 6px;
    border: 1px solid #ccc;
    outline: none;
}

.control-group .bottom {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

.control-group input[type="range"] {
    width: 100%;
}

/* TOOLTIP */
.node {
    cursor: pointer;
    stroke: none;
    transition: opacity 0.3s ease;
}

.node:hover {
    opacity: 0.8;
}

.tooltip {
    position: absolute;
    pointer-events: none;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    white-space: pre-line;
    z-index: 1000;
}

/* RESPONSIVE DESIGN */
@media (max-width: 768px) {
    .input-container {
        flex-direction: column;
        align-items: center;
    }

    .input-group,
    .control-group {
        width: 90%;
        max-width: none;
    }

    .control-group {
        align-items: center;
        text-align: center;
    }
}


@media (max-width: 480px) {
    .title {
        font-size: 1.5em;
    }

    .container {
        padding: 10px;
    }

    .control-group {
        flex-direction: column;
        gap: 8px;
    }
}

/* Help button */
.help-container {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 1000;
}

.help-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: #555;
    color: #fff;
    font-weight: bold;
    font-size: 1em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.help-btn:hover {
    background: #777;
}

/* Modal background */
.help-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: none;           /* hidden initially */
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

/* Modal content box */
.help-content {
    background: #fff;
    color: #333;
    padding: 20px;
    border-radius: 10px;
    max-width: 800px;
    max-height: 160vh;         /* scrollable if too long */
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    position: relative;
}

/* Close button */
.help-close {
    position: absolute;
    top: 8px;
    right: 10px;
    border: none;
    background: none;
    font-size: 1.2em;
    cursor: pointer;
}
