/* ============================================
   QRCraftStudio — Main Stylesheet
   ============================================ */

:root {
    --bg-primary:       #06061A;
    --bg-secondary:     #0D0D2E;
    --bg-card:          rgba(255,255,255,0.04);
    --bg-card-hover:    rgba(255,255,255,0.08);
    --bg-input:         rgba(255,255,255,0.06);

    --accent:           #6C63FF;
    --accent-teal:      #3ECFCF;
    --accent-pink:      #FF6B9D;
    --accent-orange:    #FF9A3C;
    --accent-green:     #43E97B;

    --grad-primary:     linear-gradient(135deg, #6C63FF 0%, #3ECFCF 100%);
    --grad-secondary:   linear-gradient(135deg, #FF6B9D 0%, #FF9A3C 100%);
    --grad-hero:        linear-gradient(135deg, #06061A 0%, #0D0D2E 50%, #100D3E 100%);

    --text-primary:     #F0F0FF;
    --text-secondary:   #A0A0C8;
    --text-muted:       #5A5A80;

    --border:           rgba(255,255,255,0.07);
    --border-accent:    rgba(108,99,255,0.35);

    --shadow-glow:      0 0 40px rgba(108,99,255,0.25);
    --shadow-card:      0 8px 40px rgba(0,0,0,0.5);
    --shadow-sm:        0 4px 16px rgba(0,0,0,0.3);

    --radius-sm:        8px;
    --radius-md:        14px;
    --radius-lg:        20px;
    --radius-xl:        28px;
    --radius-pill:      100px;

    --transition:       all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow:  all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* ---- Background blobs ---- */
.bg-blobs {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.12;
    animation: blobFloat 20s ease-in-out infinite;
}
.blob-1 {
    width: 600px; height: 600px;
    background: var(--accent);
    top: -200px; left: -200px;
    animation-delay: 0s;
}
.blob-2 {
    width: 500px; height: 500px;
    background: var(--accent-teal);
    top: 40%; right: -150px;
    animation-delay: -7s;
}
.blob-3 {
    width: 400px; height: 400px;
    background: var(--accent-pink);
    bottom: -100px; left: 30%;
    animation-delay: -14s;
}

@keyframes blobFloat {
    0%, 100% { transform: translate(0,0) scale(1); }
    33%       { transform: translate(40px, -60px) scale(1.05); }
    66%       { transform: translate(-30px, 40px) scale(0.95); }
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }

/* ============================================
   NAVBAR
   ============================================ */
#mainNav {
    background: rgba(6, 6, 26, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 14px 0;
    transition: var(--transition);
    z-index: 1000;
}
#mainNav.scrolled {
    padding: 10px 0;
    box-shadow: var(--shadow-glow);
}

.brand-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-icon {
    width: 38px; height: 38px;
    background: var(--grad-primary);
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; color: #fff;
    box-shadow: 0 4px 15px rgba(108,99,255,0.4);
}
.brand-text {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.25rem;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}
.brand-text strong { background: var(--grad-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

.nav-link {
    color: var(--text-secondary) !important;
    font-weight: 500;
    padding: 8px 16px !important;
    border-radius: var(--radius-pill);
    transition: var(--transition);
    font-size: 0.9rem;
}
.nav-link:hover, .nav-link.active {
    color: var(--text-primary) !important;
    background: var(--bg-card-hover);
}
.nav-link.active { color: var(--accent) !important; }

.navbar-toggler {
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    background: var(--bg-card);
}
.navbar-toggler:focus { box-shadow: none; }

.nav-actions { display: flex; align-items: center; gap: 8px; }

/* ============================================
   BUTTONS
   ============================================ */
.btn-primary-glow {
    background: var(--grad-primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-pill);
    padding: 10px 24px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    box-shadow: 0 4px 20px rgba(108,99,255,0.4);
    position: relative;
    overflow: hidden;
}
.btn-primary-glow::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0);
    transition: var(--transition);
}
.btn-primary-glow:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(108,99,255,0.6);
    color: #fff;
}
.btn-primary-glow:hover::after { background: rgba(255,255,255,0.1); }

.btn-primary-glow.btn-lg { padding: 14px 36px; font-size: 1rem; }

.btn-glass {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    padding: 10px 24px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}
.btn-glass:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-accent);
    color: var(--text-primary);
    transform: translateY(-2px);
}
.btn-glass.btn-lg { padding: 14px 36px; font-size: 1rem; }

