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

:root {
    --primary-color: #00bfa5;
    --primary-dark: #00a08c;
    --secondary-color: #6c757d;
    --error-color: #dc3545;
    --background: #f8f9fa;
    --card-bg: #ffffff;
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --border-color: #dee2e6;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
    flex: 1;
}

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

header h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

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

main {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.form-container,
.result-container {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 1.5rem;
}

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

.form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

button {
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
}

button[type="submit"],
.download-btn {
    background: var(--primary-color);
    color: white;
    width: 100%;
}

button[type="submit"]:hover,
.download-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

button[type="submit"]:disabled {
    background: var(--secondary-color);
    cursor: not-allowed;
    transform: none;
}

.secondary-btn {
    background: transparent;
    color: var(--text-secondary);
    border: 2px solid var(--border-color);
    width: 100%;
}

.secondary-btn:hover {
    background: var(--background);
    border-color: var(--secondary-color);
}

.loading {
    text-align: center;
    padding: 2rem;
}

.spinner {
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

.error {
    background: #fee;
    border: 2px solid var(--error-color);
    color: var(--error-color);
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
}

.result-container h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.qr-image-container {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    padding: 2rem;
    background: var(--background);
    border-radius: 8px;
}

.qr-image-container img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

footer {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-secondary);
    margin-top: 3rem;
    border-top: 1px solid var(--border-color);
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    .form-container,
    .result-container {
        padding: 1.5rem;
    }
}
