body {
    display: flex;
    margin: 0;
    overflow: hidden;
    background-color: #f7f7f7;
    font-family: 'Inter', sans-serif;
    height: 100vh;
}

#main-container {
    display: flex;
    width: 100%;
}

#graph-area {
    flex-grow: 1;
    position: relative;
    cursor: crosshair;
}

svg {
    display: block;
    user-select: none;
    -webkit-user-select: none;
    width: 100%;
    height: 100%;
}

.link {
    stroke: #4a4a4a;
    stroke-opacity: 0.8;
    stroke-width: 3px;
    cursor: pointer;
    transition: stroke-width 0.1s;
}

.link:hover {
    stroke-width: 4px;
}

.node-group circle {
    fill: #ccc;
    stroke: #666;
    stroke-width: 2px;
    cursor: grab;
    transition: fill 0.5s, filter 0.1s;
}

.node-group:hover circle {
    filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.5));
}

.node-group text {
    fill: #222;
    font-family: sans-serif;
    font-size: 14px;
    font-weight: bold;
    text-anchor: middle;
    dominant-baseline: central;
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    text-shadow: 0px 0px 2px rgba(255, 255, 255, 0.5);
}

.dragLine {
    stroke: #888;
    stroke-width: 2px;
    pointer-events: none;
    opacity: 0.6;
}

.selection-rect {
    fill: rgba(255, 0, 0, 0.1);
    stroke: #ff3333;
    stroke-width: 1.5px;
    stroke-dasharray: 5, 5;
    pointer-events: none;
}

.hidden {
    display: none;
}

#control-panel {
    width: 350px;
    padding: 20px;
    background: #ffffff;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.05);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    z-index: 10;
}

h2 {
    margin-top: 0;
    color: #1f2937;
    font-size: 1.4rem;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 10px;
}

h3 {
    color: #374151;
    margin-top: 15px;
    margin-bottom: 8px;
}

.interaction-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.interaction-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    background: #f9fafb;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.interaction-list .action {
    font-weight: 600;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 4px;
}

.interaction-list .result {
    color: #6b7280;
    text-align: right;
}

kbd {
    background-color: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    padding: 2px 5px;
    font-family: inherit;
    font-size: 0.75rem;
    box-shadow: 0 1px 1px rgba(0,0,0,0.1);
    color: #374151;
}

button {
    padding: 10px 15px;
    background-color: #3b82f6;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s;
    margin-top: 15px;
}

button:hover {
    filter: brightness(90%);
}

button:disabled {
    background-color: #9ca3af;
    cursor: not-allowed;
}

textarea {
    width: 100%;
    height: 250px;
    margin-top: 10px;
    padding: 10px;
    font-family: monospace;
    font-size: 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    resize: vertical;
}

#status-output {
    padding: 10px;
    background-color: #e0f2f1;
    border: 1px solid #4db6ac;
    border-radius: 4px;
    margin-top: 0px;
    margin-bottom: 15px;
    font-size: 1rem;
    color: #004d40;
    font-weight: 600;
    min-height: 20px;
    word-wrap: break-word;
}

.generator-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

select, input[type="number"], input[type="text"] {
    padding: 8px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 14px;
}

select {
    flex-grow: 1;
}

input[type="number"] {
    width: 50px;
}

.mode-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 10px;
}

.mode-btn {
    padding: 6px 10px;
    font-size: 12px;
    background-color: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
    margin-top: 0;
    flex: 1;
    min-width: 70px;
}

.mode-btn.active {
    background-color: #3b82f6;
    color: white;
    border-color: #2563eb;
}

.mode-btn:hover:not(.active) {
    background-color: #e5e7eb;
}

.mt-auto {
    margin-top: auto;
}

.credits-section {
    font-size: 0.85rem;
    color: #6b7280;
    border-top: 1px solid #e5e7eb;
    padding-top: 15px;
    margin-top: 20px;
}

.credits-section h4 {
    margin: 0 0 8px 0;
    color: #374151;
    font-size: 0.95rem;
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.credits-section h4:hover {
    color: #1f2937;
}

.credits-section ul {
    padding-left: 20px;
    margin: 5px 0;
}

.credits-section li {
    margin-bottom: 4px;
}

.credits-section a {
    color: #3b82f6;
    text-decoration: none;
    transition: color 0.2s;
}

.credits-section a:hover {
    color: #2563eb;
    text-decoration: underline;
}

.license-link {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-left: 4px;
}

.license-link:hover {
    color: #6b7280;
}

/* Extracted inline styles as classes */
.toggle-header {
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.toggle-arrow {
    font-size: 0.8em;
}

.tutorial-content {
    margin-bottom: 10px;
}

.section-hr {
    margin: 15px 0;
}

.mode-section-label {
    margin-top: 10px;
}

.coloring-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: #374151;
}

.coloring-select {
    width: 100%;
    margin-top: 5px;
}

.s-input-container {
    margin-top: 10px;
}

.s-label {
    font-size: 0.85rem;
    color: #4b5563;
}

.s-input {
    width: 100%;
    box-sizing: border-box;
    margin-top: 5px;
}

.s-hint {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 4px;
}

.subgraph-order-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.subgraph-order-label {
    font-size: 0.9rem;
    color: #4b5563;
}

.subgraph-order-input {
    width: 60px;
}

.g6-bar {
    display: flex;
    gap: 5px;
    margin-bottom: 10px;
}

.g6-input {
    flex-grow: 1;
    font-family: monospace;
}

.g6-btn {
    margin-top: 0;
    padding: 8px;
}

.g6-save-btn {
    margin-top: 0;
    padding: 8px;
    background-color: #10b981;
}

.lp-toggle-header {
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
    margin-top: 15px;
}

.lp-textarea {
}

.credits-description {
    margin: 0 0 8px 0;
}

.credits-contact {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px dashed #e5e7eb;
}

.credits-contact-title {
    margin: 0 0 4px 0;
    font-weight: 600;
    color: #374151;
}

.credits-contact-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.credits-footer {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 10px;
    text-align: center;
}

.credits-footer a {
    color: #9ca3af;
    text-decoration: underline;
}