.btn-outline-light {
    border: 1px solid var(--border);
    color: var(--text-secondary);
    border-radius: var(--radius-pill);
    font-size: 0.9rem;
}
.btn-outline-light:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-accent);
    color: var(--text-primary);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 0 80px;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(108,99,255,0.15);
    border: 1px solid rgba(108,99,255,0.35);
    border-radius: var(--radius-pill);
    padding: 6px 16px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #a8a4ff;
    margin-bottom: 24px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.hero-badge .dot {
    width: 6px; height: 6px;
    background: var(--accent-green);
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%       { transform: scale(1.5); opacity: 0.7; }
}

.hero-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -2px;
    margin-bottom: 24px;
}
.hero-title .gradient-text {
    background: var(--grad-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 520px;
    line-height: 1.7;
}

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 48px; }

.hero-stats {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
}
.stat-item { text-align: left; }
.stat-number {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    background: var(--grad-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 4px;
}
.stat-label { font-size: 0.78rem; color: var(--text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; }

/* Hero QR visual */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}
.qr-showcase {
    position: relative;
    width: 380px;
    height: 380px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.qr-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid;
    animation: ringPulse 4s ease-in-out infinite;
}
.qr-ring-1 { width: 340px; height: 340px; border-color: rgba(108,99,255,0.3); animation-delay: 0s; }
.qr-ring-2 { width: 380px; height: 380px; border-color: rgba(62,207,207,0.2); animation-delay: -1.3s; }
.qr-ring-3 { width: 420px; height: 420px; border-color: rgba(255,107,157,0.15); animation-delay: -2.6s; }

@keyframes ringPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%       { transform: scale(1.04); opacity: 0.5; }
}

.qr-card-main {
    background: var(--bg-card);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-xl);
    padding: 28px;
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-glow), var(--shadow-card);
    animation: heroFloat 6s ease-in-out infinite;
    position: relative;
    z-index: 2;
}
@keyframes heroFloat {
    0%, 100% { transform: translateY(0px); }
    50%       { transform: translateY(-18px); }
}
.qr-card-main img, .qr-card-main #heroQR canvas { border-radius: var(--radius-md); display: block; }

.floating-chip {
    position: absolute;
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    box-shadow: var(--shadow-sm);
    z-index: 3;
}
.floating-chip .chip-icon { font-size: 1rem; }
.chip-1 { top: 40px; right: -60px; animation: heroFloat 5s ease-in-out infinite; animation-delay: -1s; }
.chip-2 { bottom: 60px; left: -70px; animation: heroFloat 5s ease-in-out infinite; animation-delay: -2.5s; }
.chip-3 { top: 50%; right: -80px; animation: heroFloat 5s ease-in-out infinite; animation-delay: -4s; }

/* ============================================
   SECTION STYLES
   ============================================ */
section { position: relative; z-index: 1; }

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(108,99,255,0.12);
    border: 1px solid rgba(108,99,255,0.25);
    border-radius: var(--radius-pill);
    padding: 5px 14px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #a8a4ff;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 16px;
}

.section-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 16px;
    line-height: 1.2;
}
.section-sub {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ============================================
   FEATURE CARDS
   ============================================ */
.features-section { padding: 100px 0; }

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    height: 100%;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.feature-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--grad-primary);
    opacity: 0;
    transition: var(--transition);
}
.feature-card:hover {
    border-color: var(--border-accent);
    transform: translateY(-6px);
    box-shadow: var(--shadow-glow);
}
.feature-card:hover::before { opacity: 0.04; }

