:root {
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --secondary: #10b981;
    --background: #0f172a;
    --surface: #1e293b;
    --surface-light: #334155;
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --border: #334155;
    --accent: #f59e0b;
    --error: #ef4444;
    --success: #10b981;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, var(--background) 0%, #1a2332 100%);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 1800px;
    margin: 0 auto;
    padding: 20px;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    background: var(--surface);
    border-radius: 16px;
    padding: 24px 32px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.header h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.controls {
    display: flex;
    gap: 12px;
    align-items: center;
}

.api-input {
    flex: 1;
    padding: 12px 16px;
    background: var(--background);
    border: 2px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 14px;
    transition: all 0.2s;
}

.api-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.model-select {
    padding: 12px 16px;
    background: var(--background);
    border: 2px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 14px;
    min-width: 220px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.model-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.model-select:hover {
    border-color: var(--primary);
}

.btn-primary,
.btn-secondary,
.btn-clear {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
}

.btn-secondary {
    background: var(--surface-light);
    color: var(--text);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--border);
}

.btn-primary:disabled,
.btn-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-clear {
    padding: 8px 16px;
    background: var(--error);
    color: white;
    font-size: 12px;
}

.btn-clear:hover {
    background: #dc2626;
}

/* Main Content */
.main-content {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 20px;
    flex: 1;
    overflow: hidden;
}

/* Left Panel */
.left-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
}

.input-card,
.status-card,
.files-card,
.issues-card {
    background: var(--surface);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--border);
}

.input-card h2,
.status-card h2,
.files-card h2,
.issues-card h2 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-input {
    width: 100%;
    padding: 12px;
    background: var(--background);
    border: 2px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
    transition: all 0.2s;
}

.user-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.user-input::placeholder {
    color: var(--text-muted);
}

.status-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.status-item:last-child {
    border-bottom: none;
}

.label {
    color: var(--text-muted);
    font-size: 14px;
}

.value {
    color: var(--text);
    font-weight: 500;
    font-size: 14px;
}

.file-list,
.issue-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.file-item,
.issue-item {
    padding: 12px;
    background: var(--background);
    border-radius: 8px;
    border: 1px solid var(--border);
    font-size: 13px;
    transition: all 0.2s;
}

.file-item:hover,
.issue-item:hover {
    border-color: var(--primary);
    transform: translateX(4px);
}

.file-name {
    font-weight: 600;
    color: var(--secondary);
}

.issue-title {
    font-weight: 600;
    color: var(--accent);
}

.issue-status {
    margin-top: 4px;
    font-size: 12px;
    color: var(--text-muted);
}

/* Right Panel - Hansard */
.right-panel {
    background: var(--surface);
    border-radius: 12px;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.hansard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 2px solid var(--border);
}

.hansard-header h2 {
    font-size: 16px;
    font-weight: 600;
}

.hansard {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.hansard-entry {
    margin-bottom: 20px;
    padding: 16px;
    border-left: 4px solid var(--border);
    background: var(--background);
    border-radius: 0 8px 8px 0;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.hansard-entry.speaker {
    border-left-color: var(--primary);
}

.hansard-entry.member {
    border-left-color: var(--secondary);
}

.hansard-entry.system {
    border-left-color: var(--accent);
}

.hansard-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 12px;
}

.hansard-speaker {
    font-weight: 700;
    color: var(--text);
}

.hansard-speaker.speaker-role {
    color: var(--primary);
}

.hansard-speaker.member-role {
    color: var(--secondary);
}

.hansard-time {
    color: var(--text-muted);
}

.hansard-message {
    color: var(--text);
    font-size: 14px;
    line-height: 1.6;
    white-space: pre-wrap;
}

.hansard-command {
    margin-top: 8px;
    padding: 8px 12px;
    background: var(--surface-light);
    border-radius: 4px;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    color: var(--accent);
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--background);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--surface-light);
}

/* Responsive */
@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 1fr;
    }

    .left-panel {
        max-height: 400px;
    }
}