:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: rgba(148, 163, 184, 0.2);
    --success-color: #10b981;
    --error-color: #ef4444;
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
}

.background-mesh {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background:
        radial-gradient(circle at 15% 50%, rgba(99, 102, 241, 0.15), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(16, 185, 129, 0.15), transparent 25%);
}

.container {
    width: 100%;
    max-width: 600px;
    padding: 2rem;
    text-align: center;
}

header {
    margin-bottom: 3rem;
    animation: fadeInDown 0.8s ease-out;
}

.logo {
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--primary-color);
    text-transform: uppercase;
    margin-bottom: 1rem;
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 9999px;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

h1 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.125rem;
}

.upload-zone {
    background: var(--card-bg);
    border: 2px dashed var(--border-color);
    border-radius: 1rem;
    padding: 3rem 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(12px);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.upload-zone:hover,
.upload-zone.drag-over {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px -10px rgba(99, 102, 241, 0.3);
}

.upload-zone .icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.2));
}

.upload-zone h2 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.upload-zone p {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.status-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    text-align: left;
    backdrop-filter: blur(12px);
    opacity: 0.8;
    transition: all 0.3s;
    animation: fadeInUp 0.8s ease-out 0.4s backwards;
}

.status-card.processing {
    border-color: var(--primary-color);
    opacity: 1;
}

.status-card.success {
    border-color: var(--success-color);
    background: rgba(16, 185, 129, 0.05);
}

.status-card.error {
    border-color: var(--error-color);
    background: rgba(239, 68, 68, 0.05);
}

.status-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    background: rgba(148, 163, 184, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.status-text h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.status-text p {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.terminal {
    margin-top: 1rem;
    text-align: left;
    background: #000;
    padding: 1rem;
    border-radius: 0.5rem;
    font-family: monospace;
    font-size: 0.8rem;
    color: #0f0;
    max-height: 150px;
    overflow-y: auto;
    white-space: pre-wrap;
}

footer {
    margin-top: 3rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    opacity: 0.6;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

/* --- Translation Table Styles --- */
.table-container {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-top: 2rem;
    text-align: left;
    backdrop-filter: blur(12px);
    overflow: hidden;
    animation: fadeInUp 0.8s ease-out 0.6s backwards;
}

.table-container h3 {
    margin-bottom: 1rem;
    color: var(--text-main);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    max-height: 400px;
    /* Scrollable height */
    overflow-y: auto;
}

#comparison-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

#comparison-table th,
#comparison-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

#comparison-table th {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    font-weight: 600;
    position: sticky;
    top: 0;
    backdrop-filter: blur(4px);
    /* For sticky header effect */
    z-index: 10;
}

#comparison-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

#comparison-table td {
    color: var(--text-muted);
}

/* Highlight match columns */
#comparison-table td:nth-child(2),
#comparison-table td:nth-child(4) {
    color: var(--text-main);
    /* Chinese text brighter */
}