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

:root {
    --primary-color: #25D366;
    --primary-dark: #128C7E;
    --secondary-color: #075E54;
    --background: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius: 16px;
    --radius-sm: 10px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
    background: var(--card-bg);
    margin: 0 -20px;
    padding-left: 20px;
    padding-right: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Hero */
.hero {
    text-align: center;
    padding: 60px 20px 40px;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    line-height: 1.2;
}

.hero .subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Generator Wrapper */
.generator-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 60px;
}

/* Form Section */
.form-section {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.field-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: 1.5;
}

/* Type Toggle */
.type-toggle {
    display: flex;
    gap: 12px;
}

.type-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 20px;
    background: var(--background);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.type-btn.active {
    background: rgba(37, 211, 102, 0.1);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.type-btn svg {
    flex-shrink: 0;
}

.form-group input[type="text"],
.form-group textarea,
.form-group select {
    padding: 14px 18px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s ease;
    background: var(--card-bg);
}

.form-group input[type="text"]:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.15);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Style Options */
.style-options {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
}

.color-option label,
.size-option label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
    display: block;
}

.color-input-wrapper {
    display: flex;
    gap: 8px;
    align-items: center;
}

.color-input-wrapper input[type="color"] {
    width: 44px;
    height: 44px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    padding: 3px;
}

.color-input-wrapper .color-text {
    flex: 1;
    padding: 10px 12px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    text-transform: uppercase;
    font-family: monospace;
}

.size-option select {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    background: var(--card-bg);
    cursor: pointer;
}

/* Generate Button */
.generate-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 32px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.4);
}

.generate-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
}

.generate-btn:active {
    transform: translateY(0);
}

/* Preview Section */
.preview-section {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    background: var(--background);
    border-radius: var(--radius);
    border: 2px dashed var(--border-color);
}

.preview-placeholder {
    text-align: center;
    color: var(--text-secondary);
}

.preview-placeholder p {
    margin-top: 16px;
    font-size: 1rem;
}

/* QR Result */
.qr-result {
    width: 100%;
    padding: 30px;
    text-align: center;
}

.qr-code-wrapper {
    display: inline-block;
    padding: 20px;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

#qrCode {
    display: flex;
    align-items: center;
    justify-content: center;
}

#qrCode canvas,
#qrCode img {
    display: block;
}

/* WhatsApp Link Display */
.wa-link-display {
    margin-bottom: 24px;
    text-align: left;
}

.wa-link-display label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    display: block;
}

.link-box {
    display: flex;
    gap: 8px;
}

.link-box input {
    flex: 1;
    padding: 12px 14px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-family: monospace;
    background: white;
    color: var(--text-secondary);
}

.copy-link-btn {
    padding: 12px 14px;
    background: var(--background);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.copy-link-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.copy-link-btn.copied {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Download Buttons */
.download-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.download-btn:hover {
    background: var(--primary-dark);
}

.download-btn.secondary {
    background: white;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

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

/* Features Section */
.features {
    margin-bottom: 60px;
}

.features h2 {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 40px;
    color: var(--text-primary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.feature-card {
    background: var(--card-bg);
    padding: 28px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 64px;
    height: 64px;
    background: rgba(37, 211, 102, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.feature-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.feature-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* How It Works */
.how-it-works {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 50px;
    margin-bottom: 60px;
    box-shadow: var(--shadow);
}

.how-it-works h2 {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 40px;
    color: var(--text-primary);
}

.steps {
    display: flex;
    justify-content: space-between;
    gap: 40px;
}

.step {
    flex: 1;
    text-align: center;
}

.step-number {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 20px;
}

.step-content h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.step-content p {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

/* Footer */
.footer {
    text-align: center;
    padding: 30px 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
}

/* Responsive Design */
@media (max-width: 992px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .steps {
        flex-direction: column;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 1.8rem;
    }

    .hero .subtitle {
        font-size: 1rem;
    }

    .generator-wrapper {
        grid-template-columns: 1fr;
        padding: 24px;
        gap: 30px;
    }

    .preview-section {
        min-height: 300px;
    }

    .style-options {
        grid-template-columns: 1fr 1fr;
    }

    .style-options .size-option {
        grid-column: 1 / -1;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .how-it-works {
        padding: 30px 20px;
    }

    .download-buttons {
        flex-direction: column;
    }

    .download-btn {
        width: 100%;
        justify-content: center;
    }
}

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

.qr-result {
    animation: fadeIn 0.3s ease;
}
