/* ============================================
   QR Code Generator - AmazeNepal Design System
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --primary-color: #667eea;
    --primary-dark: #764ba2;
    --text-dark: #2d3748;
    --text-light: #718096;
    --border-color: #e2e8f0;
    --bg-light: #f7fafc;
    --bg-white: #ffffff;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-dark);
    background: var(--bg-light);
    line-height: 1.6;
}

/* ============================================
   HEADER
   ============================================ */

.site-header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-dark);
}

.logo-icon {
    font-size: 2rem;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand-tagline {
    font-size: 0.875rem;
    color: var(--text-light);
    font-weight: 500;
}

.main-nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
}

.nav-link:hover {
    background: var(--primary-gradient);
    color: white;
}

.nav-link i {
    font-size: 1rem;
}

/* ============================================
   MAIN CONTAINER
   ============================================ */

.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero-section {
    background: var(--primary-gradient);
    color: white;
    padding: 4rem 2rem;
    text-align: center;
    border-radius: var(--radius-lg);
    margin-bottom: 3rem;
    box-shadow: var(--shadow-lg);
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.hero-title i {
    font-size: 3rem;
}

.hero-description {
    font-size: 1.125rem;
    opacity: 0.95;
    line-height: 1.8;
}

/* ============================================
   GENERATOR CONTAINER
   ============================================ */

.generator-container {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2rem;
    margin-bottom: 3rem;
}

/* ============================================
   LEFT PANEL
   ============================================ */

.left-panel {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.section {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: 2rem;
    box-shadow: var(--shadow-md);
}

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* QR Type Grid */
.qr-types-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.qr-type-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    border: 2px solid var(--border-color);
    background: var(--bg-white);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-dark);
}

.qr-type-btn i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.qr-type-btn:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.qr-type-btn.active {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
}

.qr-type-btn.active i {
    color: white;
}

/* Content Area */
#contentArea {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group label {
    font-weight: 500;
    color: var(--text-dark);
    font-size: 0.875rem;
}

.input-group input,
.input-group textarea,
.input-group select {
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.input-group input:focus,
.input-group textarea:focus,
.input-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.tab {
    padding: 0.75rem 1.5rem;
    border: none;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.3s ease;
}

.tab:hover {
    color: var(--primary-color);
}

.tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab i {
    font-size: 1rem;
}

.tab-content {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tab-label {
    display: block;
    margin-bottom: 1rem;
    font-weight: 500;
    color: var(--text-dark);
}

/* Color Picker */
.color-picker-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.color-picker {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.color-picker label {
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--text-dark);
}

.color-input-wrapper {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.color-input-wrapper input[type="color"] {
    width: 60px;
    height: 45px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.color-input-wrapper input[type="text"] {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    background: var(--bg-light);
}

/* Shape Grid */
.shape-grid,
.frame-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.shape-option,
.frame-option {
    padding: 1.5rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--bg-white);
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--text-dark);
}

.shape-option:hover,
.frame-option:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.shape-option.active,
.frame-option.active {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
}

/* Logo Upload */
.logo-upload {
    width: 100%;
}

.upload-area {
    display: block;
    padding: 3rem 2rem;
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--bg-light);
}

.upload-area:hover {
    border-color: var(--primary-color);
    background: rgba(102, 126, 234, 0.05);
}

.upload-area input[type="file"] {
    display: none;
}

/* ============================================
   RIGHT PANEL - PREVIEW
   ============================================ */

.right-panel {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.preview-section {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    text-align: center;
}

.qr-preview-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    padding: 2rem;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    margin: 1.5rem 0;
}

#qrcode {
    display: flex;
    justify-content: center;
    align-items: center;
}

#qrcode canvas {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
}

.download-btn {
    width: 100%;
    padding: 1rem 2rem;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.download-btn:active {
    transform: translateY(0);
}

.download-btn i {
    font-size: 1.125rem;
}

/* ============================================
   FOOTER
   ============================================ */

.site-footer {
    background: var(--text-dark);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}

.footer-links {
    display: flex;
    gap: 3rem;
}

.footer-column h4 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: white;
}

.footer-column a {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.footer-column a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1024px) {
    .generator-container {
        grid-template-columns: 1fr;
    }

    .right-panel {
        position: static;
    }

    .qr-types-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 1rem;
    }

    .main-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }

    .hero-title {
        font-size: 1.75rem;
        flex-direction: column;
    }

    .hero-title i {
        font-size: 2rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .qr-types-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .color-picker-group {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-links {
        flex-direction: column;
        gap: 2rem;
    }
}

@media (max-width: 480px) {
    .main-container {
        padding: 1rem;
    }

    .section {
        padding: 1.5rem;
    }

    .hero-section {
        padding: 2rem 1rem;
    }

    .qr-types-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .qr-type-btn {
        padding: 0.75rem 0.5rem;
        font-size: 0.75rem;
    }

    .qr-type-btn i {
        font-size: 1.25rem;
    }

    .tabs {
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    .tab {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }

    .shape-grid,
    .frame-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }

    .shape-option,
    .frame-option {
        padding: 1rem 0.5rem;
        font-size: 0.75rem;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .site-header,
    .site-footer,
    .left-panel,
    .download-btn {
        display: none !important;
    }

    .generator-container {
        grid-template-columns: 1fr;
    }

    .main-container {
        max-width: 100%;
    }
}
