/**
 * Semantic Mind Map Styles
 */

.mindmap-page {
    height: calc(100vh - 80px);
    /* Adjust for header height */
    overflow: hidden;
    background: var(--color-background);
    display: flex;
    flex-direction: column;
}

.mindmap-container {
    flex: 1;
    position: relative;
    width: 100%;
}

#mindmap-canvas {
    width: 100%;
    height: 100%;
    min-height: 500px;
    background: radial-gradient(circle at center, var(--color-surface) 0%, var(--color-background) 100%);
    flex-grow: 1;
}

/* Controls Panel */
.mindmap-controls {
    position: absolute;
    top: 20px;
    left: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 15px 8px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
    z-index: 10;
    width: 72px;
    align-items: center;
}

.control-group-label {
    font-size: 10px;
    color: #94a3b8;
    font-weight: 800;
    margin-top: 6px;
    margin-bottom: 2px;
    text-align: center;
    width: 100%;
    transform: scale(0.9);
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    align-items: center;
}

/* Dark mode adjustments for controls removed as glassmorphism is now universal */

/* Style Studio Theme Pills */
.control-group.styles {
    flex-wrap: wrap;
    justify-content: flex-start;
}

.style-dot {
    width: 52px;
    height: 22px;
    padding: 0;
    border-radius: 6px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 800;
    color: white;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
}

.style-dot[data-theme="bloom"] {
    background: #3b82f6;
}

.style-dot[data-theme="minimal"] {
    background: #64748b;
}

.style-dot[data-theme="neon"] {
    background: #10b981;
}

.style-dot[data-theme="forest"] {
    background: #059669;
}

.style-dot[data-theme="ocean"] {
    background: #0891b2;
}

.style-dot[data-theme="solar"] {
    background: #d97706;
}

.style-dot.active {
    border-color: #334155;
    transform: scale(1.1);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.theme-label {
    pointer-events: none;
}

.mindmap-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: none;
    background: white;
    color: #334155;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.mindmap-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    background: #f8fafc;
}

.mindmap-btn.active {
    background: #3b82f6;
    color: white;
}

#btn-random {
    width: 44px;
    height: 44px;
    font-size: 20px;
}

/* Legend - Now integrated into controls */
.mindmap-legend {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 5px 0;
    width: 100%;
}

[data-theme="dark"] .mindmap-legend {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 8px 0 0 0;
    width: 100%;
}

.legend-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-size: 9px;
    color: #64748b;
    font-weight: 800;
    margin-bottom: 4px;
}

.legend-dot {
    width: 32px;
    height: 6px;
    border-radius: 3px;
}

.legend-item {
    margin-bottom: 6px;
}

.legend-item:last-child {
    margin-bottom: 0;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.legend-color.synonym {
    background: #10b981;
}

.legend-color.antonym {
    background: #f59e0b;
}

.legend-color.collocation {
    background: #06b6d4;
}

.legend-color.center {
    background: var(--color-primary);
}

/* Detail Panel */
.word-detail-aside {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 340px;
    z-index: 10;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    padding: 24px;
    max-height: calc(100% - 40px);
    overflow-y: auto;
    opacity: 0;
    transform: translateX(20px);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.word-detail-aside.active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.word-detail-aside .detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.word-detail-aside .detail-word {
    font-size: 2rem;
    font-weight: 800;
    font-family: var(--font-heading);
    color: var(--color-text);
    margin-bottom: 4px;
}

.word-detail-aside .detail-translation {
    font-size: 1.1rem;
    color: var(--color-text-muted);
    font-weight: 500;
}

.detail-section {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border-light);
}

.detail-section h4 {
    font-size: 0.9rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-text-muted);
    margin-bottom: 12px;
}

.detail-example {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-background);
    padding: 12px;
    border-radius: 12px;
}

.detail-actions {
    margin-top: 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}


.aside-close {
    background: var(--color-background);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.aside-close:hover {
    background: var(--color-error-light);
    color: var(--color-error);
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .word-detail-aside {
        width: calc(100% - 32px);
        left: 16px;
        right: 16px;
        bottom: 16px;
        top: auto;
        max-height: 50vh;
        transform: translateY(20px);
    }

    .word-detail-aside.active {
        transform: translateY(0);
    }

    .mindmap-controls {
        top: 16px;
        left: 16px;
    }

    .mindmap-legend {
        display: none;
        /* Hide on small screens to save space */
    }
}