/* Graph visualization styles */
.graph-container {
    width: 100%;
    height: 80vh;
    background-color: rgba(21, 26, 45, 0.8);
    border-radius: var(--border-radius);
    margin: 2rem 0;
    overflow: hidden;
    position: relative;
}

/* Update graph container to fill available space */
.graph-container {
    flex: 1;
    width: 100%;
    height: 100%;
    margin: 0;
    border-radius: 0;
}

.kanji-node {
    cursor: pointer;
}

.kanji-node:hover {
    filter: brightness(1.5);
}

.kanji-link {
    stroke-opacity: 0.6;
    stroke-width: 1.5px;
}

.loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--light-text);
    font-size: 1.2rem;
}

/* Graph loading overlay */
.graph-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(21, 26, 45, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    margin-top: 1rem;
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Zoom controls in bottom right corner (all screen sizes) */
.zoom-controls {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    z-index: 10;
}

.zoom-controls .zoom-btn {
    width: 40px;
    height: 40px;
    font-size: 1rem;
}

.zoom-btn {
    background-color: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--light-text);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.zoom-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Smaller zoom controls on mobile */
@media (max-width: 768px) {
    .zoom-controls {
        gap: 0.25rem;
        bottom: 0.5rem;
        right: 0.5rem;
    }

    .zoom-controls .zoom-btn {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }
}