/* ============================================
   GENERADOR QR - ESTILOS PROFESIONALES
   Mobile-First Design | Optimizado para AdSense
   ============================================ */

/* === ROOT VARIABLES === */
:root {
    /* Colores principales */
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    
    /* Colores secundarios */
    --secondary-color: #10b981;
    --secondary-dark: #059669;
    
    /* Colores neutros */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    /* Colores de sistema */
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    
    /* Tipografía */
    --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    
    /* Espaciado */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    
    /* Bordes */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    
    /* Sombras */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 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);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Transiciones */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* === RESET Y BASE === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    color: var(--gray-900);
    background-color: var(--gray-50);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* === TIPOGRAFÍA === */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--gray-900);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

/* === LAYOUT === */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* === HEADER === */
.header {
    background: white;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--gray-200);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md) 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.logo h1 {
    font-size: 1.25rem;
    color: var(--primary-color);
    font-weight: 700;
}

.nav {
    display: flex;
    gap: var(--spacing-lg);
}

.nav a {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--gray-700);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.nav a:hover {
    background: var(--gray-100);
    color: var(--primary-color);
}

/* === HERO SECTION === */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: var(--spacing-2xl) 0;
    text-align: center;
}

.hero-title {
    font-size: 1.75rem;
    margin-bottom: var(--spacing-md);
    font-weight: 800;
    color: white;
}

.hero-subtitle {
    font-size: 1rem;
    opacity: 0.95;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.7;
}

/* === MAIN CONTENT === */
.main-content {
    padding: var(--spacing-2xl) 0;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
}

/* === CARDS === */
.card {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
    transition: box-shadow var(--transition-normal);
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

.card-title {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 1.5rem;
    margin-bottom: var(--spacing-lg);
    color: var(--gray-900);
}

.card-title svg {
    color: var(--primary-color);
}

/* === FORM ELEMENTS === */
.form-group {
    margin-bottom: var(--spacing-lg);
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: var(--spacing-sm);
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem var(--spacing-md);
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: var(--font-primary);
    color: var(--gray-900);
    background: white;
    transition: all var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-control::placeholder {
    color: var(--gray-400);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.help-text {
    display: block;
    margin-top: var(--spacing-xs);
    font-size: 0.85rem;
    color: var(--gray-500);
}

/* === INPUT SECTIONS === */
.input-section {
    display: none;
    animation: fadeIn var(--transition-normal);
}

.input-section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === CUSTOMIZATION SECTION === */
.customization-section {
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-xl);
    border-top: 2px solid var(--gray-100);
}

.section-subtitle {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 1.1rem;
    margin-bottom: var(--spacing-lg);
    color: var(--gray-800);
}

.section-subtitle svg {
    color: var(--primary-color);
}

.customization-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
}

/* Range Input */
input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: var(--radius-sm);
    background: var(--gray-200);
    outline: none;
    
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    transition: all var(--transition-fast);
}

input[type="range"]::-webkit-slider-thumb:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: none;
    transition: all var(--transition-fast);
}

input[type="range"]::-moz-range-thumb:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
}

.range-value {
    display: inline-block;
    margin-top: var(--spacing-sm);
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.9rem;
}

