:root {
    --primary: #25D366; /* WhatsApp Green */
    --primary-dark: #128C7E;
    --bg-dark: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: rgba(255, 255, 255, 0.1);
    --ring: rgba(37, 211, 102, 0.5);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow-x: hidden;
    padding: 2rem;
}

/* Background Animated Shapes */
.background-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 20s infinite alternate;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: #25D366;
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.shape-2 {
    width: 500px;
    height: 500px;
    background: #0ea5e9;
    bottom: -200px;
    right: -100px;
    animation-delay: -5s;
}

.shape-3 {
    width: 300px;
    height: 300px;
    background: #8b5cf6;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, 50px) scale(1.1); }
}

.container {
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Header */
.header {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
    box-shadow: 0 10px 25px -5px rgba(37, 211, 102, 0.4);
}

.logo-icon svg {
    width: 32px;
    height: 32px;
    color: white;
}

.header h1 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    background: linear-gradient(to right, #fff, #cbd5e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

/* Card / Glassmorphism */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

label {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-main);
}

/* File Upload */
.file-upload-wrapper {
    position: relative;
    border: 2px dashed var(--border);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.02);
}

.file-upload-wrapper:hover, .file-upload-wrapper.dragover {
    border-color: var(--primary);
    background: rgba(37, 211, 102, 0.05);
}

.file-upload-wrapper input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
}

.upload-icon {
    width: 32px;
    height: 32px;
    color: var(--text-muted);
    transition: color 0.2s;
}

.file-upload-wrapper:hover .upload-icon {
    color: var(--primary);
}

.file-stats {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 500;
}

/* Inputs and Textarea */
textarea, .input-field {
    width: 100%;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.2s ease;
}

textarea {
    resize: vertical;
}

textarea:focus, .input-field:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--ring);
}

textarea::placeholder, .input-field::placeholder {
    color: rgba(148, 163, 184, 0.5);
}

/* Shake Animation for Login Error */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.shake {
    animation: shake 0.4s cubic-bezier(.36,.07,.19,.97) both;
}

/* Checkbox Row */
.form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    user-select: none;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.checkbox-wrapper input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    height: 20px;
    width: 20px;
    background-color: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.checkbox-wrapper input:checked ~ .checkmark {
    background-color: var(--primary);
    border-color: var(--primary);
}

.checkmark:after {
    content: "";
    display: none;
    width: 4px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-bottom: 2px;
}

.checkbox-wrapper input:checked ~ .checkmark:after {
    display: block;
}

/* Buttons */
.btn-primary, .btn-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-primary {
    background: var(--primary);
    color: white;
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    box-shadow: 0 4px 14px 0 rgba(37, 211, 102, 0.39);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary svg {
    width: 20px;
    height: 20px;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.status-message {
    text-align: center;
    font-size: 0.9rem;
    min-height: 1.2rem;
    color: #ef4444; /* red for errors */
}

/* Progress Section */
.progress-card {
    text-align: center;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 4px;
    overflow: hidden;
    margin: 1rem 0;
}

.progress-bar {
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: width 0.3s ease;
}

.warning-text {
    font-size: 0.85rem;
    color: #fbbf24;
    margin-bottom: 1rem;
}

@media (max-width: 640px) {
    .card {
        padding: 1.5rem;
    }
}
