:root {
    --bg-color: #f5f5f7;
    --card-bg: #ffffff;
    --text-primary: #1d1d1f;
    --text-secondary: #86868b;
    --accent-color: #0071e3;
    --accent-hover: #0077ed;
    --button-text: #ffffff;
    --shadow-sm: 0 2px 5px rgba(0,0,0,0.05);
    --shadow-md: 0 5px 15px rgba(0,0,0,0.08);
    --radius-lg: 20px;
    --radius-md: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

.header {
    text-align: center;
    animation: fadeInDown 0.8s ease-out;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

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

.card {
    background: var(--card-bg);
    width: 100%;
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.input-group {
    width: 100%;
    position: relative;
}

input[type="text"] {
    width: 100%;
    padding: 16px 20px;
    font-size: 1rem;
    border: 1px solid #d2d2d7;
    border-radius: var(--radius-md);
    outline: none;
    transition: all 0.2s ease;
    background: #fafafa;
}

input[type="text"]:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.15);
    background: #fff;
}

.primary-btn {
    width: 100%;
    padding: 16px;
    background-color: var(--accent-color);
    color: var(--button-text);
    border: none;
    border-radius: var(--radius-md);
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.primary-btn:hover {
    background-color: var(--accent-hover);
}

.primary-btn:active {
    transform: scale(0.98);
}

.qr-container {
    margin-top: 10px;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0; /* Hidden by default for animation */
    transition: opacity 0.5s ease;
}

.qr-container.visible {
    opacity: 1;
}

#qrcode img {
    border-radius: 8px; /* Slight radius on the QR itself looks cleaner */
    box-shadow: var(--shadow-sm);
}

.secondary-btn {
    background: none;
    border: none;
    color: var(--accent-color);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    padding: 10px;
    transition: opacity 0.2s;
}

.secondary-btn:hover {
    text-decoration: underline;
    opacity: 0.8;
}

.hidden {
    display: none;
}

.footer {
    margin-top: 20px;
    font-size: 0.8rem;
    color: #a1a1a6;
    animation: fadeIn 1s ease-out 0.5s backwards;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
    .header h1 {
        font-size: 2rem;
    }
    .card {
        padding: 30px 20px;
    }
}