.feature-icon {
    width: 56px; height: 56px;
    border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 20px;
    position: relative;
}
.feature-icon.purple { background: rgba(108,99,255,0.2); color: var(--accent); }
.feature-icon.teal   { background: rgba(62,207,207,0.2); color: var(--accent-teal); }
.feature-icon.pink   { background: rgba(255,107,157,0.2); color: var(--accent-pink); }
.feature-icon.orange { background: rgba(255,154,60,0.2); color: var(--accent-orange); }
.feature-icon.green  { background: rgba(67,233,123,0.2); color: var(--accent-green); }
.feature-icon.blue   { background: rgba(90,140,255,0.2); color: #5A8CFF; }

.feature-card h5 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-primary);
}
.feature-card p { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.6; margin: 0; }

/* ============================================
   QR TYPES GRID
   ============================================ */
.qr-types-section { padding: 80px 0; }

.type-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }

.type-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    color: var(--text-primary);
    display: block;
}
.type-card:hover {
    border-color: var(--border-accent);
    background: var(--bg-card-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
    color: var(--text-primary);
}
.type-card .type-icon {
    font-size: 1.8rem;
    margin-bottom: 10px;
    display: block;
}
.type-card .type-label { font-size: 0.82rem; font-weight: 600; color: var(--text-secondary); }
.type-card:hover .type-label { color: var(--accent); }

/* ============================================
   HOW IT WORKS
   ============================================ */
.how-section { padding: 80px 0; }

.step-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    text-align: center;
    position: relative;
    transition: var(--transition);
}
.step-card:hover {
    border-color: var(--border-accent);
    box-shadow: var(--shadow-glow);
}
.step-number {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 3rem;
    font-weight: 900;
    background: var(--grad-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 16px;
    opacity: 0.6;
}
.step-card h5 { font-weight: 700; margin-bottom: 10px; font-family: 'Space Grotesk', sans-serif; }
.step-card p { font-size: 0.88rem; color: var(--text-secondary); margin: 0; }
.step-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.2rem;
    padding-top: 40px;
}

/* ============================================
   CTA SECTION
   ============================================ */
.cta-section { padding: 80px 0; }

.cta-box {
    background: var(--grad-primary);
    border-radius: var(--radius-xl);
    padding: 64px 48px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.cta-box::before {
    content: '';
    position: absolute;
    width: 400px; height: 400px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    top: -200px; right: -100px;
}
.cta-box::after {
    content: '';
    position: absolute;
    width: 300px; height: 300px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
    bottom: -100px; left: -50px;
}
.cta-box h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 800;
    color: #fff;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}
.cta-box p {
    color: rgba(255,255,255,0.85);
    font-size: 1.05rem;
    margin-bottom: 32px;
    position: relative;
    z-index: 1;
}
.btn-cta-white {
    background: #fff;
    color: var(--accent);
    border: none;
    border-radius: var(--radius-pill);
    padding: 14px 36px;
    font-weight: 700;
    font-size: 1rem;
    transition: var(--transition);
    position: relative;
    z-index: 1;
}
.btn-cta-white:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.3);
    color: var(--accent);
}

/* ============================================
   GENERATOR PAGE
   ============================================ */
.generator-page { padding-top: 80px; min-height: 100vh; }

.generator-layout {
    display: grid;
    grid-template-columns: 280px 1fr 340px;
    gap: 0;
    min-height: calc(100vh - 80px);
}

/* Left: Type sidebar */
.gen-sidebar {
    background: rgba(13,13,46,0.8);
    border-right: 1px solid var(--border);
    padding: 24px 0;
    overflow-y: auto;
    position: sticky;
    top: 80px;
    height: calc(100vh - 80px);
}
.sidebar-title {
    padding: 0 20px 16px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
}
.type-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 20px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
    border-left: 3px solid transparent;
}
.type-btn:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}
.type-btn.active {
    background: rgba(108,99,255,0.12);
    color: var(--accent);
    border-left-color: var(--accent);
}
.type-btn .type-btn-icon { font-size: 1rem; width: 20px; text-align: center; }

.sidebar-divider { height: 1px; background: var(--border); margin: 8px 20px; }

/* Center: Form area */
.gen-main {
    padding: 32px;
    overflow-y: auto;
    max-height: calc(100vh - 80px);
}
.gen-main-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}
.gen-main-sub { font-size: 0.88rem; color: var(--text-secondary); margin-bottom: 28px; }

