/* ==========================================================================
   CC-GEN CARD LIBRARY & GENERATOR HUB - STYLESHEET
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Poppins:wght@400;500;600;700&display=swap');

:root {
    --primary-gradient: linear-gradient(135deg, #EB001B 0%, #B80016 100%);
    --primary-gradient-hover: linear-gradient(135deg, #C40017 0%, #C40017 100%);
    --primary-color: #EB001B;
    --accent-orange: #B80016;
    --accent-blue: #475569;
    --accent-purple: #475569;
    --accent-emerald: #475569;
    
    --bg-page: #F8FAFC;
    --bg-surface: #FFFFFF;
    --bg-subtle: #F1F5F9;
    --bg-dark: #0F172A;
    --bg-dark-surface: #1E293B;
    --bg-dark-subtle: #334155;
    
    --text-heading: #0F172A;
    --text-body: #334155;
    --text-muted: #64748B;
    --text-light: #F8FAFC;
    --text-light-muted: #94A3B8;

    --border-color: #E2E8F0;
    --border-dark: #334155;
    
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 10px 30px -5px rgba(235, 0, 27, 0.25);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    --font-main: 'Plus Jakarta Sans', 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --transition-fast: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

@keyframes pageFadeIn {
    0% {
        opacity: 0;
        transform: translateY(8px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-page);
    color: var(--text-body);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    animation: pageFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

body.page-leaving {
    opacity: 0 !important;
    transform: translateY(-8px) scale(0.995) !important;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

button, input, select {
    font-family: inherit;
    outline: none;
}

button {
    cursor: pointer;
    border: none;
}

/* Container */
.container {
    width: 100%;
    max-width: 1240px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 24px;
    padding-right: 24px;
}

/* ==========================================================================
   TOP FAQ ANNOUNCEMENT BAR
   ========================================================================== */
.top-faq-bar {
    background: linear-gradient(90deg, #0F172A 0%, #1E293B 50%, #0F172A 100%);
    color: #F8FAFC;
    padding: 10px 16px;
    font-size: 0.88rem;
    font-weight: 500;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 101;
}

.top-faq-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    text-align: center;
}

.top-faq-badge {
    background: var(--primary-gradient);
    color: white;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.top-faq-link {
    color: #FFC2C6;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all var(--transition-fast);
}

.top-faq-link:hover {
    color: #FFFFFF;
    text-decoration: underline;
    transform: translateX(2px);
}

/* ==========================================================================
   SITE HEADER & NAVIGATION
   ========================================================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 76px;
}

.brand-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    font-size: 1.35rem;
    letter-spacing: -0.5px;
    color: var(--text-heading);
}

.brand-logo-img {
    height: 38px;
    width: auto;
    object-fit: contain;
    border-radius: var(--radius-sm);
}

.brand-badge {
    background: var(--primary-gradient);
    color: white;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-muted);
    position: relative;
    padding: 6px 0;
    transition: color var(--transition-fast);
}

.nav-link:hover {
    color: var(--text-heading);
}

.nav-link.active {
    color: var(--primary-color);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-gradient);
    border-radius: var(--radius-full);
}

.header-right-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.desktop-auth-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-nav-auth {
    display: none;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    margin-top: 8px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.mobile-nav-auth .btn-link,
.mobile-nav-auth .btn-primary {
    width: 100%;
    text-align: center;
    padding: 12px;
}

.auth-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.btn-link {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-heading);
    padding: 9px 18px;
    border-radius: var(--radius-md);
    transition: background var(--transition-fast), color var(--transition-fast);
}

.btn-link:hover {
    background: var(--bg-subtle);
    color: var(--primary-color);
}

.btn-primary {
    background: var(--primary-gradient);
    color: #FFFFFF !important;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 10px 22px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.btn-primary:hover {
    background: var(--primary-gradient-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

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

.btn-secondary {
    background: var(--bg-surface);
    color: var(--text-heading);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-fast);
}

.btn-secondary:hover {
    background: var(--bg-subtle);
    border-color: var(--text-muted);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    padding: 8px;
    color: var(--text-heading);
    cursor: pointer;
}

/* ==========================================================================
   LIBRARY HERO / STUDIO SECTION
   ========================================================================== */
.studio-hero-section {
    padding: 56px 0 72px;
    background: radial-gradient(circle at 85% 20%, rgba(235, 0, 27, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 15% 80%, rgba(235, 0, 27, 0.07) 0%, transparent 45%);
    border-bottom: 1px solid var(--border-color);
}

.studio-grid {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 48px;
    align-items: center;
}

.studio-intro-col {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.studio-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(235, 0, 27, 0.08);
    color: var(--primary-color);
    padding: 5px 14px;
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    width: fit-content;
}

.studio-title {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--text-heading);
    line-height: 1.18;
    letter-spacing: -1px;
}

.studio-title-gradient {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.studio-desc {
    font-size: 1.08rem;
    color: var(--text-body);
    line-height: 1.7;
}

/* 3D FLIPPABLE CARD CONTAINER */
.card-3d-wrapper {
    perspective: 1000px;
    width: 100%;
    max-width: 460px;
    aspect-ratio: 1.586 / 1;
    margin: 0 auto 24px;
}

.card-3d-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: left;
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
    cursor: pointer;
}

.card-3d-wrapper.flipped .card-3d-inner {
    transform: rotateY(180deg);
}

.card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 20px 35px -8px rgba(0, 0, 0, 0.3), 0 8px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #FFFFFF;
}

