:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --bg-color: #f8fafc;
    --text-color: #1e293b;
    --border-color: #cbd5e1;
}

body {
    font-family: system-ui, -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    margin: 0;
    padding: 2rem;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

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

h1 {
    margin-top: 0;
    color: var(--primary-color);
}

.file-drop-area {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 3rem 2rem;
    text-align: center;
    margin-bottom: 1rem;
    position: relative;
    background: #f1f5f9;
    transition: 0.3s;
}

.file-drop-area:hover {
    border-color: var(--primary-color);
}

.file-drop-area input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

button {
    width: 100%;
    padding: 1rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}

button:hover {
    background-color: var(--primary-hover);
}

button:disabled {
    background-color: var(--border-color);
    cursor: not-allowed;
}

.hidden {
    display: none;
}

#loading {
    text-align: center;
    margin-top: 2rem;
    font-weight: bold;
    color: var(--primary-color);
}

#resultContainer {
    margin-top: 2rem;
}

pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    font-family: monospace;
}

/* NEW: Image Preview Styles */
#imagePreviewContainer {
    margin-top: 2rem;
    text-align: center;
    background: #f1f5f9;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

#imagePreview {
    max-width: 100%;
    max-height: 350px;
    border-radius: 6px;
    object-fit: contain;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

/* NEW: Table Styles */
.table-responsive {
    overflow-x: auto;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    border: 1px solid var(--border-color);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-size: 0.95rem;
}

td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: top;
}

tr:last-child td {
    border-bottom: none;
}

td:first-child {
    font-weight: bold;
    width: 25%;
    background-color: #f1f5f9;
    color: var(--primary-color);
    text-transform: capitalize;
}

.copy-btn {
    background-color: #e2e8f0;
    color: #475569;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s ease;
    width: 80px;
}

.copy-btn:hover {
    background-color: #cbd5e1;
    color: #1e293b;
}

.copy-btn.copied {
    background-color: var(--primary-color);
    color: white;
}

td:last-child {
    width: 100px;
    text-align: right;
}