.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
}

.modal-content {
    background-color: #1e1e1e;
    padding: 20px;
    padding: 20px;
    width: 100%;
    height: 100%;
    max-width: 1200px;
    border-radius: 8px;
    color: #fff;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.close-button {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0 10px;
}

.close-button:hover {
    color: #fff;
}

.visualizer-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    height: 100%;
}

.code-display {
    background-color: #2d2d2d;
    border-radius: 4px;
    padding: 10px;
    position: relative;
    overflow: auto;
}

.variables-display {
    background-color: #2d2d2d;
    border-radius: 4px;
    padding: 20px;
    max-height: 50%;
    overflow: auto;
}

.current-line {
    background-color: rgba(65, 105, 225, 0.4) !important;
    border-left: 3px solid #4169E1 !important;
}

.CodeMirror-line {
    transition: background-color 0.3s ease;
}

.CodeMirror {
    height: auto;
    min-height: 300px;
    font-family: 'Fira Code', monospace;
    font-size: 14px;
}

.error-line {
    background-color: rgba(255, 0, 0, 0.3) !important;
}

.error-message {
    color: #ff6b6b;
    margin-top: 10px;
    padding: 10px;
    background-color: rgba(255, 0, 0, 0.1);
    border-radius: 4px;
}

.variables-list {
    margin-top: 15px;
}

.variable {
    margin: 8px 0;
    padding: 8px;
    background-color: #363636;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.variable:hover {
    background-color: #404040;
}

.variable .name {
    color: #4CAF50;
    font-weight: bold;
    margin-right: 8px;
}

.variable .value {
    color: #64B5F6;
    font-family: monospace;
}

.controls {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.controls button {
    padding: 8px 16px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
}

.controls button:hover {
    background-color: #45a049;
    transform: translateY(-2px);
}

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

/* 禁用状态的按钮样式 */
.controls button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    transform: none;
}

.execution-info {
    margin-bottom: 15px;
    padding: 10px;
    background-color: #363636;
    border-radius: 4px;
}

.step-counter, .line-info {
    color: #bbb;
    margin: 5px 0;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: #2d2d2d;
    color: #fff;
}

.data-table th,
.data-table td {
    padding: 12px;
    text-align: left;
    border: 1px solid #444;
}

.data-table th {
    background-color: #363636;
    font-weight: bold;
}

.data-table tr:hover {
    background-color: #363636;
}

.data-table .current-row {
    background-color: rgba(65, 105, 225, 0.2);
}

#dataTableContainer {
    margin-top: 20px;
    max-height: 300px;
    overflow-y: auto;
    border-radius: 4px;
    border: 1px solid #444;
    scroll-behavior: smooth;
}

.data-table tr {
    transition: background-color 0.3s ease;
    height: 40px;
}

.current-row {
    background-color: rgba(65, 105, 225, 0.3) !important;
    border-left: 3px solid #4169E1;
}

/* 删除箭头样式 */
.current-row::before {
    display: none;
}

#dataTableContainer {
    margin-top: 20px;
    max-height: 400px;
    overflow-y: auto;
    border-radius: 4px;
    border: 1px solid #444;
    scroll-behavior: smooth;
    position: relative;
}

/* 自定义滚动条样式 */
#dataTableContainer::-webkit-scrollbar {
    width: 8px;
}

#dataTableContainer::-webkit-scrollbar-track {
    background: #2d2d2d;
}

#dataTableContainer::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 4px;
}

#dataTableContainer::-webkit-scrollbar-thumb:hover {
    background: #666;
}