/* Full Screen Layout */
.map-view-container {
    /* position: absolute;
    top: 0;
    left: 0; */
    width: 100%;
    height: 100%;
}

.drop-zone {
    position: relative;
    width: 100%;
    margin-bottom: var(--spacing-md);
    transition: var(--transition-normal);
}

.drop-zone.drag-over {
    transform: scale(1.02);
}

#markdown-input {
    width: 100%;
    height: 250px;
    padding: var(--spacing-md);
    border: 2px dashed var(--card-border);
    border-radius: var(--radius-lg);
    background: var(--card-bg);
    color: var(--text-color);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem;
    resize: vertical;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

#markdown-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.controls {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: center;
    margin-bottom: var(--spacing-xl);
}

.btn-primary,
.btn-secondary {
    padding: 0.75rem 2rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 1rem;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
    filter: brightness(1.1);
}

.btn-secondary {
    background: white;
    color: var(--text-color);
    border: 1px solid var(--card-border);
}

.btn-secondary:hover {
    background: var(--bg-color);
    border-color: var(--text-muted);
}

.map-container {
    width: 100%;
    height: 100%;
    background: #f0f2f5;
    overflow: hidden;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 800px;
    padding: var(--spacing-xl);
    border-radius: var(--radius-xl);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-trigger-btn {
    position: relative;
    top: 20px;
    left: 20px;
    z-index: 100;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--card-border);
    color: var(--primary-color);
    font-weight: 800;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-trigger-btn:hover {
    transform: scale(1.1);
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.map-container.hidden {
    display: none;
}

#markmap-svg {
    width: 100%;
    height: 100%;
}

.markmap-node line {
    display: none !important;
}

.markmap-node circle {
    display: none !important;
}

.markmap-node path {
    display: none !important;
}

.markmap-foreign {
    overflow: visible !important;
}

.markmap-foreign {
    overflow: visible !important;
}

.markmap-foreign div {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    overflow: visible !important;
}

.markmap-foreign div div {
    display: inline-block !important;
    width: auto !important;
    border-radius: 12px !important;
    padding: 10px 24px !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    color: white !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    transform: translateY(50%) !important;
    /* Center the box on the line */
}

/* Branch Coloring based on data-path prefixes */
/* Root - Level 1 */
.markmap-node[data-depth="1"] .markmap-foreign div div {
    background: #4cc9f0 !important;
    /* Light blue root */
    border-radius: 50px !important;
    /* Circle/Oval */
    padding: 20px 40px !important;
    font-size: 1.5rem !important;
}

/* Unified Green Coloring for all non-root nodes */
.markmap-node:not([data-depth="1"]) .markmap-foreign div div {
    background: #90be6d !important;
    /* Unified Green */
}

/* Unified Green Coloring for all links */
.markmap-link {
    stroke: #90be6d !important;
    /* Unified Green */
    stroke-width: 4px !important;
    stroke-opacity: 0.8 !important;
}

.markmap-node:hover .markmap-foreign div div {
    transform: scale(1.1);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2) !important;
}

.markmap-node-text {
    font-family: var(--font-family);
    fill: white;
}

@media (max-width: 640px) {
    .controls {
        flex-direction: column;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
    }

    .map-container {
        height: 400px;
    }
}