:root {
    --primary-color: #2196F3;
    --secondary-color: #FF4081;
    --background-color: #f8f9fa;
    --card-background: #ffffff;
    --text-primary: #333333;
    --text-secondary: #666666;
    --border-radius: 8px;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

body {
    margin: 0;
    padding: 20px;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: var(--background-color);
    color: var(--text-primary);
}

.container {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 24px;
    max-width: 1600px;
    margin: 0 auto;
    height: calc(100vh - 40px);
}

.input-section {
    background: var(--card-background);
    padding: 24px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: calc(100vh - 88px);
}

#inputContainer {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.input-section h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: 500;
}

#linkInput {
    flex: 1;
    min-height: 0;
    margin-top: 36px;
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: var(--border-radius);
    font-family: 'Consolas', monospace;
    font-size: 14px;
    line-height: 1.8;
    resize: none;
    transition: border-color 0.2s;
}

#linkInput:focus {
    outline: none;
    border-color: var(--primary-color);
}

.button-container {
    display: flex;
    gap: 12px;
}

button {
    padding: 12px 24px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s, transform 0.1s;
}

button:hover {
    background-color: #1976D2;
    transform: translateY(-1px);
}

button:active {
    transform: translateY(0);
}

.graph-section {
    background: var(--card-background);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    position: relative;
    height: calc(100vh - 88px);
}

/* Graph Elements Styling */
.nodes circle {
    stroke: white;
    stroke-width: 2px;
    transition: all 0.3s;
}

.nodes circle:hover {
    stroke: var(--primary-color);
    stroke-width: 3px;
    filter: drop-shadow(0 0 3px rgba(33, 150, 243, 0.4));
}

.links line {
    stroke: #999;
    stroke-opacity: 0.6;
    transition: stroke-opacity 0.3s;
}

.links line:hover {
    stroke-opacity: 1;
}

.node-label {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 12px;
    font-weight: 500;
    fill: var(--text-primary);
    pointer-events: none;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.link-label {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 10px;
    fill: var(--text-secondary);
    pointer-events: none;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

/* Controls overlay */
.controls-overlay {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    gap: 8px;
    background: rgba(255, 255, 255, 0.9);
    padding: 8px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.control-button {
    padding: 8px;
    background: transparent;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    color: var(--text-secondary);
}

.control-button:hover {
    background: #f0f0f0;
    color: var(--primary-color);
}

/* Tooltip */
.tooltip {
    position: absolute;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border-radius: 4px;
    font-size: 12px;
    pointer-events: none;
    z-index: 1000;
    display: none;
}

/* Add these to your existing CSS */
.input-view {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.input-view.hidden {
    display: none;
}

#linkTable {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
}

#linkTable th,
#linkTable td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}
#linkTable td {
    padding-top: 4px;
    padding-bottom: 4px;
}

#linkTable th {
    background: #f5f5f5;
    font-weight: 500;
    color: var(--text-secondary);
}

#linkTable tr {
    cursor: pointer;
    transition: background-color 0.2s;
}

#linkTable tbody tr:hover {
    background-color: #f8f9fa;
}

#linkTable td {
    font-family: 'Consolas', monospace;
    font-size: 14px;
}

.table-container {
    flex: 1;
    overflow-y: auto;
}

/* Style for invalid cells */
.invalid-cell {
    color: #dc3545;
    background-color: #fff3f3;
}

/* Ensure SVG fills the container */
#graph svg {
    width: 100%;
    height: 100%;
}

/* Add these highlight styles */
#linkTable tr.highlighted {
    background-color: #e3f2fd;
}

.link {
    fill: none;
    stroke: #999;
    stroke-opacity: 0.6;
    transition: stroke 0.3s, stroke-opacity 0.3s;
}

.link.highlighted {
    stroke: var(--primary-color) !important;
    stroke-opacity: 1 !important;
}

.link.highlighted + marker {
    fill: var(--primary-color) !important;
}

.node.highlighted {
    stroke: var(--primary-color) !important;
    stroke-width: 3px !important;
} 