:root {
    --primary-color: #1877F2;
    --primary-hover: #166FE5;
    --bg-color: #F0F2F5;
    --card-bg: #FFFFFF;
    --text-main: #050505;
    --text-secondary: #65676B;
    --border-color: #DADDE1;
    --input-bg: #F0F2F5;
    --border-radius: 8px;
    /* Facebook-like radius */
    --shadow: 0 2px 4px rgba(0, 0, 0, 0.1), 0 8px 16px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: 'Segoe UI', Helvetica, Arial, sans-serif;
    /* System fonts */
    background-color: var(--bg-color);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-main);
    padding: 20px;
}

.main-container {
    width: 100%;
    display: flex;
    justify-content: center;
}

.card {
    background: var(--card-bg);
    padding: 20px;
    /* Reduced padding for cleaner look */
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 400px;
    /* Slightly narrower */
    text-align: center;
    border: none;
}

header h1 {
    font-size: 1.5rem;
    /* Smaller, cleaner header */
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

header p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.4;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 1.5rem;
}

input[type="url"] {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s ease;
    outline: none;
    background-color: #FFFFFF;
}

input[type="url"]:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(24, 119, 242, 0.2);
}

button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 16px;
    /* Standard button size */
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    /* Full width button */
}

button:hover {
    background-color: var(--primary-hover);
}

button:active {
    transform: scale(0.98);
}

#qr-container {
    background: #FFFFFF;
    border-radius: 8px;
    padding: 1rem;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 1px solid var(--border-color);
    /* Subtle border instead of dashed */
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

#qrcode img {
    display: block;
    max-width: 100%;
}

#placeholder-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.actions {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.secondary-btn {
    background-color: #42B72A;
    /* Facebook 'Create New Account' green for secondary action */
    color: white;
    border: none;
    font-size: 1rem;
    font-weight: 600;
}

.secondary-btn:hover {
    background-color: #36A420;
    color: white;
}

/* Animation for QR appearance */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.qr-visible #qrcode {
    animation: fadeIn 0.4s ease forwards;
}