* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Courier New', monospace;
    background: #1a1a1a;
    color: #e0e0e0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

.header {
    background: #2d2d2d;
    padding: 15px 20px;
    border-bottom: 2px solid #444;
}

.header h1 {
    font-size: 24px;
    color: #4a9eff;
    margin-bottom: 5px;
}

.subtitle {
    font-size: 12px;
    color: #888;
}

.controls {
    background: #252525;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    border-bottom: 1px solid #444;
    flex-wrap: wrap;
}

.control-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.control-group label {
    font-size: 13px;
    cursor: pointer;
    user-select: none;
}

.control-group input[type="checkbox"] {
    margin-right: 5px;
    cursor: pointer;
}

.run-button {
    background: #4a9eff;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: background 0.2s;
}

.run-button:hover {
    background: #3a8eef;
}

.run-button:active {
    background: #2a7edf;
}

#example-select {
    background: #333;
    color: #e0e0e0;
    border: 1px solid #555;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
}

.container {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.left-panel, .right-panel {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.left-panel {
    width: 50%;
    border-right: 1px solid #444;
}

.right-panel {
    width: 50%;
}

.panel-header {
    background: #2d2d2d;
    padding: 8px 15px;
    font-size: 12px;
    color: #aaa;
    border-bottom: 1px solid #444;
}

#code-editor {
    flex: 1;
    background: #1e1e1e;
    color: #d4d4d4;
    border: none;
    padding: 15px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    resize: none;
    outline: none;
    line-height: 1.5;
}

.tabs {
    display: flex;
    background: #252525;
    border-bottom: 1px solid #444;
}

.tab {
    background: #2d2d2d;
    color: #aaa;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 13px;
    border-right: 1px solid #444;
    transition: background 0.2s;
}

.tab:hover {
    background: #333;
}

.tab.active {
    background: #1a1a1a;
    color: #4a9eff;
    border-bottom: 2px solid #4a9eff;
}

.tab-content {
    display: none;
    flex: 1;
    overflow: auto;
    background: #1a1a1a;
}

.tab-content.active {
    display: flex;
    flex-direction: column;
}

#console-output, #optimizer-log, #json-output {
    flex: 1;
    padding: 15px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.6;
    white-space: pre-wrap;
    overflow: auto;
    color: #d4d4d4;
}

#optimizer-log {
    color: #4a9eff;
}

#json-output {
    color: #9cdcfe;
}

.pgo-loading {
    padding: 40px;
    text-align: center;
    color: #666;
    font-style: italic;
}

#pgo-visualizer {
    flex: 1;
    padding: 20px;
    overflow: auto;
}

.function-section {
    margin-bottom: 30px;
    background: #252525;
    border-radius: 6px;
    padding: 15px;
    border: 1px solid #444;
}

.function-header {
    font-size: 16px;
    color: #4a9eff;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #444;
}

.optimization-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.optimization-table th {
    background: #2d2d2d;
    color: #aaa;
    padding: 10px;
    text-align: left;
    border-bottom: 2px solid #444;
}

.optimization-table td {
    padding: 10px;
    border-bottom: 1px solid #333;
}

.optimization-table tr:hover {
    background: #2d2d2d;
}

.hot-badge {
    display: inline-block;
    background: #ff4444;
    color: white;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: bold;
}

.cold-badge {
    display: inline-block;
    background: #4444ff;
    color: white;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: bold;
}

.hotness-bar {
    width: 100%;
    height: 8px;
    background: #333;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 5px;
}

.hotness-fill {
    height: 100%;
    background: linear-gradient(90deg, #4a9eff, #ff4444);
    transition: width 0.3s;
}

.footer {
    background: #252525;
    padding: 8px 20px;
    text-align: center;
    font-size: 11px;
    color: #666;
    border-top: 1px solid #444;
}

