* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    background: #f8fafc;
    color: #334155;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
}

h1 {
    color: #1e293b;
    margin-bottom: 8px;
    font-size: 28px;
}

.subtitle {
    color: #64748b;
    font-size: 14px;
}

.container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr;
    }
}

.panel {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

h2 {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

h2::before {
    font-size: 18px;
}

/* Target specific headings by their context */
#left-panel h2:nth-of-type(1)::before {
    content: "🗄️"; /* Database emoji for Schema */
}

#left-panel h2:nth-of-type(2)::before {
    content: "📝"; /* Memo emoji for SQL Query */
}

#right-panel h2::before {
    content: "📋"; /* Clipboard emoji for Results */
}

.schema {
    background: #f8fafc;
    padding: 12px 15px; /* Reduced padding */
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.6;
    color: #475569;
    margin-bottom: 20px;
    border: 1px solid #e2e8f0;
}

.schema ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.schema li {
    padding: 6px 0; /* Reduced padding */
    border-bottom: 1px dashed #e2e8f0;
}

.schema li:last-child {
    border-bottom: none;
}

.schema b {
    color: #1e40af;
    font-weight: 600;
}

.schema code {
    color: #059669;
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-size: 13px;
}

textarea {
    width: 100%;
    height: 160px; /* Increased height */
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-size: 14px;
    background: white;
    color: #1e293b;
    resize: vertical;
    transition: border-color 0.2s;
}

textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

button {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-run {
    background: #3b82f6;
    color: white;
    flex: 1;
}

.btn-run:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-reset {
    background: #94a3b8;
    color: white;
}

.btn-reset:hover {
    background: #64748b;
}

.results {
    margin-top: 15px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    min-height: 100px;
}

.results-inner {
    max-height: 400px;
    overflow: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

thead {
    background: #f1f5f9;
    position: sticky;
    top: 0;
}

th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #475569;
    border-bottom: 2px solid #e2e8f0;
    white-space: nowrap;
}

td {
    padding: 10px 12px;
    border-bottom: 1px solid #f1f5f9;
}

tbody tr:hover {
    background: #f8fafc;
}

.status {
    padding: 15px;
    text-align: center;
    color: #64748b;
    font-style: italic;
}

.error {
    background: #fee2e2;
    color: #dc2626;
    padding: 12px;
    border-radius: 8px;
    margin-top: 10px;
    border: 1px solid #fecaca;
    font-size: 14px;
}

.success {
    background: #dcfce7;
    color: #16a34a;
    padding: 12px;
    border-radius: 8px;
    margin-top: 10px;
    border: 1px solid #bbf7d0;
    font-size: 14px;
}

.row-count {
    padding: 10px 15px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 13px;
    border-top: 1px solid #e2e8f0;
}

footer {
    margin-top: 30px;
    text-align: center;
    color: #94a3b8;
    font-size: 12px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}