/* Card Front Styling */
.card-face-front {
    padding: 24px 28px;
}

/* Card Back Styling */
.card-face-back {
    transform: rotateY(180deg);
    padding: 24px 0 20px 0;
}

.magnetic-strip {
    width: 100%;
    height: 44px;
    background: #020617;
    margin-top: 8px;
}

.card-back-content {
    padding: 16px 28px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.signature-strip-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.signature-panel {
    flex-grow: 1;
    height: 38px;
    background: #FFFFFF;
    border-radius: 4px;
    background-image: repeating-linear-gradient(45deg, #E2E8F0, #E2E8F0 6px, #FFFFFF 6px, #FFFFFF 12px);
    display: flex;
    align-items: center;
    padding-left: 12px;
    color: #475569;
    font-family: 'Poppins', cursive, sans-serif;
    font-size: 0.85rem;
    font-style: italic;
}

.cvv-box {
    background: #FFFFFF;
    color: #0F172A;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1rem;
    padding: 8px 12px;
    border-radius: 4px;
    letter-spacing: 2px;
}

.card-back-disclaimer {
    font-size: 0.62rem;
    line-height: 1.4;
    opacity: 0.75;
    text-transform: uppercase;
}

/* Themes */
.theme-orange { background: linear-gradient(135deg, #B80016 0%, #A30014 50%, #8A0011 100%); }
.theme-obsidian { background: linear-gradient(135deg, #1E293B 0%, #0F172A 60%, #020617 100%); }
.theme-indigo { background: linear-gradient(135deg, #475569 0%, #334155 60%, #1E293B 100%); }
.theme-emerald { background: linear-gradient(135deg, #334155 0%, #1E293B 60%, #0F172A 100%); }
.theme-rosegold { background: linear-gradient(135deg, #FF4D63 0%, #C40017 60%, #7A0010 100%); }
.theme-cyber { background: linear-gradient(135deg, #475569 0%, #475569 50%, #475569 100%); }

.card-overlay-mesh {
    position: absolute;
    inset: 0;
    opacity: 0.15;
    background-image: radial-gradient(#FFF 1px, transparent 1px);
    background-size: 16px 16px;
    pointer-events: none;
}

.card-glow-ball {
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    filter: blur(40px);
    top: -50px;
    right: -50px;
    pointer-events: none;
}

.card-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1;
}

.card-chip-element {
    width: 44px;
    height: 32px;
    background: linear-gradient(135deg, #FF4D63 0%, #8A0011 100%);
    border-radius: 6px;
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.2);
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.6);
}

.card-chip-element::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(0, 0, 0, 0.2);
}

.card-network-badge {
    font-weight: 800;
    font-size: 1.28rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.card-number-large {
    font-family: var(--font-mono);
    font-size: 1.38rem;
    font-weight: 600;
    letter-spacing: 3px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    margin: 8px 0 4px;
    z-index: 1;
    word-spacing: 6px;
}

.card-bot-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    z-index: 1;
}

.card-info-item {
    display: flex;
    flex-direction: column;
}

.card-micro-label {
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
    margin-bottom: 2px;
}

.card-holder-text {
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.card-date-text {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    font-weight: 600;
}

/* Customizer Form Controls Card */
.studio-customizer-box {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 32px;
    box-shadow: var(--shadow-lg);
}

.customizer-header {
    margin-bottom: 20px;
}

.customizer-header h3 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-heading);
}

.form-group-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.customizer-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.customizer-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-heading);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.customizer-input, .customizer-select {
    width: 100%;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    font-size: 0.95rem;
    background: var(--bg-page);
    color: var(--text-heading);
    transition: all var(--transition-fast);
}

.customizer-input:focus, .customizer-select:focus {
    border-color: var(--primary-color);
    background: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(235, 0, 27, 0.1);
}

.theme-swatch-list {
    display: flex;
    gap: 10px;
    margin-top: 4px;
    flex-wrap: wrap;
}

.theme-swatch {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all var(--transition-fast);
}

.theme-swatch:hover {
    transform: scale(1.1);
}

.theme-swatch.active {
    border-color: var(--text-heading);
    box-shadow: 0 0 0 2px var(--bg-surface), 0 0 0 4px var(--primary-color);
}

.customizer-actions-bar {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    flex-wrap: wrap;
}

/* ==========================================================================
   CARD GALLERY SECTION
   ========================================================================== */
.gallery-section {
    padding: 72px 0;
}

.gallery-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 36px;
    flex-wrap: wrap;
    gap: 20px;
}

.gallery-filters-list {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.gallery-filter-btn {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 8px 18px;
    border-radius: var(--radius-full);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-body);
    transition: all var(--transition-fast);
}

.gallery-filter-btn:hover {
    border-color: var(--accent-orange);
    color: var(--text-heading);
}

.gallery-filter-btn.active {
    background: var(--bg-dark);
    color: #FFFFFF;
    border-color: var(--bg-dark);
}

.card-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 28px;
}

.gallery-card-item {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.gallery-card-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(235, 0, 27, 0.3);
}

.mini-card-preview {
    aspect-ratio: 1.586 / 1;
    border-radius: var(--radius-md);
    padding: 18px 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #FFFFFF;
    margin-bottom: 18px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.2);
}

.mini-card-preview .card-number-mini {
    font-family: var(--font-mono);
    font-size: 1.05rem;
    letter-spacing: 2px;
    font-weight: 600;
}

.gallery-card-meta {
    margin-bottom: 18px;
}

.gallery-card-title {
    font-size: 1.12rem;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 4px;
}

.gallery-card-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.gallery-card-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding-top: 14px;
    border-top: 1px solid var(--border-color);
}

.load-studio-btn,
.gallery-card-actions .btn-link {
    background: rgba(235, 0, 27, 0.08);
    color: var(--primary-color) !important;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 7px 14px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(235, 0, 27, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.load-studio-btn:hover,
.gallery-card-actions .btn-link:hover {
    background: var(--primary-gradient);
    color: #FFFFFF !important;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(235, 0, 27, 0.35);
}

/* ==========================================================================
   BULK GENERATOR & EXPORTER TOOL SECTION
   ========================================================================== */
.bulk-generator-section {
    padding: 80px 0;
    background: linear-gradient(180deg, #0F172A 0%, #1E293B 100%);
    color: #FFFFFF;
}

.bulk-box-wrapper {
    background: var(--bg-dark-surface);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-xl);
    padding: 48px 40px;
    box-shadow: var(--shadow-xl);
}

.bulk-header-row {
    margin-bottom: 32px;
    text-align: center;
}

.bulk-header-row h2 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 8px;
}

/* PRO badge chip shown next to the bulk generator title for subscribers */
.pro-badge-chip {
    display: inline-block;
    vertical-align: middle;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: #FFFFFF;
    background: var(--primary-gradient);
    padding: 4px 11px;
    border-radius: 9999px;
    margin-left: 8px;
    box-shadow: 0 8px 24px -6px rgba(235, 0, 27, 0.35);
    position: relative;
    top: -4px;
}

.bulk-header-row p {
    color: var(--text-light-muted);
    font-size: 1.05rem;
}

.bulk-form-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.bulk-form-control {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bulk-form-control label {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-light-muted);
}

.bulk-input-field {
    background: #0F172A;
    border: 1px solid var(--border-dark);
    color: #FFFFFF;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
}

.bulk-input-field:focus {
    border-color: var(--accent-orange);
}

.bulk-action-center {
    display: flex;
    justify-content: center;
    gap: 16px;
}

/* ==========================================================================
   MODAL DIALOG
   ========================================================================== */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-dialog {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    max-width: 600px;
    width: 100%;
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h4 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-heading);
}

.modal-close-btn {
    background: transparent;
    color: var(--text-muted);
    font-size: 1.4rem;
    cursor: pointer;
}

.modal-body {
    padding: 24px;
}

.modal-code-box {
    background: var(--bg-dark);
    color: #E2E8F0;
    font-family: var(--font-mono);
    padding: 18px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    overflow-x: auto;
    max-height: 240px;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
    background: var(--bg-dark);
    color: var(--text-light);
    padding: 64px 0 32px;
    margin-top: auto;
    border-top: 1px solid var(--border-dark);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-brand-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.footer-brand-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.3rem;
    color: #FFFFFF;
}

.footer-logo-img {
    height: 36px;
    width: auto;
    border-radius: var(--radius-sm);
    background: #FFFFFF;
    padding: 2px;
}

.footer-desc {
    color: var(--text-light-muted);
    font-size: 0.95rem;
    line-height: 1.65;
    max-width: 360px;
}

.footer-social-links {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}

.social-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--bg-dark-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light-muted);
    border: 1px solid var(--border-dark);
    transition: all var(--transition-fast);
}

.social-btn:hover {
    background: var(--primary-gradient);
    color: #FFFFFF;
    border-color: transparent;
    transform: translateY(-2px);
}

.social-btn img {
    width: 18px;
    height: 18px;
    object-fit: contain;
    border-radius: 2px;
}

.footer-col h5 {
    font-size: 0.98rem;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
}

.footer-nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-nav-list a {
    color: var(--text-light-muted);
    font-size: 0.92rem;
    transition: color var(--transition-fast);
}

.footer-nav-list a:hover {
    color: #FFFFFF;
    padding-left: 4px;
}

.footer-bottom {
    padding-top: 32px;
    border-top: 1px solid var(--border-dark);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.88rem;
    color: var(--text-light-muted);
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (max-width: 1024px) {
    .studio-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .bulk-form-grid {
        grid-template-columns: 1fr 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 36px;
    }
}

@media (max-width: 768px) {
    .main-nav {
        display: none;
    }

    .desktop-auth-actions, .auth-actions {
        display: none;
    }

    .mobile-nav-auth {
        display: flex;
    }

    .main-nav.mobile-open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 76px;
        left: 0;
        right: 0;
        background: var(--bg-surface);
        padding: 24px;
        box-shadow: var(--shadow-xl);
        border-bottom: 1px solid var(--border-color);
        gap: 16px;
        z-index: 999;
    }

    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .studio-title {
        font-size: 2.1rem;
    }

    /* Customize Card Properties Mobile Improvements */
    .studio-customizer-box {
        padding: 20px 16px;
        border-radius: var(--radius-lg);
    }

    .form-group-row, .bulk-form-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .customizer-form-group {
        margin-bottom: 12px;
    }

    .customizer-input, .customizer-select {
        font-size: 16px; /* Prevents auto zoom */
        padding: 12px 14px;
        min-height: 46px;
        box-sizing: border-box;
    }

    .theme-swatch-list {
        display: grid;
        grid-template-columns: repeat(6, 1fr);
        gap: 8px;
        width: 100%;
        margin-top: 6px;
    }

    .theme-swatch {
        width: 100%;
        aspect-ratio: 1 / 1;
        height: auto;
        max-width: 44px;
    }

    .customizer-actions-bar {
        margin-top: 18px;
    }

    .customizer-actions-bar button {
        padding: 13px 18px;
        font-size: 0.95rem;
    }

    .card-3d-wrapper {
        max-width: 100%;
        margin-bottom: 20px;
    }

    .card-face-front, .card-face-back {
        padding: 18px 20px;
    }

    .card-number-large {
        font-size: 1.05rem;
        letter-spacing: 1.5px;
    }

    .brand-wrapper {
        font-size: 1.12rem;
        gap: 8px;
    }

    .brand-logo-img {
        height: 24px;
        width: auto;
    }

    .brand-badge {
        font-size: 0.65rem;
        padding: 2px 6px;
    }

    .footer-logo-img {
        height: 24px;
    }

    .gallery-filters-list {
        display: flex;
        overflow-x: auto;
        width: 100%;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
        gap: 8px;
    }

    .gallery-filter-btn {
        white-space: nowrap;
        flex-shrink: 0;
        padding: 8px 14px;
        font-size: 0.88rem;
    }

    /* Bulk Generator Mobile Sizing Optimizations */
    .bulk-generator-section {
        padding: 40px 0;
    }

    .bulk-box-wrapper {
        padding: 24px 16px;
        border-radius: var(--radius-lg);
    }

    .bulk-header-row {
        margin-bottom: 20px;
    }

    .bulk-header-row h2 {
        font-size: 1.45rem;
        letter-spacing: -0.3px;
        margin-bottom: 6px;
    }

    .bulk-header-row p {
        font-size: 0.88rem;
        line-height: 1.45;
    }

    .bulk-form-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-bottom: 20px;
    }

    .bulk-form-control {
        gap: 6px;
    }

    .bulk-form-control label {
        font-size: 0.76rem;
        letter-spacing: 0.4px;
    }

    .bulk-input-field {
        font-size: 16px; /* Prevents auto zoom */
        padding: 10px 14px;
        min-height: 44px;
        width: 100%;
        box-sizing: border-box;
    }

    .bulk-action-center {
        width: 100%;
    }

    .bulk-action-center .btn-primary {
        width: 100%;
        padding: 12px 16px !important;
        font-size: 0.92rem !important;
        justify-content: center;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}

/* ==========================================================================
   THEME TOGGLE BUTTON & DARK MODE OVERRIDES
   ========================================================================== */
.theme-toggle-btn {
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
    color: var(--text-heading);
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.theme-toggle-btn:hover {
    background: var(--bg-surface);
    color: var(--accent-orange);
    transform: scale(1.05);
}

[data-theme="dark"] {
    --bg-page: #090D16;
    --bg-surface: #131B2E;
    --bg-subtle: #1E293B;
    --text-heading: #F8FAFC;
    --text-body: #CBD5E1;
    --text-muted: #94A3B8;
    --border-color: #243048;
    
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.6);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.7);
}

[data-theme="dark"] .site-header {
    background: rgba(19, 27, 46, 0.92);
    border-bottom-color: #243048;
}

[data-theme="dark"] .btn-secondary {
    background: #1E293B;
    color: #F8FAFC;
    border-color: #334155;
}

[data-theme="dark"] .btn-secondary:hover {
    background: #243048;
    border-color: var(--accent-orange);
}

[data-theme="dark"] .customizer-input,
[data-theme="dark"] .customizer-select {
    background: #090D16;
    color: #F8FAFC;
    border-color: #334155;
}

[data-theme="dark"] .customizer-input:focus,
[data-theme="dark"] .customizer-select:focus {
    background: #131B2E;
    border-color: var(--primary-color);
}

[data-theme="dark"] .gallery-filter-btn {
    background: #131B2E;
    color: #CBD5E1;
    border-color: #243048;
}

[data-theme="dark"] .gallery-filter-btn.active {
    background: #F8FAFC;
    color: #0F172A;
    border-color: #F8FAFC;
}

[data-theme="dark"] .modal-dialog {
    background: #131B2E;
}

[data-theme="dark"] .load-studio-btn,
[data-theme="dark"] .gallery-card-actions .btn-link {
    background: rgba(235, 0, 27, 0.18);
    color: #FFC2C6 !important;
    border: 1px solid rgba(235, 0, 27, 0.4);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .load-studio-btn:hover,
[data-theme="dark"] .gallery-card-actions .btn-link:hover {
    background: var(--primary-gradient);
    color: #FFFFFF !important;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(235, 0, 27, 0.5);
}

/* ==========================================================================
   BULK GENERATOR — satisfying interaction layer
   ========================================================================== */

/* Ambient drifting aurora inside the glass panel */
.bulk-box-wrapper {
    position: relative;
    overflow: hidden;
}

.bulk-box-wrapper::before {
    content: '';
    position: absolute;
    inset: -30%;
    background:
        radial-gradient(340px 300px at 22% 18%, rgba(235, 0, 27, 0.20), transparent 65%),
        radial-gradient(380px 340px at 82% 78%, rgba(71, 85, 105, 0.28), transparent 62%),
        radial-gradient(280px 260px at 70% 12%, rgba(235, 0, 27, 0.10), transparent 60%);
    filter: blur(34px);
    animation: bulkAurora 16s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 0;
}

@keyframes bulkAurora {
    0%   { transform: translate(0, 0) rotate(0deg) scale(1); }
    50%  { transform: translate(4%, -3%) rotate(3deg) scale(1.08); }
    100% { transform: translate(-4%, 3%) rotate(-3deg) scale(1.04); }
}

.bulk-box-wrapper > * {
    position: relative;
    z-index: 1;
}

/* Live sample chip */
.bulk-sample-chip {
    margin-top: 22px;
    display: inline-flex;
    align-items: center;
    gap: 14px;
    background: rgba(9, 13, 22, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 9999px;
    padding: 10px 20px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.10),
        0 10px 26px -12px rgba(0, 0, 0, 0.55);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    backdrop-filter: blur(14px) saturate(160%);
}

.bulk-sample-label {
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-light-muted);
}

.bulk-sample-number {
    font-family: var(--font-mono);
    font-size: 1.02rem;
    font-weight: 600;
    letter-spacing: 2px;
    color: #FFFFFF;
    min-width: 21ch;
    text-align: center;
}

.bulk-sample-valid {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #FF4D63;
}

.bulk-sample-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #EB001B;
    box-shadow: 0 0 10px rgba(235, 0, 27, 0.8);
    animation: bulkPulse 1.8s ease-in-out infinite;
}

@keyframes bulkPulse {
    0%, 100% { transform: scale(0.9); opacity: 0.75; }
    50%      { transform: scale(1.25); opacity: 1; }
}

/* Form polish: lift + custom select arrow */
.bulk-form-control {
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.bulk-form-control:hover {
    transform: translateY(-2px);
}

.bulk-generator-section select.bulk-input-field {
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%2394A3B8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 42px;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

/* Summary chips */
.bulk-summary-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin: -8px 0 30px;
}

.bulk-summary-chip {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 9999px;
    padding: 7px 18px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-light-muted);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10);
}

.bulk-summary-chip b {
    color: #FFFFFF;
    font-family: var(--font-mono);
    font-weight: 600;
}

.bulk-summary-chip.bulk-pop {
    animation: bulkPop 0.42s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes bulkPop {
    0%   { transform: scale(0.82); opacity: 0.4; }
    60%  { transform: scale(1.07); opacity: 1; }
    100% { transform: scale(1); }
}

/* Generate button: state machine */
.bulk-generate-btn {
    padding: 15px 34px;
    font-size: 1rem;
    transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
}

.bulk-generate-btn:active:not(:disabled) {
    transform: scale(0.96);
}

.bulk-generate-btn:disabled {
    cursor: wait;
}

.bulk-generate-btn .bulk-icon-spinner,
.bulk-generate-btn .bulk-icon-check {
    display: none;
}

.bulk-generate-btn.is-loading .bulk-icon-download,
.bulk-generate-btn.is-success .bulk-icon-download {
    display: none;
}

.bulk-generate-btn.is-loading .bulk-icon-spinner {
    display: block;
    animation: bulkSpin 0.8s linear infinite;
}

.bulk-generate-btn.is-success .bulk-icon-check {
    display: block;
    animation: bulkCheckIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes bulkSpin {
    to { transform: rotate(360deg); }
}

@keyframes bulkCheckIn {
    0%   { transform: scale(0.2); opacity: 0; }
    70%  { transform: scale(1.25); }
    100% { transform: scale(1); opacity: 1; }
}

/* Success burst */
.bulk-action-center {
    position: relative;
}

.bulk-burst-layer {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    pointer-events: none;
    z-index: 2;
}

.bulk-burst-particle {
    position: absolute;
    top: -3px;
    left: -3px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    animation: bulkBurst 0.75s cubic-bezier(0.16, 0.8, 0.4, 1) forwards;
}

@keyframes bulkBurst {
    0%   { transform: translate(0, 0) scale(1); opacity: 1; }
    100% { transform: translate(var(--tx), var(--ty)) scale(0.15); opacity: 0; }
}

/* Progress track */
.bulk-progress-track {
    max-width: 460px;
    height: 6px;
    margin: 22px auto 0;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity 0.25s ease;
    overflow: hidden;
}

.bulk-progress-track.active {
    opacity: 1;
}

.bulk-progress-fill {
    height: 100%;
    width: 0%;
    border-radius: 9999px;
    background: linear-gradient(90deg, #B80016, #EB001B 60%, #FF4D63);
    position: relative;
}

.bulk-progress-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.45), transparent);
    animation: bulkShimmer 1.1s linear infinite;
}

@keyframes bulkShimmer {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Mini card cascade */
.bulk-mini-cards {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
    min-height: 0;
}

.bulk-mini-cards:not(.show) {
    display: none;
}

.bulk-mini-card {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(9, 13, 22, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    padding: 8px 14px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: #FFFFFF;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.10),
        0 10px 22px -12px rgba(0, 0, 0, 0.55);
    animation: bulkCardIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
    animation-delay: var(--d, 0ms);
}

.bulk-mini-card b {
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: #FF4D63;
}

.bulk-mini-card span {
    opacity: 0.85;
}

.bulk-mini-more {
    color: var(--text-light-muted);
    font-family: var(--font-main);
    font-weight: 600;
}

@keyframes bulkCardIn {
    0%   { transform: translateY(16px) scale(0.7); opacity: 0; }
    70%  { transform: translateY(-3px) scale(1.05); opacity: 1; }
    100% { transform: translateY(0) scale(1); }
}

/* Toast */
.bulk-toast {
    position: absolute;
    left: 50%;
    bottom: 26px;
    transform: translate(-50%, 14px);
    background: rgba(9, 13, 22, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 9999px;
    padding: 11px 22px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #FFFFFF;
    white-space: nowrap;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        0 18px 40px -14px rgba(0, 0, 0, 0.65);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    backdrop-filter: blur(16px) saturate(160%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 3;
}

.bulk-toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .bulk-box-wrapper::before,
    .bulk-sample-dot,
    .bulk-progress-fill::after,
    .bulk-generate-btn.is-loading .bulk-icon-spinner {
        animation: none;
    }

    .bulk-mini-card,
    .bulk-summary-chip.bulk-pop,
    .bulk-burst-particle {
        animation-duration: 0.01ms;
        animation-delay: 0ms;
    }
}