@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #4f46e5;
    /* Indigo 600 */
    --primary-hover: #4338ca;
    /* Indigo 700 */
    --bg-color: #f3f4f6;
    --card-bg: #ffffff;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --success: #10b981;
    --border-radius: 16px;
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    background-image: radial-gradient(#e5e7eb 1px, transparent 1px);
    background-size: 20px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    color: var(--text-main);
}

.container {
    background: var(--card-bg);
    padding: 3rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
    width: 100%;
    max-width: 420px;
    transition: transform 0.2s ease;
}

h1 {
    margin-bottom: 0.5rem;
    font-weight: 700;
    color: #111827;
    font-size: 2rem;
    letter-spacing: -0.025em;
}

h1 span {
    color: var(--primary-color);
}

h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.card {
    background: #ffffff;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    transition: border-color 0.2s;
}

.card:hover {
    border-color: var(--primary-color);
}

input[type="text"] {
    width: 100%;
    padding: 14px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 1.2rem;
    text-align: center;
    letter-spacing: 3px;
    font-weight: 600;
    color: var(--text-main);
    transition: all 0.2s;
    margin-bottom: 1rem;
    outline: none;
}

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

button {
    width: 100%;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.05rem;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.2);
}

button:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 8px -1px rgba(79, 70, 229, 0.3);
}

button:disabled {
    background-color: #9ca3af;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

#status {
    font-weight: 500;
    color: var(--success);
    margin: 1rem 0;
    padding: 0.5rem;
    background: #ecfdf5;
    border-radius: 8px;
    display: inline-block;
    width: 100%;
}

.hidden {
    display: none !important;
}

#code-value {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: 4px;
    margin: 1rem 0;
    font-family: 'Courier New', monospace;
    background: #f3f4f6;
    padding: 1rem;
    border-radius: 12px;
    border: 2px dashed #d1d5db;
}

/* File Input Styling */
input[type="file"] {
    display: block;
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    cursor: pointer;
}

/* Progress Bar */
#progress-container {
    width: 100%;
    background-color: #e5e7eb;
    border-radius: 100px;
    height: 12px;
    margin-top: 1.5rem;
    overflow: hidden;
}

#progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), #818cf8);
    border-radius: 100px;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#progress-text {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
}

footer {
    margin-top: 3rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    opacity: 0.8;
    text-align: center;
}