* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #7c3aed;
    --primary-light: #a78bfa;
    --primary-dark: #5b21b6;
    --accent-color: #ec4899;
    --bg-color: #f8f9fc;
    --card-bg: #ffffff;
    --text-color: #1e293b;
    --text-secondary: #64748b;
    --text-light: #94a3b8;
    --success-color: #10b981;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 40px rgba(124, 58, 237, 0.12);
    --border-radius: 16px;
    --border-radius-sm: 12px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

header {
    margin-bottom: 32px;
    padding: 24px 0;
}

.header-content {
    text-align: center;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 8px;
}

.logo i {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border-radius: 12px;
    font-size: 24px;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 400;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
}

.input-section, .output-section {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 32px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.input-section:hover, .output-section:hover {
    box-shadow: var(--shadow-lg);
}

/* Tabs */
.tabs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 28px;
    background: var(--bg-color);
    padding: 6px;
    border-radius: var(--border-radius-sm);
}

.tab-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 12px;
    background: transparent;
    border: none;
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn i {
    font-size: 1.25rem;
}

.tab-btn:hover {
    background: rgba(124, 58, 237, 0.08);
    color: var(--primary-color);
}

.tab-btn.active {
    background: white;
    color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.tab-btn.active i {
    transform: scale(1.1);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: var(--text-color);
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group label i {
    color: var(--primary-color);
    font-size: 1rem;
}

.form-group input[type="text"],
.form-group input[type="url"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-color);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-color);
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.08);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%237c3aed' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.color-picker-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px;
    background: var(--bg-color);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    transition: all 0.3s ease;
}

.color-picker-wrapper:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.08);
}

.color-picker-wrapper input[type="color"] {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    background: transparent;
}

.color-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    font-family: 'Courier New', monospace;
}

.checkbox {
    width: 20px !important;
    height: 20px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 12px;
    background: var(--bg-color);
    border-radius: var(--border-radius-sm);
    transition: all 0.3s ease;
}

.checkbox-label:hover {
    background: rgba(124, 58, 237, 0.05);
}

.checkbox-label span {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: var(--text-color);
}

.customization {
    margin: 28px 0 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.customization h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    color: var(--text-color);
    font-size: 1.125rem;
    font-weight: 700;
}

.customization h3 i {
    color: var(--primary-color);
}

.custom-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.logo-option {
    margin-top: 12px;
}

.logo-option input[type="text"] {
    margin-top: 12px;
}

.btn-primary {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary i {
    font-size: 1.125rem;
}

/* Output Section */
.qr-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 480px;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.03), rgba(236, 72, 153, 0.03));
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    margin-bottom: 24px;
}

.placeholder-content {
    text-align: center;
    padding: 40px;
}

.placeholder-icon {
    font-size: 5rem;
    color: var(--primary-light);
    display: block;
    margin-bottom: 16px;
    opacity: 0.3;
}

.placeholder-content p {
    color: var(--text-color);
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.placeholder-hint {
    display: block;
    color: var(--text-light);
    font-size: 0.875rem;
}

.qr-result {
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.qr-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 32px;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.03), rgba(236, 72, 153, 0.03));
    border-radius: var(--border-radius);
    margin-bottom: 24px;
}

#qrCanvas {
    display: flex;
    justify-content: center;
    align-items: center;
}

#qrCanvas canvas {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius-sm);
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.15);
    background: white;
    padding: 24px;
}

.download-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.btn-download {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 12px;
    background: var(--bg-color);
    color: var(--text-color);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-download i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.btn-download:hover {
    background: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.15);
}

.btn-download:hover i {
    transform: scale(1.1);
}

.qr-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px;
    background: rgba(16, 185, 129, 0.08);
    border: 2px solid rgba(16, 185, 129, 0.2);
    border-radius: var(--border-radius-sm);
    color: var(--success-color);
    font-weight: 500;
    font-size: 0.875rem;
}

.qr-info i {
    font-size: 1.125rem;
}

/* Features */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 32px;
}

.feature-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 28px;
    text-align: center;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.feature-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 16px;
    color: white;
    font-size: 1.75rem;
    transition: all 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
}

.feature-card h4 {
    margin-bottom: 8px;
    color: var(--text-color);
    font-size: 1.125rem;
    font-weight: 700;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
}

footer {
    margin-top: 48px;
    padding: 24px;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.footer-content i {
    color: var(--primary-color);
    font-size: 1rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }

    .custom-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    body {
        padding: 12px;
    }

    .logo {
        font-size: 1.5rem;
    }

    .logo i {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .tabs {
        grid-template-columns: repeat(2, 1fr);
    }

    .tab-btn {
        padding: 12px 8px;
        font-size: 0.8rem;
    }

    .tab-btn i {
        font-size: 1.1rem;
    }

    .input-section, .output-section {
        padding: 20px;
    }

    .custom-grid {
        grid-template-columns: 1fr;
    }

    .download-options {
        grid-template-columns: 1fr;
    }

    .features {
        grid-template-columns: 1fr;
    }

    .qr-placeholder {
        min-height: 320px;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Scrollbar personalizado */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}
