:root {
    --bg-color-1: #0f172a;
    --bg-color-2: #1e1b4b;
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --success: #10b981;
    --success-hover: #059669;
    --error: #ef4444;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --card-bg: rgba(30, 41, 59, 0.7);
    --border-color: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background: linear-gradient(135deg, var(--bg-color-1), var(--bg-color-2));
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
}

/* Dynamic background */
.background-animation {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(99,102,241,0.15) 0%, rgba(0,0,0,0) 70%);
    transform: translate(-50%, -50%);
    z-index: 0;
    pointer-events: none;
    animation: pulse 8s ease-in-out infinite alternate;
}

@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 0.8; }
    100% { transform: translate(-50%, -50%) scale(1.1); opacity: 1; }
}

.container {
    width: 100%;
    max-width: 550px;
    padding: 2rem;
    z-index: 1;
    position: relative;
}

header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.logo-wrapper {
    background: linear-gradient(135deg, #818cf8, #4f46e5);
    width: 64px;
    height: 64px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    box-shadow: 0 10px 25px -5px rgba(99, 102, 241, 0.5);
}

h1 {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(to right, #fff, #cbd5e1);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 0.5rem;
}

header p {
    color: var(--text-secondary);
    font-size: 1.05rem;
}

/* Card */
.glassmorphism {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.input-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
}

input {
    width: 100%;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
}

input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.btn {
    width: 100%;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    border: none;
    font-family: inherit;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.primary-btn {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(99, 102, 241, 0.39);
}

.primary-btn:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.primary-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.success-btn {
    background: var(--success);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(16, 185, 129, 0.39);
}

.success-btn:hover {
    background: var(--success-hover);
    transform: translateY(-2px);
}

.hidden {
    display: none !important;
}

/* Alerts */
.error-box {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(239, 68, 68, 0.1);
    border-left: 4px solid var(--error);
    border-radius: 8px;
    color: #fca5a5;
    font-size: 0.95rem;
}

/* Progress Section */
.progress-container {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.status-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.status-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #e2e8f0;
}

#percentageText {
    font-weight: 800;
    color: var(--primary);
}

.progress-bar-bg {
    width: 100%;
    height: 12px;
    background: rgba(15, 23, 42, 0.8);
    border-radius: 6px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #818cf8, #4f46e5);
    border-radius: 6px;
    transition: width 0.4s ease;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

/* Action Container */
.action-container {
    margin-top: 2rem;
    text-align: center;
    animation: fadeIn 0.5s ease;
}

.success-msg {
    color: var(--success);
    margin-bottom: 1rem;
    font-weight: 600;
}

footer {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

@media (max-width: 600px) {
    .glassmorphism {
        padding: 1.5rem;
    }
}
