/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 40px;
}

.header-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.logo i {
    font-size: 3rem;
    color: #667eea;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo h1 {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

.subtitle {
    font-size: 1.2rem;
    color: #666;
    font-weight: 400;
}

/* Main Content */
.main-content {
    display: grid;
    gap: 30px;
    margin-bottom: 40px;
}

/* Cards */
.card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.card h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 25px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card h2 i {
    color: #667eea;
}

/* Form Styles */
.qr-form {
    display: grid;
    gap: 25px;
}

.form-group {
    display: grid;
    gap: 8px;
}

.form-group label {
    font-weight: 500;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.required {
    color: #e74c3c;
}

.form-group input {
    padding: 15px 20px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: rgba(255, 255, 255, 1);
}

.form-group small {
    color: #666;
    font-size: 0.875rem;
}

/* Buttons */
.btn {
    padding: 15px 25px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.8);
    color: #333;
    border: 2px solid #e1e5e9;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.qr-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 25px;
}

/* QR Code Section */
.qr-container {
    display: grid;
    gap: 25px;
    text-align: center;
}

#qrcode {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 256px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 16px;
    padding: 20px;
}

#qrcode canvas,
#qrcode img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.qr-info {
    background: rgba(248, 249, 250, 0.8);
    border-radius: 12px;
    padding: 20px;
    border-left: 4px solid #667eea;
}

.qr-info code {
    background: rgba(255, 255, 255, 0.8);
    padding: 8px 12px;
    border-radius: 6px;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.875rem;
    color: #333;
    word-break: break-all;
    display: block;
    margin-top: 8px;
}

/* Instructions Section */
.instructions {
    display: grid;
    gap: 25px;
}

.step {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.step-number {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.1rem;
}

.step-content h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.step-content p {
    color: #666;
    margin-bottom: 8px;
}

.step-content ul {
    margin-left: 20px;
    color: #666;
}

.step-content li {
    margin-bottom: 5px;
}

.step-content a {
    color: #667eea;
    text-decoration: none;
}

.step-content a:hover {
    text-decoration: underline;
}

.step-content code {
    background: rgba(248, 249, 250, 0.8);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.875rem;
}

/* Tips Section */
.tips {
    margin-top: 30px;
    background: rgba(248, 249, 250, 0.8);
    border-radius: 12px;
    padding: 25px;
    border-left: 4px solid #f39c12;
}

.tips h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tips h3 i {
    color: #f39c12;
}

.tips ul {
    margin-left: 20px;
    color: #666;
}

.tips li {
    margin-bottom: 10px;
}

/* Footer */
.footer {
    text-align: center;
    padding: 30px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

/* Toast Notification */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #333;
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    transform: translateX(400px);
    transition: transform 0.3s ease;
    z-index: 1000;
    max-width: 300px;
}

.toast.show {
    transform: translateX(0);
}

.toast.success {
    background: #27ae60;
}

.toast.error {
    background: #e74c3c;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .header-content {
        padding: 30px 20px;
    }

    .logo {
        flex-direction: column;
        gap: 10px;
    }

    .logo h1 {
        font-size: 2.5rem;
    }

    .logo i {
        font-size: 2.5rem;
    }

    .card {
        padding: 20px;
    }

    .form-actions,
    .qr-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .step {
        flex-direction: column;
        text-align: center;
    }

    .step-number {
        align-self: center;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 2rem;
    }

    .logo i {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .card h2 {
        font-size: 1.3rem;
    }
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeInUp 0.6s ease-out;
}

.card:nth-child(2) {
    animation-delay: 0.1s;
}

.card:nth-child(3) {
    animation-delay: 0.2s;
}

/* Loading States */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    color: white;
}

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