/* Form controls */
.form-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 6px;
}
.form-control, .form-select {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: 10px 14px;
    font-size: 0.9rem;
    transition: var(--transition);
}
.form-control:focus, .form-select:focus {
    background: rgba(108,99,255,0.08);
    border-color: var(--border-accent);
    box-shadow: 0 0 0 3px rgba(108,99,255,0.15);
    color: var(--text-primary);
    outline: none;
}
.form-control::placeholder { color: var(--text-muted); }
.form-select { cursor: pointer; }
.form-select option { background: var(--bg-secondary); color: var(--text-primary); }

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

.input-group .form-control { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.input-group-text {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Social media sub-tabs */
.social-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.social-tab-btn {
    display: flex; align-items: center; gap: 6px;
    padding: 7px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}
.social-tab-btn:hover { border-color: var(--border-accent); color: var(--text-primary); }
.social-tab-btn.active { background: rgba(108,99,255,0.2); border-color: var(--accent); color: var(--accent); }

/* Right: Preview & Customize */
.gen-preview {
    background: rgba(13,13,46,0.6);
    border-left: 1px solid var(--border);
    padding: 28px 24px;
    overflow-y: auto;
    max-height: calc(100vh - 80px);
    position: sticky;
    top: 80px;
}
.preview-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
    margin-bottom: 20px;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.preview-box canvas, .preview-box img { border-radius: var(--radius-sm); max-width: 100%; }
.preview-placeholder {
    color: var(--text-muted);
    font-size: 0.88rem;
}
.preview-placeholder i { font-size: 3rem; margin-bottom: 12px; display: block; opacity: 0.4; }

.download-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-download {
    flex: 1;
    min-width: 70px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    padding: 8px 12px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}
.btn-download:hover {
    border-color: var(--border-accent);
    color: var(--accent);
    background: rgba(108,99,255,0.1);
}
.btn-download i { display: block; font-size: 1rem; margin-bottom: 4px; }

/* Customization panel */
.customize-section { margin-top: 20px; }
.customize-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.color-row { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
.color-label { font-size: 0.8rem; color: var(--text-secondary); flex: 1; }
.color-swatch-group { display: flex; gap: 6px; }
.color-swatch {
    width: 28px; height: 28px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
}
.color-swatch:hover, .color-swatch.active { border-color: #fff; transform: scale(1.15); }
.color-picker-btn {
    width: 28px; height: 28px;
    border-radius: 50%;
    border: 2px dashed var(--border);
    background: transparent;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.65rem;
    color: var(--text-muted);
    transition: var(--transition);
    padding: 0;
}
.color-picker-btn:hover { border-color: var(--accent); color: var(--accent); }

input[type="color"] {
    width: 28px; height: 28px;
    border: 2px solid var(--border);
    border-radius: 50%;
    padding: 0;
    cursor: pointer;
    background: none;
    appearance: none;
}
input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; border-radius: 50%; overflow: hidden; }
input[type="color"]::-webkit-color-swatch { border: none; border-radius: 50%; }

.dot-style-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.dot-style-btn {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text-secondary);
    padding: 8px 4px;
    font-size: 0.7rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}
.dot-style-btn:hover { border-color: var(--border-accent); color: var(--text-primary); }
.dot-style-btn.active { border-color: var(--accent); color: var(--accent); background: rgba(108,99,255,0.1); }
.dot-style-btn .style-preview { font-size: 1.2rem; display: block; margin-bottom: 2px; }

.logo-upload-area {
    border: 2px dashed var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 8px;
}
.logo-upload-area:hover { border-color: var(--border-accent); background: var(--bg-card); }
.logo-upload-area i { font-size: 1.5rem; color: var(--text-muted); margin-bottom: 6px; display: block; }
.logo-upload-area p { font-size: 0.78rem; color: var(--text-muted); margin: 0; }

.range-label { display: flex; justify-content: space-between; margin-bottom: 6px; }
.range-label span { font-size: 0.78rem; color: var(--text-secondary); }
.range-label .range-val { color: var(--accent); font-weight: 600; }
.form-range { accent-color: var(--accent); }

/* Error correction badges */
.ecc-btns { display: flex; gap: 6px; }
.ecc-btn {
    flex: 1;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text-secondary);
    padding: 6px 4px;
    font-size: 0.72rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}
.ecc-btn:hover { border-color: var(--border-accent); color: var(--text-primary); }
.ecc-btn.active { border-color: var(--accent); color: var(--accent); background: rgba(108,99,255,0.1); }

/* Generate button */
.btn-generate {
    width: 100%;
    padding: 14px;
    background: var(--grad-primary);
    border: none;
    border-radius: var(--radius-md);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 20px rgba(108,99,255,0.4);
    letter-spacing: 0.3px;
}
.btn-generate:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(108,99,255,0.6);
}
.btn-generate i { margin-right: 8px; }

