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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #1a1a2e;
    color: #eee;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

header h1 {
    font-size: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: #888;
    margin-top: 0.5rem;
}

.config-panel {
    background: #16213e;
    padding: 1.5rem;
    border-radius: 8px;
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

.input-group {
    flex: 1;
    min-width: 200px;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #888;
    font-size: 0.85rem;
}

.input-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #333;
    border-radius: 4px;
    background: #0f0f1a;
    color: #eee;
    font-size: 0.9rem;
}

button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    cursor: pointer;
    font-size: 0.9rem;
    transition: opacity 0.2s;
}

button:hover {
    opacity: 0.9;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.viewer {
    margin-top: 2rem;
}

.hidden {
    display: none !important;
}

.timeline-container {
    background: #16213e;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.file-name {
    font-weight: bold;
    color: #667eea;
}

.version-info {
    color: #888;
}

.timeline-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.timeline-controls input[type="range"] {
    flex: 1;
    height: 8px;
    -webkit-appearance: none;
    background: #333;
    border-radius: 4px;
    outline: none;
}

.timeline-controls input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    cursor: pointer;
}

.timeline-controls button {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.timestamp {
    text-align: center;
    margin-top: 1rem;
    color: #888;
    font-family: monospace;
}

.view-toggle {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.view-toggle button {
    background: #16213e;
    flex: 1;
}

.view-toggle button.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.content-view, .diff-view {
    background: #0f0f1a;
    border-radius: 8px;
    padding: 1.5rem;
    overflow-x: auto;
}

.content-view pre, .diff-view pre, .split-pane pre {
    font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.split-view {
    display: flex;
    gap: 1rem;
}

.split-pane {
    flex: 1;
    background: #0f0f1a;
    border-radius: 8px;
    padding: 1rem;
    overflow-x: auto;
}

.split-pane h3 {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #333;
}

/* Diff highlighting */
.diff-add {
    background: rgba(0, 255, 0, 0.15);
    color: #4ade80;
}

.diff-remove {
    background: rgba(255, 0, 0, 0.15);
    color: #f87171;
}

.diff-header {
    color: #60a5fa;
}

.diff-context {
    color: #888;
}

.error {
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid #f87171;
    color: #f87171;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
}

/* Loading state */
.loading {
    text-align: center;
    padding: 2rem;
    color: #888;
}

.loading::after {
    content: '';
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}
