body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #f0f4c3, #c8e6c9);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.container {
    width: 95%;
    max-width: 1200px;
    background-color: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

header {
    text-align: center;
    margin-bottom: 15px;
}

header h1 {
    margin-bottom: 5px;
    color: #202124;
    font-size: 1.8em;
    font-weight: 400;
}

header p {
    color: #5f6368;
    font-size: 0.9em;
    line-height: 1.5;
}

.controls {
    display: flex;
    justify-content: space-around;
    margin-bottom: 15px;
}

.controls div {
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    width: 48%;
}

.controls h2 {
    margin-top: 5px;
    font-size: 1.1em;
    color: #202124;
    font-weight: 500;
}

.controls input, .controls button {
    display: inline-block;
    padding: 8px 10px;
    margin: 5px 2px;
    border: 1px solid #dadce0;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 0.9em;
    color: #202124;
}

.controls button {
    background-color: #1a73e8;
    color: white;
    border: none;
    cursor: pointer;
}

.controls button:hover {
    background-color: #185abc;
}

#shutdown {
    background-color: #d93025;
}

#shutdown:hover {
    background-color: #c22e23;
}

.distribution {
    border-top: 1px solid #e0e0e0;
    padding-top: 15px;
    flex-grow: 1;
}

.distribution h2 {
    margin-top: 5px;
    font-size: 1.1em;
    color: #202124;
    font-weight: 500;
    display: flex;
    justify-content: left;
    align-items: center;
}

.distribution h2 span {
    font-size: 0.8em;
    color: #5f6368;
}

#distributionDisplay, #activeNodesDisplay {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); /* Increased minmax for better visual representation */
    gap: 10px; /* Increased gap */
}

#distributionDisplay div, #activeNodesDisplay div {
    padding: 12px; /* Increased padding */
    border: 1px solid #e0e0e0;
    border-radius: 6px; /* Slightly rounded corners */
    background-color: #f8f9fa;
    font-size: 1em; /* Increased font size */
    color: #202124;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#nodeForKeyResult {
    margin-top: 8px;
    font-weight: 500;
    font-size: 0.9em;
    color: #202124;
}


.instructions-details {
    width: 100%; /* Make details take full width */
    margin-top: 10px;
}

.instructions-details summary {
    background-color: #f0f0f0;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.instructions-details summary {
    /* ... other styles ... */
    position: relative;
}

.instructions-details summary::after {
    content: '▼'; /* Down arrow */
    font-size: 0.8em;
    margin-left: 5px;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
}

.instructions-details[open] summary::after {
    content: '▲'; /* Up arrow */
}

.instructions-content {
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    margin-top: 5px;
}

.instruction-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.instruction-icon {
    font-size: 1.5em;
    margin-right: 15px;
    color: #1a73e8; /* Gmail blue */
}

.instruction-item p {
    margin: 0;
    font-size: 0.9em;
}

.distribution-guide {
    margin-top: 20px;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    background-color: #f8f9fa;
    font-size: 0.9em;
}

.distribution-guide ul {
    margin-top: 10px;
    padding-left: 20px;
}

.distribution-guide li {
    margin-bottom: 5px;
}

@media (max-width: 768px) {
    .controls {
        flex-direction: column;
    }

    .controls div {
        width: 100%;
        margin-bottom: 10px;
    }
}