/* ============================================
   SCANNER PAGE
   ============================================ */
.scanner-page { padding-top: 100px; min-height: 100vh; padding-bottom: 60px; }

.scanner-hero { text-align: center; margin-bottom: 48px; }
.scanner-hero h1 { font-family: 'Space Grotesk', sans-serif; font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; letter-spacing: -1px; margin-bottom: 12px; }
.scanner-hero p { color: var(--text-secondary); font-size: 1.05rem; }

.scanner-tabs {
    display: flex;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 6px;
    margin-bottom: 24px;
}
.scanner-tab-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}
.scanner-tab-btn.active {
    background: var(--grad-primary);
    color: #fff;
    box-shadow: 0 4px 15px rgba(108,99,255,0.4);
}

.scanner-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 32px;
    backdrop-filter: blur(10px);
}

#qr-reader {
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 2px solid var(--border-accent);
}
#qr-reader video { border-radius: var(--radius-lg); }

/* Override html5-qrcode default styles */
#qr-reader__dashboard { padding: 12px 0 0; }
#qr-reader__dashboard_section_csr span { color: var(--text-secondary) !important; font-size: 0.85rem; }
#qr-reader__dashboard button {
    background: var(--grad-primary) !important;
    border: none !important;
    border-radius: var(--radius-pill) !important;
    color: #fff !important;
    padding: 8px 20px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
}
#qr-reader__camera_permission_button { margin-top: 12px !important; }
#qr-reader img { display: none !important; }

.upload-drop-zone {
    border: 2px dashed var(--border-accent);
    border-radius: var(--radius-lg);
    padding: 60px 24px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}
