:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --error-color: #ef4444;
    --success-color: #22c55e;
    --radius: 12px;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 2rem;
}

.container {
    width: 100%;
    max-width: 800px;
}

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

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
}

h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

/* File Upload */
.file-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 600px) {
    .file-inputs {
        grid-template-columns: 1fr;
    }
}

.file-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.file-drop-area {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius);
    padding: 2rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    background: #fdfdfd;
}

.file-drop-area:hover, .file-drop-area.dragover {
    border-color: var(--primary-color);
    background: #f0fdf4; /* Light green hint or just lighter primary */
    background: rgba(99, 102, 241, 0.05);
}

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

.file-msg {
    display: block;
    color: var(--text-muted);
    font-size: 0.9rem;
    pointer-events: none;
}

.file-name {
    display: block;
    margin-top: 0.5rem;
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.85rem;
    word-break: break-all;
}

/* Dynamic Inputs */
.input-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

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

input[type="text"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.btn-remove {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-remove:hover {
    background-color: #fee2e2;
    color: var(--error-color);
}

.btn-secondary {
    background: white;
    border: 1px dashed var(--border-color);
    color: var(--primary-color);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    width: 100%;
    transition: all 0.2s;
}

.btn-secondary:hover {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
}

/* Actions */
.actions {
    margin-top: 2rem;
    text-align: center;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem 3rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

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

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Loader */
.loader {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid #ffffff;
    border-bottom-color: transparent;
    border-radius: 50%;
    animation: rotation 1s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}

.btn-primary.loading .btn-text {
    display: none;
}

.btn-primary.loading .loader {
    display: inline-block;
}

@keyframes rotation {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Toast */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--text-main);
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    z-index: 100;
    opacity: 1;
    transition: opacity 0.3s, transform 0.3s;
}

.toast.hidden {
    opacity: 0;
    transform: translate(-50%, 20px);
    pointer-events: none;
}

.toast.error {
    background: var(--error-color);}

/* ============================================
   MOBILE RESPONSIVE STYLES
   ============================================ */

/* Tablet and below (768px) */
@media (max-width: 768px) {
    body {
        padding: 1rem;
    }
    
    .container {
        max-width: 100%;
    }
    
    header {
        margin-bottom: 2rem;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    header p {
        font-size: 1rem;
    }
    
    .card {
        padding: 1.5rem;
    }
    
    /* Stack file inputs on mobile */
    .file-inputs {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    /* Smaller file drop areas */
    .file-drop-area {
        padding: 1.5rem 1rem;
    }
    
    /* Stack input rows on very small screens */
    .input-row {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .input-row input {
        width: 100%;
    }
    
    .btn-remove {
        align-self: flex-end;
    }
    
    /* Smaller buttons */
    .btn-primary {
        padding: 0.875rem 2rem;
        font-size: 1rem;
        width: 100%;
    }
    
    .btn-secondary {
        padding: 0.75rem 1rem;
    }
}

/* Mobile phones (480px and below) */
@media (max-width: 480px) {
    body {
        padding: 0.75rem;
    }
    
    header h1 {
        font-size: 1.75rem;
    }
    
    header p {
        font-size: 0.9rem;
    }
    
    .card {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    h2 {
        font-size: 1.1rem;
    }
    
    .subtitle {
        font-size: 0.85rem;
    }
    
    .file-drop-area {
        padding: 1rem 0.75rem;
    }
    
    .file-msg {
        font-size: 0.85rem;
    }
    
    input[type="text"] {
        padding: 0.625rem 0.875rem;
        font-size: 0.9rem;
    }
    
    .btn-primary {
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
    }
    
    .toast {
        bottom: 1rem;
        padding: 0.875rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* Improve touch targets for mobile */
@media (hover: none) and (pointer: coarse) {
    .btn-remove {
        min-width: 44px;
        min-height: 44px;
    }
    
    .btn-secondary,
    .btn-primary {
        min-height: 44px;
    }
    
    input[type="text"] {
        min-height: 44px;
    }
}

/* Landscape mobile optimization */
@media (max-width: 768px) and (orientation: landscape) {
    body {
        padding: 0.5rem;
    }
    
    header {
        margin-bottom: 1rem;
    }
    
    header h1 {
        font-size: 1.5rem;
    }
    
    .card {
        padding: 1rem;
    }
}