/* Color Picker */
.color-picker-wrapper {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

input[type="color"] {
    width: 60px;
    height: 45px;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

input[type="color"]:hover {
    border-color: var(--primary-color);
}

.color-label {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--gray-600);
    font-weight: 500;
}

/* Checkbox */
.checkbox-group {
    display: flex;
    align-items: center;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    cursor: pointer;
    user-select: none;
}

input[type="checkbox"] {
    width: 20px;
    height: 20px;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

input[type="checkbox"]:checked {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

/* === BUTTONS === */
.button-group {
    display: flex;
    gap: var(--spacing-md);
    margin-top: var(--spacing-xl);
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: var(--font-primary);
    text-align: center;
    white-space: nowrap;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--gray-200);
    color: var(--gray-700);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--gray-300);
}

.btn-success {
    background: var(--secondary-color);
    color: white;
    width: 100%;
    margin-top: var(--spacing-lg);
}

.btn-success:hover:not(:disabled) {
    background: var(--secondary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* === ERROR MESSAGE === */
.error-message {
    display: none;
    padding: var(--spacing-md);
    background: #fee2e2;
    border: 1px solid #fecaca;
    border-radius: var(--radius-md);
    color: #991b1b;
    margin-top: var(--spacing-lg);
    animation: slideDown var(--transition-normal);
}

.error-message.show {
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === QR PREVIEW === */
.qr-preview-card {
    margin-top: var(--spacing-xl);
}

.qr-display {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    padding: var(--spacing-xl);
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    border: 2px dashed var(--gray-300);
}

.qr-placeholder {
    text-align: center;
    color: var(--gray-400);
}

.qr-placeholder p {
    margin-top: var(--spacing-md);
    font-size: 0.9rem;
}

#qrcode {
    display: inline-block;
}

/* === ADSENSE SPACES === */
.ad-space {
    margin: var(--spacing-xl) 0;
}

.ad-placeholder {
    background: var(--gray-100);
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-md);
    padding: var(--spacing-2xl);
    text-align: center;
    color: var(--gray-400);
    font-size: 0.9rem;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mobile Ads (visible on mobile) */
.mobile-ad {
    display: block;
}

/* Desktop Ads (hidden on mobile) */
.desktop-ad {
    display: none;
}

/* === SIDEBAR === */
.sidebar {
    display: none;
}

/* === INFO SECTION === */
.info-section {
    background: white;
    padding: var(--spacing-2xl) 0;
    border-top: 1px solid var(--gray-200);
}

.section-title {
    font-size: 2rem;
    margin-bottom: var(--spacing-md);
    color: var(--gray-900);
    text-align: center;
}

.section-description {
    font-size: 1.1rem;
    color: var(--gray-600);
    line-height: 1.8;
    margin-bottom: var(--spacing-2xl);
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-2xl);
    margin-top: var(--spacing-2xl);
}

/* Steps */
.steps {
    display: grid;
    gap: var(--spacing-xl);
}

.step-item {
    display: flex;
    gap: var(--spacing-lg);
    align-items: start;
}

.step-number {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
}

.step-content h3 {
    font-size: 1.15rem;
    margin-bottom: var(--spacing-sm);
    color: var(--gray-900);
}

.step-content p {
    color: var(--gray-600);
    line-height: 1.6;
}

/* Info Cards */
.info-card {
    background: var(--gray-50);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    margin-bottom: var(--spacing-lg);
}

.info-card h3 {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 1.15rem;
    margin-bottom: var(--spacing-md);
    color: var(--gray-900);
}

.info-card svg {
    color: var(--primary-color);
}

.info-card ul {
    list-style: none;
    padding: 0;
}

.info-card ul li {
    padding: var(--spacing-sm) 0;
    color: var(--gray-700);
    line-height: 1.6;
}

/* === FAQ SECTION === */
.faq-section {
    background: var(--gray-50);
    padding: var(--spacing-2xl) 0;
}

.faq-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
    margin-top: var(--spacing-2xl);
}

.faq-item {
    background: white;
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    transition: box-shadow var(--transition-normal);
}

.faq-item:hover {
    box-shadow: var(--shadow-md);
}

.faq-item h3 {
    font-size: 1.1rem;
    margin-bottom: var(--spacing-sm);
    color: var(--gray-900);
}

.faq-item p {
    color: var(--gray-600);
    line-height: 1.6;
}

/* === FOOTER === */
.footer {
    background: var(--gray-900);
    color: var(--gray-300);
    padding: var(--spacing-2xl) 0 var(--spacing-xl);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

.footer-section h4 {
    color: white;
    font-size: 1.1rem;
    margin-bottom: var(--spacing-md);
}

.footer-section p {
    color: var(--gray-400);
    line-height: 1.6;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--spacing-sm);
}

.footer-links a {
    color: var(--gray-400);
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: var(--spacing-md);
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--gray-800);
    border-radius: 50%;
    color: var(--gray-400);
    transition: all var(--transition-fast);
}

.social-links a:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid var(--gray-800);
    padding-top: var(--spacing-lg);
    text-align: center;
}

.footer-bottom p {
    color: var(--gray-500);
    font-size: 0.9rem;
}

/* ============================================
   RESPONSIVE DESIGN - TABLET (768px+)
   ============================================ */
@media (min-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.15rem;
    }
    
    .customization-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .button-group {
        flex-wrap: nowrap;
    }
    
    .btn {
        flex: 1;
    }
    
    .info-grid {
        grid-template-columns: 2fr 1fr;
    }
    
    .faq-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================
   RESPONSIVE DESIGN - DESKTOP (1024px+)
   ============================================ */
@media (min-width: 1024px) {
    .container {
        padding: 0 var(--spacing-xl);
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
    }
    
    /* Grid Layout with Sidebar */
    .content-grid {
        grid-template-columns: 1fr 350px;
        gap: var(--spacing-2xl);
    }
    
    /* Hide Mobile Ads */
    .mobile-ad {
        display: none;
    }
    
    /* Show Desktop Ads */
    .desktop-ad {
        display: block;
    }
    
    /* Sidebar */
    .sidebar {
        display: block;
    }
    
    .sticky-ad {
        position: sticky;
        top: 100px;
    }
    
    .ad-bottom {
        margin-top: var(--spacing-2xl);
    }
    
    .customization-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .steps {
        padding: 0 var(--spacing-xl);
    }
}

/* ============================================
   RESPONSIVE DESIGN - LARGE DESKTOP (1280px+)
   ============================================ */
@media (min-width: 1280px) {
    .hero-title {
        font-size: 3.5rem;
    }
    
    .content-grid {
        grid-template-columns: 1fr 400px;
    }
    
    .faq-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ============================================
   ACCESSIBILITY & ANIMATIONS
   ============================================ */

/* Focus visible for keyboard navigation */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print Styles */
@media print {
    .header,
    .footer,
    .ad-space,
    .btn {
        display: none;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid var(--gray-300);
    }
}