.upload-drop-zone:hover, .upload-drop-zone.dragover {
    background: rgba(108,99,255,0.08);
    border-color: var(--accent);
}
.upload-drop-zone .upload-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    background: var(--grad-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.upload-drop-zone h5 { font-weight: 700; margin-bottom: 8px; }
.upload-drop-zone p { color: var(--text-secondary); font-size: 0.88rem; }
.upload-preview { max-width: 300px; margin: 16px auto 0; border-radius: var(--radius-md); display: none; }

.result-box {
    background: rgba(108,99,255,0.08);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-top: 24px;
    display: none;
}
.result-box.show { display: block; animation: fadeInUp 0.4s ease; }
.result-header { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.result-header i { font-size: 1.2rem; color: var(--accent-green); }
.result-header strong { font-size: 0.9rem; color: var(--text-secondary); }
.result-text {
    font-family: monospace;
    font-size: 0.95rem;
    color: var(--text-primary);
    word-break: break-all;
    margin-bottom: 16px;
    background: rgba(0,0,0,0.2);
    padding: 12px;
    border-radius: var(--radius-sm);
}
.result-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.result-actions .btn { font-size: 0.82rem; padding: 7px 16px; border-radius: var(--radius-pill); }

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 60px 0 0;
    position: relative;
    z-index: 1;
}
.footer-heading {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.88rem;
    transition: var(--transition);
}
.footer-links a:hover { color: var(--accent); }

.social-links { display: flex; gap: 10px; }
.social-link {
    width: 36px; height: 36px;
    border: 1px solid var(--border);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    transition: var(--transition);
}
.social-link:hover { border-color: var(--accent); color: var(--accent); background: rgba(108,99,255,0.1); }

.footer-bottom {
    border-top: 1px solid var(--border);
    padding: 20px 0;
    margin-top: 0;
}

/* ============================================
   ANIMATIONS & UTILITIES
   ============================================ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.gradient-text {
    background: var(--grad-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.gradient-text-pink {
    background: var(--grad-secondary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.animate-on-scroll.visible { opacity: 1; transform: translateY(0); }

.text-muted { color: var(--text-muted) !important; }
.border-custom { border-color: var(--border) !important; }
.bg-card { background: var(--bg-card); }

/* Glowing spinner */
.spinner-glow {
    width: 40px; height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================
   NEW QR TYPE STYLES
   ============================================ */

/* PDF upload area */
.pdf-upload-area {
    border: 2px dashed var(--border);
    border-radius: var(--radius-md);
    padding: 32px 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 16px;
}
.pdf-upload-area:hover, .pdf-upload-area.dragover {
    border-color: var(--accent-pink);
    background: rgba(255,107,157,0.06);
}
.pdf-upload-area i { font-size: 2.4rem; color: var(--accent-pink); display: block; margin-bottom: 10px; }
.pdf-upload-area h6 { font-weight: 700; margin-bottom: 4px; font-size: 0.95rem; }
.pdf-upload-area p  { font-size: 0.82rem; color: var(--text-secondary); margin: 0; }

/* Upload status bar */
.upload-status {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 0.82rem;
    margin-bottom: 14px;
}

/* Info / tip callout */
.info-tip {
    background: rgba(108,99,255,0.07);
    border: 1px solid rgba(108,99,255,0.2);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.55;
    margin-bottom: 12px;
}
.info-tip i { color: var(--accent); margin-right: 6px; }

/* Payment platform tabs */
.payment-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px; }
.payment-tab-btn {
    display: flex; align-items: center; gap: 5px;
    padding: 7px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}
.payment-tab-btn:hover  { border-color: var(--border-accent); color: var(--text-primary); }
.payment-tab-btn.active { background: rgba(108,99,255,0.18); border-color: var(--accent); color: var(--accent); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1200px) {
    .generator-layout { grid-template-columns: 240px 1fr 300px; }
}

@media (max-width: 992px) {
    .generator-layout { grid-template-columns: 1fr; }
    .gen-sidebar {
        position: static;
        height: auto;
        max-height: 220px;
        border-right: none;
        border-bottom: 1px solid var(--border);
        overflow-x: auto;
        overflow-y: hidden;
        display: flex;
        padding: 12px 0;
        flex-direction: row;
    }
    .sidebar-title { display: none; }
    .type-btn { flex-direction: column; gap: 4px; padding: 10px 14px; font-size: 0.72rem; border-left: none; border-bottom: 3px solid transparent; white-space: nowrap; min-width: 80px; text-align: center; }
    .type-btn.active { border-bottom-color: var(--accent); border-left: none; background: rgba(108,99,255,0.12); }
    .type-btn .type-btn-icon { width: auto; }
    .sidebar-divider { display: none; }
    .gen-preview {
        position: static;
        border-left: none;
        border-top: 1px solid var(--border);
        max-height: none;
    }
    .chip-1, .chip-2, .chip-3 { display: none; }
    .hero-visual { margin-top: 40px; }
    .qr-showcase { width: 280px; height: 280px; }
    .qr-ring-1 { width: 240px; height: 240px; }
    .qr-ring-2 { width: 280px; height: 280px; }
    .qr-ring-3 { display: none; }
}

@media (max-width: 768px) {
    .hero-section { padding: 100px 0 60px; text-align: center; }
    .hero-subtitle { margin: 0 auto 32px; }
    .hero-actions { justify-content: center; }
    .hero-stats { justify-content: center; }
    .step-arrow { display: none; }
    .cta-box { padding: 48px 24px; }
    .nav-actions .btn-outline-light { display: none; }
    .gen-main { padding: 20px 16px; }
    .gen-preview { padding: 20px 16px; }
    .scanner-card { padding: 20px 16px; }
    .type-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
}

@media (max-width: 480px) {
    .dot-style-grid { grid-template-columns: repeat(2, 1fr); }
    .download-buttons { flex-direction: column; }
    .btn-download { flex: none; width: 100%; display: flex; align-items: center; gap: 8px; justify-content: center; }
    .btn-download i { display: inline; font-size: 0.9rem; margin: 0; }
}
