:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --bg-light: #f8fafc;
    --card-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(226, 232, 240, 0.8);
    --text-main: #1e293b;
    --text-muted: #64748b;
    --accent: #f43f5e;
    --success: #10b981;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.container {
    width: 100%;
    max-width: 950px;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 32px;
    padding: 3.5rem;
    box-shadow: var(--shadow-lg);
    animation: fadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    margin-bottom: 2rem;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Branding */
h1.brand {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
    display: flex;
    justify-content: center;
}

h1.brand span.mask { color: #4f46e5; }
h1.brand span.my { color: #ec4899; }
h1.brand span.pdf { color: #10b981; }

p.subtitle {
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    text-align: center;
    font-size: 1.1rem;
}

.section {
    margin-bottom: 2.5rem;
}

.section-title {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 1.25rem;
    display: block;
}

/* Inputs */
#words-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1rem;
}

.word-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

input[type="text"] {
    width: 100%;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    padding: 0.875rem 1.125rem;
    color: var(--text-main);
    outline: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.95rem;
    box-shadow: var(--shadow-sm);
}

input[type="text"]:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
    background: #fff;
}

.remove-btn {
    position: absolute;
    right: 10px;
    background: #fee2e2;
    border: none;
    color: #ef4444;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.2s;
}

.word-input-group:hover .remove-btn {
    opacity: 1;
}

.remove-btn:hover {
    background: #fecaca;
    transform: scale(1.1);
}

/* Smart Redaction Grid */
.smart-redaction-grid {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
}

.checkbox-container {
    color: var(--text-main);
    font-weight: 500;
    transition: color 0.2s;
}

.checkbox-container:hover {
    color: var(--primary);
}

/* Upload Area */
.upload-zone {
    border: 2px dashed #cbd5e1;
    border-radius: 20px;
    padding: 4rem 2rem;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

.upload-zone:hover, .upload-zone.dragging {
    border-color: var(--primary);
    background: #f5f3ff;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 1.25rem;
    color: var(--primary);
    filter: drop-shadow(0 4px 6px rgba(79, 70, 229, 0.2));
}

/* Buttons */
.btn {
    padding: 0.875rem 1.75rem;
    border-radius: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 0.95rem;
}

.btn-primary {
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #4338ca 0%, #4f46e5 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
}

.btn-secondary {
    background: #ffffff;
    color: var(--text-main);
    border: 1px solid #e2e8f0;
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

.btn-action {
    width: 100%;
    justify-content: center;
    font-size: 1.125rem;
    padding: 1.25rem;
    margin-top: 1.5rem;
}

/* Extraction Results */
#extraction-results {
    background: #ffffff !important;
    box-shadow: var(--shadow-lg);
}

/* Footer */
footer {
    text-align: center;
    margin-top: 1rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.dev-credit {
    font-weight: 600;
    color: var(--text-main);
}

.mobile-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    color: var(--primary);
    font-weight: 700;
}

/* Status List */
#status-list {
    margin-top: 2.5rem;
    padding: 1.5rem;
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    max-height: 250px;
    overflow-y: auto;
    box-shadow: var(--shadow-sm);
}

.status-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.status-success { color: var(--success); font-weight: 600; }
.status-error { color: var(--accent); font-weight: 600; }

/* Progress Bar */
.progress-container {
    height: 10px;
    background: #f1f5f9;
    border-radius: 5px;
    margin-bottom: 2rem;
    overflow: hidden;
}

.progress-bar {
    background: var(--success);
}
