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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0a0a0a;
    color: #fff;
    overflow: hidden;
}

#controls {
    position: fixed;
    top: 20px;
    left: 20px;
    background: rgba(20, 20, 20, 0.95);
    padding: 20px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    max-width: 300px;
    z-index: 1000;
    border: 1px solid rgba(236, 55, 80, 0.3);
}

h1 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #ec3750;
}

.input-group {
    margin-bottom: 15px;
}

label {
    display: block;
    font-size: 12px;
    margin-bottom: 5px;
    color: #999;
}

input, select {
    width: 100%;
    padding: 8px;
    background: rgba(40, 40, 40, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: #fff;
    font-size: 14px;
}

input:focus, select:focus {
    outline: none;
    border-color: #ec3750;
}

button {
    width: 100%;
    padding: 10px;
    background: #ec3750;
    border: none;
    border-radius: 4px;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    margin-top: 10px;
}

button:hover {
    background: #ff4560;
}

button:active {
    transform: scale(0.98);
}

#stats {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 12px;
    color: #999;
}

#stats div {
    margin-bottom: 5px;
}

#graph {
    width: 100vw;
    height: 100vh;
}

.link {
    stroke: rgba(236, 55, 80, 0.3);
    stroke-width: 1px;
    fill: none;
}

.link.highlighted {
    stroke: #ec3750;
    stroke-width: 3px;
}

.node circle {
    fill: #ec3750;
    stroke: #fff;
    stroke-width: 2px;
    cursor: pointer;
}

.node circle:hover {
    fill: #ff4560;
    stroke-width: 3px;
}

.node.highlighted circle {
    fill: #ffcc00;
    stroke: #ffcc00;
    stroke-width: 4px;
}

.node text {
    font-size: 10px;
    fill: #fff;
    pointer-events: none;
    text-anchor: middle;
    dominant-baseline: middle;
}

#tooltip {
    position: fixed;
    background: rgba(20, 20, 20, 0.95);
    padding: 10px 15px;
    border-radius: 6px;
    pointer-events: none;
    display: none;
    font-size: 12px;
    border: 1px solid rgba(236, 55, 80, 0.5);
    backdrop-filter: blur(10px);
    z-index: 2000;
}

#tooltip .channel-name {
    color: #ec3750;
    font-weight: 600;
    margin-bottom: 5px;
}

#tooltip .connections {
    color: #999;
}

#loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 18px;
    color: #ec3750;
}

.datalist-option {
    background: #1a1a1a;
    color: #fff;
}

#startup-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    backdrop-filter: blur(10px);
}

#startup-content {
    background: rgba(20, 20, 20, 0.95);
    padding: 30px;
    border-radius: 12px;
    max-width: 500px;
    border: 1px solid rgba(236, 55, 80, 0.3);
    text-align: center;
}

#startup-content h2 {
    color: #ec3750;
    margin-bottom: 20px;
    font-size: 24px;
}

#startup-content p {
    color: #999;
    margin-bottom: 25px;
    line-height: 1.6;
}

.toggle-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 25px;
}

.toggle-group label {
    color: #fff;
    font-size: 14px;
    margin: 0;
}

.toggle-switch {
    position: relative;
    width: 50px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #2a2a2a;
    transition: .4s;
    border-radius: 26px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #ec3750;
}

input:checked + .slider:before {
    transform: translateX(24px);
}

.github-links {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 12px;
    color: #999;
}

.github-links a {
    color: #ec3750;
    text-decoration: none;
}

.github-links a:hover {
    text-decoration: underline;
}

.github-links span {
    margin: 0 8px;
    color: #666;
}

.footer-links {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 11px;
    text-align: center;
}

.footer-links a {
    color: #ec3750;
    text-decoration: none;
}

.footer-links a:hover {
    text-decoration: underline;
}

.footer-links span {
    margin: 0 8px;
    color: #666;
}
