/* ===== GLOBAL STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #ffffff;
    color: #000000;
    line-height: 1.6;
    min-height: 100vh;
}

.container-fluid {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* ===== HEADER ===== */
.app-header {
    text-align: center;
    padding: 40px 20px;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 40px;
}

.app-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #000000;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.app-subtitle {
    font-size: 1rem;
    color: #666666;
    font-weight: 400;
}

/* ===== SECTION TITLES ===== */
.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #000000;
    margin-bottom: 24px;
    letter-spacing: -0.3px;
}

/* ===== TEMPLATE SELECTION ===== */
.template-section {
    margin-bottom: 50px;
}

.template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 40px;
}

.template-card {
    cursor: pointer;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    background: #ffffff;
    will-change: transform;
}

.template-card:hover {
    border-color: #000000;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.template-card.active {
    border-color: #000000;
    background: #f8f8f8;
}

.template-preview {
    aspect-ratio: 5/3;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 10px 8px;
    margin-bottom: 10px;
    overflow: hidden;
    position: relative;
}

.preview-name {
    font-weight: 600;
    font-size: 0.7rem;
    color: #000000;
    margin-bottom: 3px;
    text-align: center;
    line-height: 1.2;
    position: relative;
    z-index: 1;
}

.preview-title {
    font-size: 0.55rem;
    color: #666666;
    text-align: center;
    line-height: 1.2;
    position: relative;
    z-index: 1;
}

.template-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: #000000;
    text-align: center;
}

/* Template Preview Specific Styles */
.template-modern-preview {
    border-left: 3px solid #000000;
    justify-content: flex-start;
    padding-left: 15px;
}

.template-corporate-preview {
    background: linear-gradient(90deg, #2563eb 0%, #2563eb 35%, #ffffff 35%, #ffffff 100%);
}

.template-corporate-preview .preview-name {
    color: #1e40af;
    margin-left: 15%;
}

.template-corporate-preview .preview-title {
    color: #3b82f6;
    margin-left: 15%;
}

.template-creative-preview {
    border: 2px solid #000000;
    box-shadow: inset 0 0 0 3px #ffffff, inset 0 0 0 4px #000000;
}

.template-creative-preview .preview-name {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.template-elegant-preview {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    position: relative;
    overflow: hidden;
}

.template-elegant-preview::before {
    content: '';
    position: absolute;
    top: -10px;
    right: -10px;
    width: 35px;
    height: 35px;
    background: linear-gradient(45deg, #e94560, #533483);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    opacity: 0.5;
}

.template-elegant-preview .preview-name {
    color: #e94560;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 0 0 8px rgba(233, 69, 96, 0.4);
}

.template-elegant-preview .preview-title {
    color: #ffffff;
}

.template-tech-preview {
    background: linear-gradient(135deg, #1f2937 0%, #1f2937 55%, #06b6d4 55%);
    font-family: 'Space Mono', monospace;
}

.template-tech-preview .preview-name {
    font-size: 0.7rem;
    color: #06b6d4;
}

.template-tech-preview .preview-title {
    color: #9ca3af;
}

.template-luxury-preview {
    background: #ffffff;
    position: relative;
    overflow: hidden;
}

.template-luxury-preview::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 25px;
    height: 25px;
    background: #d4af37;
    border-radius: 0 0 0 100%;
}

.template-luxury-preview .preview-name {
    color: #000000;
}

.template-luxury-preview .preview-title {
    color: #666666;
}

.template-green-preview {
    background: #ffffff;
    border-left: 20px solid #10b981;
    justify-content: flex-start;
    padding-left: 20px;
}

.template-green-preview .preview-name {
    color: #065f46;
}

.template-ocean-preview {
    background: linear-gradient(180deg, #ffffff 0%, #ffffff 40%, #1e40af 40%, #1e40af 100%);
    justify-content: space-between;
    padding-top: 8px;
    padding-bottom: 8px;
}

.template-ocean-preview .preview-name {
    color: #1e40af;
    font-weight: 900;
}

.template-ocean-preview .preview-title {
    color: #eff6ff;
}

.template-sunset-preview {
    background: #fed7aa;
    clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}

.template-sunset-preview .preview-name {
    color: #7c2d12;
}

.template-purple-preview {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    padding: 20px;
}

.template-purple-preview .preview-name {
    color: #7e22ce;
    font-size: 0.7rem;
}

.template-purple-preview .preview-title {
    color: #a855f7;
}

.template-pink-preview {
    background: linear-gradient(135deg, #fce7f3 0%, #ffffff 100%);
    border-top: 2px solid #ec4899;
    border-bottom: 2px solid #ec4899;
}

.template-pink-preview .preview-name {
    color: #9f1239;
    font-size: 1rem;
    font-weight: 900;
}

.template-pink-preview .preview-title {
    color: #be185d;
    font-size: 0.55rem;
}

.template-teal-preview {
    background: #ffffff;
    border: 3px double #14b8a6;
    box-shadow: inset 0 0 0 3px #ffffff, inset 0 0 0 4px #14b8a6;
}

.template-teal-preview .preview-name {
    font-family: 'Playfair Display', serif;
    color: #134e4a;
}

.template-red-preview {
    background: #000000;
    position: relative;
    overflow: hidden;
}

.template-red-preview::after {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 60px;
    height: 60px;
    background: #dc2626;
    border-radius: 50%;
    opacity: 0.3;
}

.template-red-preview .preview-name {
    color: #dc2626;
    text-transform: uppercase;
    font-size: 0.8rem;
}

.template-red-preview .preview-title {
    color: #ffffff;
}

.template-emerald-preview {
    background: #047857;
    background-image: 
        linear-gradient(rgba(212, 175, 55, 0.15) 1px, transparent 1px),
        linear-gradient(90deg, rgba(212, 175, 55, 0.15) 1px, transparent 1px);
    background-size: 10px 10px;
}

.template-emerald-preview .preview-name {
    color: #d4af37;
    text-transform: uppercase;
    font-size: 0.75rem;
}

.template-emerald-preview .preview-title {
    color: #fef3c7;
}

.template-rosegold-preview {
    background: #fff1f2;
    position: relative;
}

.template-rosegold-preview::before {
    content: '';
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #b76e79;
    opacity: 0.15;
    top: -15px;
    left: -15px;
}

.template-rosegold-preview .preview-name {
    color: #b76e79;
}

.template-midnight-preview {
    background: linear-gradient(180deg, #0f172a 0%, #0f172a 30%, #1e293b 30%, #1e293b 60%, #334155 60%, #334155 100%);
}

.template-midnight-preview .preview-name,
.template-midnight-preview .preview-title {
    color: #cbd5e1;
}

.template-coral-preview {
    background: linear-gradient(135deg, #f97316 0%, #fb923c 50%, #fbbf24 100%);
    position: relative;
    overflow: hidden;
}

.template-coral-preview::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -20%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    border-radius: 50%;
}

.template-coral-preview::after {
    content: '';
    position: absolute;
    bottom: -10%;
    left: -10%;
    width: 40%;
    height: 40%;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 70%);
    border-radius: 50%;
}

.template-coral-preview .preview-name {
    position: relative;
    z-index: 1;
    color: #ffffff;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.template-coral-preview .preview-title {
    position: relative;
    z-index: 1;
    color: #fffbeb;
    text-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

.template-forest-preview {
    background: linear-gradient(180deg, #14532d 0%, #14532d 50%, #fef3c7 50%, #fef3c7 100%);
    justify-content: space-between;
    padding-top: 8px;
    padding-bottom: 8px;
}

.template-forest-preview .preview-name {
    color: #fef3c7;
}

.template-forest-preview .preview-title {
    color: #14532d;
}

.template-burgundy-preview {
    background: #ffffff;
    border: 2px solid #881337;
    position: relative;
}

.template-burgundy-preview::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 0 30px 30px;
    border-color: transparent transparent #881337 transparent;
}

.template-burgundy-preview .preview-name {
    color: #881337;
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 900;
}

.template-burgundy-preview .preview-title {
    color: #9f1239;
}

.template-slate-preview {
    background: #f8fafc;
    position: relative;
    overflow: hidden;
}

.template-slate-preview::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 25px;
    background: #475569;
    clip-path: ellipse(100% 100% at 50% 100%);
}

.template-slate-preview .preview-name {
    color: #0f172a;
    font-weight: 700;
}

.template-slate-preview .preview-title {
    color: #334155;
}

/* ===== MAIN CONTENT GRID ===== */
.main-content {
    width: 100%;
}

.content-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

/* ===== PREVIEW SECTION ===== */
.preview-section {
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 30px;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.export-buttons {
    display: flex;
    gap: 10px;
}

.btn-export {
    background: #000000;
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    will-change: transform;
}

.btn-export:hover {
    background: #333333;
    transform: translateY(-1px);
}

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

.card-preview-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    background: #ffffff;
    border-radius: 8px;
    padding: 40px 20px;
}

/* ===== BUSINESS CARD BASE STYLES ===== */
.business-card {
    width: 500px;
    height: 300px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    position: relative;
    -webkit-backface-visibility: hidden; /* Fixes Webkit flickering */
    backface-visibility: hidden;
    transform: translateZ(0); /* Forces GPU rendering to stabilize the image */
}

.card-content {
    width: 100%;
    height: 100%;
    padding: 40px;
    display: flex;
    flex-direction: column;
}

.card-name {
    font-size: 1.75rem;
    font-weight: 700;
    color: #000000;
    margin-bottom: 8px;
    letter-spacing: -0.3px;
}

.card-title {
    font-size: 1rem;
    color: #666666;
    margin-bottom: 20px;
    font-weight: 400;
}

.card-divider {
    width: 60px;
    height: 2px;
    background: #000000;
    margin: 20px 0;
}

.card-contacts {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.contact-row {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.875rem;
    color: #333333;
}

.contact-row i {
    width: 16px;
    text-align: center;
    color: #000000;
}

.card-social {
    display: flex;
    gap: 12px;
    margin-top: auto;
}

.social-link {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000000;
    color: #ffffff;
    border-radius: 50%;
    text-decoration: none;
    font-size: 0.875rem;
    transition: background-color 0.2s ease, transform 0.2s ease;
    will-change: transform;
}

.social-link:hover {
    background: #333333;
    transform: scale(1.1);
}

/* ===== TEMPLATE 1: MODERN LEFT BORDER ===== */
.template-modern .card-content {
    border-left: 4px solid #000000;
    padding-left: 45px;
}

.template-modern .card-name {
    font-size: 1.8rem;
}

/* ===== TEMPLATE 2: SPLIT SCREEN ===== */
.template-corporate {
    background: linear-gradient(90deg, #2563eb 0%, #2563eb 40%, #ffffff 40%, #ffffff 100%);
    border: none;
}

.template-corporate .card-content {
    display: grid;
    grid-template-columns: 40% 60%;
    padding: 0;
    gap: 0;
}

.template-corporate .card-name {
    grid-column: 2;
    color: #1e40af;
    font-size: 1.6rem;
    padding: 40px 40px 10px 20px;
    margin: 0;
}

.template-corporate .card-title {
    grid-column: 2;
    color: #3b82f6;
    padding: 0 40px 0 20px;
    margin: 0;
}

.template-corporate .card-divider {
    display: none;
}

.template-corporate .card-contacts {
    grid-column: 2;
    padding: 20px 40px 0 20px;
}

.template-corporate .card-social {
    grid-column: 2;
    padding: 0 40px 40px 20px;
    margin-top: auto;
}

.template-corporate .contact-row {
    color: #1e3a8a;
}

.template-corporate .contact-row i {
    color: #2563eb;
}

.template-corporate .social-link {
    background: #2563eb;
}

/* ===== TEMPLATE 3: CENTERED CLASSIC ===== */
.template-creative {
    border: 3px solid #000000;
    box-shadow: inset 0 0 0 10px #ffffff, inset 0 0 0 11px #000000;
}

.template-creative .card-content {
    text-align: center;
    align-items: center;
    justify-content: center;
}

.template-creative .card-name {
    font-size: 2.2rem;
    margin-bottom: 5px;
}

.template-creative .card-title {
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.template-creative .card-divider {
    width: 60px;
    margin: 20px auto;
}

.template-creative .card-contacts {
    align-items: center;
}

.template-creative .card-social {
    justify-content: center;
}

/* ===== TEMPLATE 4: HEXAGON ELITE ===== */
.template-elegant {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    border: none;
    position: relative;
    overflow: hidden;
}

.template-elegant::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: linear-gradient(45deg, #e94560, #533483);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    opacity: 0.4;
}

.template-elegant::after {
    content: '';
    position: absolute;
    bottom: -30px;
    left: -30px;
    width: 120px;
    height: 120px;
    background: linear-gradient(225deg, #e94560, #533483);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    opacity: 0.3;
}

.template-elegant .card-content {
    position: relative;
    z-index: 1;
}

.template-elegant .card-name {
    font-size: 2.4rem;
    color: #e94560;
    margin-bottom: 8px;
    font-weight: 900;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-shadow: 0 0 15px rgba(233, 69, 96, 0.5);
}

.template-elegant .card-title {
    font-size: 1rem;
    color: #ffffff;
    margin-bottom: 25px;
    font-weight: 500;
    letter-spacing: 1px;
}

.template-elegant .card-divider {
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #e94560, #533483);
    box-shadow: 0 0 10px rgba(233, 69, 96, 0.5);
}

.template-elegant .contact-row {
    color: #e0e0e0;
    font-weight: 500;
}

.template-elegant .contact-row i {
    color: #e94560;
}

.template-elegant .social-link {
    background: linear-gradient(135deg, #e94560, #533483);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(233, 69, 96, 0.4);
}

.template-elegant-preview {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    position: relative;
    overflow: hidden;
}

.template-elegant-preview::before {
    content: '';
    position: absolute;
    top: -15px;
    right: -15px;
    width: 50px;
    height: 50px;
    background: #e94560;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    opacity: 0.4;
}

.template-elegant-preview .preview-name {
    color: #e94560;
    font-size: 0.8rem;
    font-weight: 900;
    position: relative;
    z-index: 1;
}

.template-elegant-preview .preview-title {
    color: #ffffff;
    position: relative;
    z-index: 1;
}
/* ===== TEMPLATE 5: DIAGONAL DIVIDE ===== */
.template-tech {
    background: 
        linear-gradient(135deg, #1f2937 0%, #1f2937 55%, transparent 55%), 
        linear-gradient(135deg, transparent 55%, #06b6d4 55%);
    border: 2px solid #06b6d4;
    overflow: hidden;
}

.template-tech .card-content {
    padding: 35px;
    font-family: 'Space Mono', monospace;
}

.template-tech .card-name {
    font-size: 1.6rem;
    color: #06b6d4;
}

.template-tech .card-title {
    color: #9ca3af;
    font-size: 0.85rem;
}

.template-tech .card-divider {
    width: 80px;
    background: #06b6d4;
    margin: 15px 0;
}

.template-tech .contact-row {
    color: #d1d5db;
    font-size: 0.75rem;
}

.template-tech .contact-row i {
    color: #06b6d4;
}

.template-tech .social-link {
    background: #06b6d4;
    color: #1f2937;
    border-radius: 4px;
}

/* ===== TEMPLATE 6: CORNER BADGE ===== */
.template-luxury {
    background: #ffffff;
    border: none;
    position: relative;
    overflow: visible;
}

.template-luxury::before {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 80px;
    height: 80px;
    background: #d4af37;
    border-radius: 0 0 0 100%;
    z-index: 0;
}

.template-luxury .card-content {
    position: relative;
    z-index: 1;
    padding: 40px;
}

.template-luxury .card-name {
    font-size: 2rem;
    color: #000000;
    letter-spacing: 1px;
}

.template-luxury .card-title {
    color: #666666;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
}

.template-luxury .card-divider {
    width: 50px;
    height: 2px;
    background: #d4af37;
}

.template-luxury .contact-row {
    color: #333333;
}

.template-luxury .contact-row i {
    color: #d4af37;
}

.template-luxury .social-link {
    background: #d4af37;
    color: #000000;
}

/* ===== TEMPLATE 7: SIDE PANEL ===== */
.template-green {
    background: #ffffff;
    border-left: 60px solid #10b981;
    position: relative;
}

.template-green .card-content {
    padding-left: 50px;
}

.template-green .card-name {
    color: #065f46;
    font-size: 1.8rem;
}

.template-green .card-title {
    color: #047857;
}

.template-green .card-divider {
    background: #10b981;
    width: 70px;
}

.template-green .contact-row {
    color: #065f46;
}

.template-green .contact-row i {
    color: #10b981;
}

.template-green .social-link {
    background: #10b981;
}

/* ===== TEMPLATE 8: PRISM SHIFT ===== */
.template-ocean {
    background: 
        linear-gradient(120deg, transparent 0%, transparent 35%, #667eea 35%, #667eea 40%, transparent 40%),
        linear-gradient(240deg, transparent 0%, transparent 35%, #764ba2 35%, #764ba2 40%, transparent 40%),
        linear-gradient(0deg, #ffffff 0%, #ffffff 100%);
    border: 3px solid #667eea;
    position: relative;
}

.template-ocean .card-content {
    justify-content: center;
}

.template-ocean .card-name {
    color: #4338ca;
    font-size: 2.3rem;
    font-weight: 900;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.template-ocean .card-title {
    color: #6366f1;
    margin-bottom: 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
}

.template-ocean .card-divider {
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
}

.template-ocean .card-contacts {
    margin-bottom: 15px;
}

.template-ocean .contact-row {
    color: #1e1b4b;
    font-weight: 600;
}

.template-ocean .contact-row i {
    color: #667eea;
}

.template-ocean .card-social {
    margin-top: auto;
}

.template-ocean .social-link {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.4);
}

/* ===== TEMPLATE 9: GEOMETRIC FRAME ===== */
.template-sunset {
    background: #fed7aa;
    border: none;
    clip-path: polygon(20px 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%, 0 20px);
    position: relative;
}

.template-sunset::before {
    content: '';
    position: absolute;
    inset: 3px;
    background: #ffffff;
    clip-path: polygon(20px 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%, 0 20px);
}

.template-sunset .card-content {
    position: relative;
    z-index: 1;
}

.template-sunset .card-name {
    color: #7c2d12;
    font-size: 1.9rem;
}

.template-sunset .card-title {
    color: #9a3412;
}

.template-sunset .card-divider {
    background: #ea580c;
    width: 60px;
}

.template-sunset .contact-row {
    color: #7c2d12;
}

.template-sunset .contact-row i {
    color: #ea580c;
}

.template-sunset .social-link {
    background: #ea580c;
}

/* ===== TEMPLATE 10: ULTRA MINIMAL ===== */
.template-purple {
    background: linear-gradient(135deg, #f8f4ff 0%, #ffffff 100%);
    border: 2px solid #9333ea;
    box-shadow: 0 0 0 4px #ffffff, 0 0 0 5px #e9d5ff;
}

.template-purple .card-content {
    padding: 60px;
    align-items: center;
    text-align: center;
    justify-content: center;
}

.template-purple .card-name {
    color: #7e22ce;
    font-size: 2rem;
    font-weight: 700;
}

.template-purple .card-title {
    color: #a855f7;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.template-purple .card-divider {
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, #9333ea, #a855f7, #9333ea);
    margin: 18px auto;
}

.template-purple .card-contacts {
    align-items: center;
    gap: 10px;
}

.template-purple .contact-row {
    color: #6b21a8;
    font-size: 0.85rem;
}

.template-purple .contact-row i {
    color: #a855f7;
    font-size: 0.85rem;
}

.template-purple .card-social {
    justify-content: center;
    margin-top: 20px;
}

.template-purple .social-link {
    background: linear-gradient(135deg, #9333ea, #a855f7);
    width: 32px;
    height: 32px;
    font-size: 0.875rem;
    box-shadow: 0 4px 8px rgba(147, 51, 234, 0.3);
}

/* ===== TEMPLATE 11: BOLD NAME FOCUS ===== */
.template-pink {
    background: linear-gradient(135deg, #fce7f3 0%, #ffffff 100%);
    border-top: 3px solid #ec4899;
    border-bottom: 3px solid #ec4899;
}

.template-pink .card-content {
    justify-content: center;
    text-align: center;
    align-items: center;
}

.template-pink .card-name {
    color: #9f1239;
    font-size: 3rem;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 10px;
    letter-spacing: -1px;
}

.template-pink .card-title {
    color: #be185d;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 20px;
}

.template-pink .card-divider {
    display: none;
}

.template-pink .card-contacts {
    align-items: center;
    gap: 6px;
}

.template-pink .contact-row {
    color: #831843;
    font-size: 0.7rem;
}

.template-pink .contact-row i {
    font-size: 0.7rem;
    color: #ec4899;
}

.template-pink .card-social {
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
}

.template-pink .social-link {
    background: #ec4899;
    width: 26px;
    height: 26px;
    font-size: 0.7rem;
}

/* ===== TEMPLATE 12: EXECUTIVE BORDER ===== */
.template-teal {
    background: #ffffff;
    border: 4px double #14b8a6;
    box-shadow: inset 0 0 0 8px #ffffff, inset 0 0 0 9px #14b8a6;
}

.template-teal .card-content {
    font-family: 'Playfair Display', serif;
    text-align: center;
    align-items: center;
    justify-content: center;
    padding: 50px;
}

.template-teal .card-name {
    color: #134e4a;
    font-size: 2rem;
}

.template-teal .card-title {
    color: #0f766e;
    font-size: 1rem;
    font-style: italic;
    font-family: 'Inter', sans-serif;
}

.template-teal .card-divider {
    width: 100px;
    height: 1px;
    background: #14b8a6;
    margin: 20px auto;
}

.template-teal .card-contacts {
    align-items: center;
    font-family: 'Inter', sans-serif;
}

.template-teal .contact-row {
    color: #134e4a;
    font-size: 0.85rem;
}

.template-teal .contact-row i {
    color: #14b8a6;
}

.template-teal .card-social {
    justify-content: center;
}

.template-teal .social-link {
    background: #14b8a6;
    color: #ffffff;
}

/* ===== TEMPLATE 13: CREATIVE OVERLAP ===== */
.template-red {
    background: #000000;
    border: none;
    position: relative;
    overflow: hidden;
}

.template-red::after {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: #dc2626;
    border-radius: 50%;
    z-index: 0;
    opacity: 0.3;
}

.template-red .card-content {
    position: relative;
    z-index: 1;
}

.template-red .card-name {
    color: #dc2626;
    font-size: 2.2rem;
    font-weight: 900;
    text-transform: uppercase;
}

.template-red .card-title {
    color: #ffffff;
    font-size: 0.9rem;
}

.template-red .card-divider {
    background: #dc2626;
    width: 80px;
    height: 3px;
}

.template-red .contact-row {
    color: #fecaca;
}

.template-red .contact-row i {
    color: #dc2626;
}

.template-red .social-link {
    background: #dc2626;
}

/* ===== TEMPLATE 14: TECH GRID ===== */
.template-emerald {
    background: #047857;
    border: 2px solid #d4af37;
    background-image: 
        linear-gradient(rgba(212, 175, 55, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(212, 175, 55, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
}

.template-emerald .card-content {
    background: rgba(4, 120, 87, 0.95);
    padding: 40px;
}

.template-emerald .card-name {
    color: #d4af37;
    font-size: 2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.template-emerald .card-title {
    color: #fef3c7;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 2px;
}

.template-emerald .card-divider {
    background: #d4af37;
}

.template-emerald .contact-row {
    color: #fef3c7;
}

.template-emerald .contact-row i {
    color: #d4af37;
}

.template-emerald .social-link {
    background: #d4af37;
    color: #047857;
    border-radius: 4px;
}

/* ===== TEMPLATE 15: FLOATING ELEMENTS ===== */
.template-rosegold {
    background: linear-gradient(135deg, #fff1f2 0%, #ffe4e6 50%, #fecdd3 100%);
    border: 3px solid #be123c;
    position: relative;
}

.template-rosegold::before,
.template-rosegold::after {
    content: '';
    position: absolute;
    background: radial-gradient(circle, rgba(183, 110, 121, 0.3), transparent);
}

.template-rosegold::before {
    width: 150px;
    height: 150px;
    top: -60px;
    left: -60px;
}

.template-rosegold::after {
    width: 100px;
    height: 100px;
    bottom: -40px;
    right: -40px;
}

.template-rosegold .card-content {
    position: relative;
    z-index: 1;
}

.template-rosegold .card-name {
    color: #be123c;
    font-size: 2.2rem;
    font-weight: 700;
    text-shadow: 1px 1px 2px rgba(190, 18, 60, 0.1);
}

.template-rosegold .card-title {
    color: #9f1239;
    font-style: italic;
}

.template-rosegold .card-divider {
    background: linear-gradient(90deg, #be123c, #e11d48, #be123c);
    height: 3px;
}

.template-rosegold .contact-row {
    color: #881337;
}

.template-rosegold .contact-row i {
    color: #e11d48;
}

.template-rosegold .social-link {
    background: linear-gradient(135deg, #be123c, #e11d48);
    box-shadow: 0 4px 8px rgba(190, 18, 60, 0.3);
}

/* ===== TEMPLATE 16: HORIZONTAL BANDS ===== */
.template-midnight {
    background: 
        linear-gradient(180deg, 
            #0f172a 0%, #0f172a 25%,
            #1e293b 25%, #1e293b 50%,
            #334155 50%, #334155 75%,
            #475569 75%, #475569 100%
        );
    border: 2px solid #cbd5e1;
}

.template-midnight .card-content {
    padding: 35px;
}

.template-midnight .card-name {
    color: #cbd5e1;
    font-size: 1.9rem;
    font-weight: 700;
}

.template-midnight .card-title {
    color: #94a3b8;
}

.template-midnight .card-divider {
    background: #64748b;
}

.template-midnight .contact-row {
    color: #cbd5e1;
}

.template-midnight .contact-row i {
    color: #94a3b8;
}

.template-midnight .social-link {
    background: #cbd5e1;
    color: #0f172a;
}

/* ===== TEMPLATE 17: CARD IN CARD ===== */
.template-coral {
    background: linear-gradient(135deg, #f97316 0%, #fb923c 30%, #fbbf24 100%);
    border: none;
    position: relative;
    overflow: hidden;
}

.template-coral::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 70%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 60%);
    border-radius: 50%;
}

.template-coral::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: -20%;
    width: 60%;
    height: 80%;
    background: radial-gradient(circle, rgba(255,237,213,0.3) 0%, transparent 60%);
    border-radius: 50%;
}

.template-coral .card-content {
    position: relative;
    z-index: 1;
}

.template-coral .card-name {
    color: #ffffff;
    font-size: 2rem;
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(0,0,0,0.2);
    letter-spacing: 0.5px;
}

.template-coral .card-title {
    color: #fffbeb;
    text-shadow: 0 1px 4px rgba(0,0,0,0.15);
    font-weight: 500;
    letter-spacing: 1px;
}

.template-coral .card-divider {
    background: linear-gradient(90deg, rgba(255,255,255,0.4), rgba(255,255,255,0.8), rgba(255,255,255,0.4));
    height: 2px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.template-coral .contact-row {
    color: #ffffff;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.template-coral .contact-row i {
    color: #fffbeb;
    background: rgba(255,255,255,0.2);
    padding: 8px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.template-coral .social-link {
    background: rgba(255,255,255,0.25);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.template-coral .social-link:hover {
    background: rgba(255,255,255,0.35);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

/* ===== TEMPLATE 18: VERTICAL SPLIT ===== */
.template-forest {
    background: linear-gradient(180deg, #14532d 0%, #14532d 50%, #fef3c7 50%, #fef3c7 100%);
    border: 3px solid #166534;
}

.template-forest .card-content {
    justify-content: space-between;
}

.template-forest .card-name {
    color: #fef3c7;
    font-size: 1.8rem;
}

.template-forest .card-title {
    color: #fde68a;
    margin-bottom: 30px;
}

.template-forest .card-divider {
    background: #fef3c7;
    margin: 0 0 20px 0;
}

.template-forest .card-contacts {
    margin-bottom: 0;
}

.template-forest .contact-row {
    color: #14532d;
}

.template-forest .contact-row i {
    color: #166534;
}

.template-forest .card-social {
    margin-top: 10px;
}

.template-forest .social-link {
    background: #166534;
    color: #fef3c7;
}

/* ===== TEMPLATE 19: AURORA GLOW ===== */
.template-burgundy {
    background: #0a0118;
    border: none;
    position: relative;
    overflow: hidden;
}

.template-burgundy::before {
    content: '';
    position: absolute;
    top: -100px;
    left: -100px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(138, 43, 226, 0.4), transparent);
    animation: aurora1 8s ease-in-out infinite;
}

.template-burgundy::after {
    content: '';
    position: absolute;
    bottom: -100px;
    right: -100px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.4), transparent);
    animation: aurora2 10s ease-in-out infinite;
}

@keyframes aurora1 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(50px, 50px); }
}

@keyframes aurora2 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-50px, -50px); }
}

.template-burgundy .card-content {
    position: relative;
    z-index: 1;
}

.template-burgundy .card-name {
    color: #00d4ff;
    font-size: 2.3rem;
    text-transform: uppercase;
    font-weight: 900;
    letter-spacing: 3px;
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.6);
}

.template-burgundy .card-title {
    color: #b19cd9;
    text-transform: uppercase;
    font-size: 0.95rem;
    letter-spacing: 3px;
    font-weight: 600;
    text-shadow: 0 0 10px rgba(177, 156, 217, 0.4);
}

.template-burgundy .card-divider {
    background: linear-gradient(90deg, #8a2be2, #00d4ff);
    width: 90px;
    height: 3px;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.5);
}

.template-burgundy .contact-row {
    color: #e0e0e0;
    font-weight: 500;
}

.template-burgundy .contact-row i {
    color: #00d4ff;
}

.template-burgundy .social-link {
    background: linear-gradient(135deg, #8a2be2, #00d4ff);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.4);
}

.template-burgundy-preview {
    background: #0a0118;
    position: relative;
    overflow: hidden;
}

.template-burgundy-preview::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, rgba(138, 43, 226, 0.5), transparent);
}

.template-burgundy-preview .preview-name {
    color: #00d4ff;
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 900;
    position: relative;
    z-index: 1;
}

.template-burgundy-preview .preview-title {
    color: #b19cd9;
    position: relative;
    z-index: 1;
}
/* ===== TEMPLATE 20: CIRCUIT BOARD ===== */
.template-slate {
    background: #0d1117;
    border: 2px solid #00ff41;
    position: relative;
}

.template-slate::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        repeating-linear-gradient(0deg, transparent 0px, transparent 19px, rgba(0, 255, 65, 0.1) 19px, rgba(0, 255, 65, 0.1) 20px),
        repeating-linear-gradient(90deg, transparent 0px, transparent 19px, rgba(0, 255, 65, 0.1) 19px, rgba(0, 255, 65, 0.1) 20px);
    pointer-events: none;
}

.template-slate::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    width: 8px;
    height: 8px;
    background: #00ff41;
    border-radius: 50%;
    box-shadow: 
        100px 0 0 #00ff41,
        0 100px 0 #00ff41,
        100px 100px 0 #00ff41,
        200px 0 0 #00ff41,
        200px 100px 0 #00ff41;
}

.template-slate .card-content {
    position: relative;
    z-index: 1;
    font-family: 'Space Mono', monospace;
}

.template-slate .card-name {
    color: #00ff41;
    font-size: 2rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 0 0 10px rgba(0, 255, 65, 0.5);
}

.template-slate .card-title {
    color: #8be9fd;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.85rem;
}

.template-slate .card-divider {
    background: linear-gradient(90deg, transparent, #00ff41, transparent);
    width: 100px;
    height: 2px;
}

.template-slate .contact-row {
    color: #f8f8f2;
    font-weight: 500;
}

.template-slate .contact-row i {
    color: #00ff41;
}

.template-slate .card-social {
    position: relative;
    z-index: 2;
}

.template-slate .social-link {
    background: transparent;
    color: #00ff41;
    border: 2px solid #00ff41;
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.3);
}

.template-slate-preview {
    background: #0d1117;
    border: 1px solid #00ff41;
    position: relative;
}

.template-slate-preview::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        repeating-linear-gradient(0deg, transparent 0px, transparent 9px, rgba(0, 255, 65, 0.1) 9px, rgba(0, 255, 65, 0.1) 10px),
        repeating-linear-gradient(90deg, transparent 0px, transparent 9px, rgba(0, 255, 65, 0.1) 9px, rgba(0, 255, 65, 0.1) 10px);
}

.template-slate-preview .preview-name {
    color: #00ff41;
    font-weight: 900;
    position: relative;
    z-index: 1;
}

.template-slate-preview .preview-title {
    color: #8be9fd;
    position: relative;
    z-index: 1;
}
/* ===== FORM SECTION ===== */
.form-section {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 30px;
}

.card-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

.form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #000000;
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-group label i {
    font-size: 0.875rem;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.875rem;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: #ffffff;
    color: #000000;
}

.form-input:focus {
    outline: none;
    border-color: #000000;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

.form-input::placeholder {
    color: #999999;
}

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

.form-divider {
    font-size: 0.875rem;
    font-weight: 600;
    color: #666666;
    margin: 10px 0;
    padding-top: 10px;
    border-top: 1px solid #e0e0e0;
}

.form-note {
    font-size: 0.75rem;
    color: #999999;
    font-style: italic;
    margin-top: 10px;
}

/* ===== FOOTER ===== */
.app-footer {
    text-align: center;
    padding: 30px 20px;
    border-top: 1px solid #e0e0e0;
    margin-top: 40px;
}

.app-footer p {
    font-size: 0.875rem;
    color: #666666;
}

/* ===== MOBILE TAB NAVIGATION ===== */
.mobile-tabs {
    display: none;
}

@media (max-width: 768px) {
    .mobile-tabs {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: #ffffff;
        border-top: 1px solid #e0e0e0;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        padding: 0;
        padding-bottom: env(safe-area-inset-bottom, 0);
    }
    
    .mobile-tab {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        padding: 12px 8px 10px;
        background: transparent;
        border: none;
        cursor: pointer;
        transition: all 0.2s ease;
        font-size: 0.7rem;
        color: #888888;
        font-weight: 500;
        letter-spacing: 0.3px;
        position: relative;
    }
    
    .mobile-tab i {
        font-size: 1.3rem;
        transition: transform 0.2s ease;
    }
    
    .mobile-tab.active {
        color: #000000;
        font-weight: 600;
    }
    
    .mobile-tab.active i {
        transform: scale(1.1);
    }
    
    .mobile-tab.active::before {
        content: '';
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 3px;
        background: #000000;
        border-radius: 0 0 3px 3px;
    }
    
    .mobile-tab:active {
        background: rgba(0, 0, 0, 0.05);
    }
    
    /* Add padding to body for fixed bottom nav */
    body {
        padding-bottom: 80px;
    }
    
    /* Hide all sections by default on mobile */
    .template-section {
        display: none !important;
    }
    
    /* Content-grid is controlled by JavaScript */
    .content-grid {
        display: none;
    }
    
    /* Inside content-grid, hide both sections by default */
    .content-grid .preview-section {
        display: none !important;
    }
    
    .content-grid .form-section {
        display: none !important;
    }
    
    /* Show active section with smooth animation */
    .template-section.active {
        display: block !important;
        animation: mobileSlideIn 0.3s ease;
    }
    
    /* When preview is active, show ONLY preview */
    .content-grid .preview-section.active {
        display: flex !important;
        animation: mobileSlideIn 0.3s ease;
    }
    
    /* When edit/form is active, show ONLY form */
    .content-grid .form-section.active {
        display: flex !important;
        animation: mobileSlideIn 0.3s ease;
    }
    
    @keyframes mobileSlideIn {
        from {
            opacity: 0;
            transform: translateX(20px);
        }
        to {
            opacity: 1;
            transform: translateX(0);
        }
    }
    
    .preview-section.active,
    .form-section.active {
        margin-bottom: 20px;
    }
    
    /* Adjust template grid for better mobile view */
    .template-section.active .template-grid {
        max-height: none;
        overflow-y: visible;
        padding-bottom: 20px;
    }
}

/* ===== RESPONSIVE DESIGN ===== */

/* Tablet */
@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .template-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
    }
    
    .business-card {
        width: 450px;
        height: 270px;
    }
    
    .card-name {
        font-size: 1.5rem;
    }
    
    .card-content {
        padding: 35px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    /* Reduce overall padding */
    .container-fluid {
        padding: 0;
    }
    
    /* Compact header */
    .app-header {
        padding: 20px 16px;
        margin-bottom: 0;
        border-bottom: none;
        background: linear-gradient(to bottom, #ffffff 0%, #f8f9fa 100%);
    }
    
    .app-title {
        font-size: 1.5rem;
        margin-bottom: 4px;
    }
    
    .app-subtitle {
        font-size: 0.8rem;
        color: #888;
    }
    
    /* Section titles */
    .section-title {
        font-size: 1.1rem;
        margin-bottom: 16px;
        padding: 0 16px;
        color: #333;
        display: block;
        width: 100%;
        box-sizing: border-box;
    }
    
    /* Form section title should not have extra padding since form has its own */
    .form-section > .section-title {
        padding: 0 !important;
        margin: 0 0 20px 0;
    }
    
    /* Content grid */
    .content-grid {
        gap: 0;
        margin-bottom: 0;
    }
    
    /* Template Section Styling */
    .template-section {
        padding: 16px 0;
        background: #ffffff;
    }
    
    /* Compact template grid */
    .template-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
        padding: 0 16px;
    }
    
    .template-card {
        padding: 8px;
        border-radius: 10px;
        border-width: 1.5px;
    }
    
    .template-card.active {
        background: #f0f0f0;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }
    
    .template-preview {
        aspect-ratio: 5/3;
        height: auto;
        min-height: 55px;
        border-radius: 6px;
        margin-bottom: 6px;
        padding: 8px 6px;
    }
    
    .preview-name {
        font-size: 0.6rem;
    }
    
    .preview-title {
        font-size: 0.5rem;
    }
    
    .template-name {
        font-size: 0.7rem;
    }
    
    .preview-name {
        font-size: 0.65rem;
    }
    
    .preview-title {
        font-size: 0.55rem;
    }
    
    /* ===== REDESIGNED PREVIEW SECTION ===== */
    .preview-section {
        padding: 0;
        border-radius: 0;
        background: transparent;
        border: none;
        overflow: visible !important;
        display: flex;
        flex-direction: column;
        min-height: auto;
    }
    
    .preview-header {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        margin-bottom: 0;
        padding: 16px;
        background: #ffffff;
    }
    
    .preview-header .section-title {
        margin-bottom: 0;
        padding: 0;
        text-align: center;
        font-size: 1.2rem;
    }
    
    /* Export buttons redesigned */
    .export-buttons {
        display: flex;
        gap: 12px;
        width: 100%;
    }
    
    .btn-export {
        flex: 1;
        padding: 14px 20px;
        font-size: 0.95rem;
        border-radius: 12px;
        justify-content: center;
        font-weight: 600;
        background: linear-gradient(135deg, #1a1a1a 0%, #333333 100%);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
        transition: all 0.3s ease;
    }
    
    .btn-export:active {
        transform: scale(0.98);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    }
    
    /* ===== CARD PREVIEW WRAPPER - REDESIGNED ===== */
    .card-preview-wrapper {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 30px 16px;
        background: linear-gradient(145deg, #f0f2f5 0%, #e8eaed 50%, #dfe1e4 100%);
        position: relative;
        min-height: auto;
        overflow: visible !important;
    }
    
    /* Decorative pattern for preview area */
    .card-preview-wrapper::before {
        content: '';
        position: absolute;
        inset: 0;
        background: 
            radial-gradient(circle at 20% 30%, rgba(0, 0, 0, 0.03) 0%, transparent 50%),
            radial-gradient(circle at 80% 70%, rgba(0, 0, 0, 0.03) 0%, transparent 50%);
        pointer-events: none;
    }
    
    /* ===== BUSINESS CARD MOBILE STYLING ===== */
    .business-card {
        width: 500px;
        height: 300px;
        transform-origin: center center;
        box-shadow: 
            0 20px 60px rgba(0, 0, 0, 0.15),
            0 8px 20px rgba(0, 0, 0, 0.1);
        transition: transform 0.3s ease, box-shadow 0.3s ease;
        position: relative;
        z-index: 1;
    }
    
    /* Card inner elements - preserve original template sizing */
    /* Templates handle their own styling */
    
    /* ===== FORM SECTION MOBILE ===== */
    .form-section {
        padding: 20px 16px;
        border-radius: 0;
        background: #ffffff;
        border: none;
        border-top: 1px solid #e0e0e0;
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
    }
    
    .form-section .section-title {
        padding: 0 !important;
        margin: 0 0 20px 0 !important;
        text-align: left;
        width: 100%;
        display: block;
        position: static !important;
        left: auto !important;
    }
    
    .card-form {
        gap: 16px;
        width: 100%;
        display: flex;
        flex-direction: column;
    }
    
    .form-group {
        margin-bottom: 0;
    }
    
    .form-group label {
        font-size: 0.85rem;
        margin-bottom: 8px;
        color: #444;
    }
    
    .form-input {
        padding: 14px 16px;
        font-size: 16px; /* Prevents zoom on iOS */
        border-radius: 10px;
        border: 1.5px solid #e0e0e0;
        background: #fafafa;
        transition: all 0.2s ease;
    }
    
    .form-input:focus {
        background: #ffffff;
        border-color: #000000;
        box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.05);
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .form-divider {
        margin: 8px 0 16px 0;
        padding-top: 16px;
    }
    
    .form-note {
        font-size: 0.8rem;
        margin-top: 8px;
        text-align: center;
    }
    
    /* Footer */
    .app-footer {
        padding: 24px 16px 100px 16px; /* Extra bottom padding for fixed nav */
        margin-top: 0;
        background: #fafafa;
        border-top: 1px solid #e0e0e0;
    }
    
    .app-footer p {
        font-size: 0.8rem;
    }
}

/* Small Mobile (< 480px) */
@media (max-width: 480px) {
    .app-header {
        padding: 16px 12px;
    }
    
    .app-title {
        font-size: 1.35rem;
    }
    
    .app-subtitle {
        font-size: 0.75rem;
    }
    
    .section-title {
        font-size: 1rem;
        padding: 0 12px;
    }
    
    /* Template grid - 2 columns for small screens */
    .template-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        padding: 0 12px;
    }
    
    .template-card {
        padding: 6px;
    }
    
    .template-preview {
        aspect-ratio: 5/3;
        height: auto;
        min-height: 50px;
        margin-bottom: 5px;
        padding: 6px 4px;
    }
    
    .template-name {
        font-size: 0.6rem;
    }
    
    .preview-name {
        font-size: 0.55rem;
    }
    
    .preview-title {
        font-size: 0.45rem;
    }
    
    /* Preview section adjustments */
    .preview-header {
        padding: 12px;
        gap: 12px;
    }
    
    .preview-header .section-title {
        font-size: 1.1rem;
    }
    
    .export-buttons {
        gap: 10px;
    }
    
    .btn-export {
        padding: 12px 16px;
        font-size: 0.9rem;
        border-radius: 10px;
    }
    
    .card-preview-wrapper {
        padding: 20px 10px;
        min-height: 280px;
    }
    
    /* Form section */
    .form-section {
        padding: 16px 12px;
    }
    
    .form-input {
        padding: 12px 14px;
    }
    
    .app-footer {
        padding: 20px 12px 90px 12px;
    }
    
    .app-footer p {
        font-size: 0.75rem;
    }
}

/* Extra Small Mobile (< 380px) */
@media (max-width: 380px) {
    .app-title {
        font-size: 1.2rem;
    }
    
    .template-grid {
        gap: 6px;
    }
    
    .template-card {
        padding: 6px;
    }
    
    .template-preview {
        height: 55px;
    }
    
    .template-name {
        font-size: 0.6rem;
    }
    
    .btn-export {
        padding: 11px 12px;
        font-size: 0.85rem;
    }
    
    .card-preview-wrapper {
        min-height: 260px;
    }
}

/* ===== NEW PREMIUM TEMPLATES (21-30) ===== */

/* ===== TEMPLATE 21: NEON GLOW ===== */
.template-neon {
    background: #0a0e27;
    border: 2px solid #00ffff;
    box-shadow: 
        0 0 20px rgba(0, 255, 255, 0.5),
        inset 0 0 20px rgba(0, 255, 255, 0.1);
}

.template-neon .card-content {
    background: radial-gradient(circle at top right, rgba(255, 0, 255, 0.1), transparent);
}

.template-neon .card-name {
    color: #00ffff;
    font-size: 2.2rem;
    font-weight: 900;
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.8);
}

.template-neon .card-title {
    color: #ff00ff;
    text-shadow: 0 0 10px rgba(255, 0, 255, 0.6);
}

.template-neon .card-divider {
    background: linear-gradient(90deg, #00ffff, #ff00ff);
    height: 3px;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
}

.template-neon .contact-row {
    color: #ffffff;
}

.template-neon .contact-row i {
    color: #00ffff;
}

.template-neon .social-link {
    background: transparent;
    border: 2px solid #00ffff;
    color: #00ffff;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.template-neon-preview {
    background: #0a0e27;
    border: 1px solid #00ffff;
}

.template-neon-preview .preview-name {
    color: #00ffff;
    font-weight: 700;
}

.template-neon-preview .preview-title {
    color: #ff00ff;
}

/* ===== TEMPLATE 22: GRADIENT PRO ===== */
.template-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    border: none;
}

.template-gradient .card-content {
    text-align: center;
    align-items: center;
    justify-content: center;
}

.template-gradient .card-name {
    color: #ffffff;
    font-size: 2.5rem;
    font-weight: 900;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.template-gradient .card-title {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.template-gradient .card-divider {
    width: 80px;
    height: 2px;
    background: rgba(255, 255, 255, 0.8);
    margin: 20px auto;
}

.template-gradient .card-contacts {
    align-items: center;
}

.template-gradient .contact-row {
    color: rgba(255, 255, 255, 0.95);
}

.template-gradient .contact-row i {
    color: #ffffff;
}

.template-gradient .card-social {
    justify-content: center;
}

.template-gradient .social-link {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.template-gradient-preview {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
}

.template-gradient-preview .preview-name,
.template-gradient-preview .preview-title {
    color: #ffffff;
}

/* ===== TEMPLATE 23: DIAMOND EDGE ===== */
.template-diamond {
    background: #ffffff;
    border: none;
    position: relative;
    clip-path: polygon(
        0 30px, 30px 0,
        calc(100% - 30px) 0, 100% 30px,
        100% calc(100% - 30px), calc(100% - 30px) 100%,
        30px 100%, 0 calc(100% - 30px)
    );
}

.template-diamond::before {
    content: '';
    position: absolute;
    inset: 3px;
    background: #ffffff;
    clip-path: polygon(
        0 28px, 28px 0,
        calc(100% - 28px) 0, 100% 28px,
        100% calc(100% - 28px), calc(100% - 28px) 100%,
        28px 100%, 0 calc(100% - 28px)
    );
}

.template-diamond::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #FFD700, #FFA500, #FFD700);
    z-index: -1;
}

.template-diamond .card-content {
    position: relative;
    z-index: 1;
    text-align: center;
    align-items: center;
    justify-content: center;
}

.template-diamond .card-name {
    color: #B8860B;
    font-size: 2.3rem;
    font-weight: 700;
    letter-spacing: 2px;
}

.template-diamond .card-title {
    color: #DAA520;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.template-diamond .card-divider {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #FFD700, transparent);
    margin: 20px auto;
}

.template-diamond .card-contacts {
    align-items: center;
}

.template-diamond .contact-row {
    color: #8B6914;
}

.template-diamond .contact-row i {
    color: #DAA520;
}

.template-diamond .card-social {
    justify-content: center;
}

.template-diamond .social-link {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #ffffff;
}

.template-diamond-preview {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    clip-path: polygon(5px 5px, calc(100% - 5px) 5px, calc(100% - 5px) calc(100% - 5px), 5px calc(100% - 5px));
}

.template-diamond-preview .preview-name {
    color: #8B6914;
    font-weight: 700;
}

.template-diamond-preview .preview-title {
    color: #B8860B;
}

/* ===== TEMPLATE 24: CARBON FIBER ===== */
.template-carbon {
    background: 
        repeating-linear-gradient(0deg, #2a2a2a 0px, #2a2a2a 2px, #1a1a1a 2px, #1a1a1a 4px),
        repeating-linear-gradient(90deg, #2a2a2a 0px, #2a2a2a 2px, #1a1a1a 2px, #1a1a1a 4px);
    border: 3px solid #00ff9d;
}

.template-carbon .card-content {
    background: rgba(0, 0, 0, 0.4);
}

.template-carbon .card-name {
    color: #00ff9d;
    font-size: 2rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 4px;
}

.template-carbon .card-title {
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.template-carbon .card-divider {
    background: linear-gradient(90deg, transparent, #00ff9d, transparent);
    width: 100px;
}

.template-carbon .contact-row {
    color: #d4d4d4;
    font-family: 'Space Mono', monospace;
}

.template-carbon .contact-row i {
    color: #00ff9d;
}

.template-carbon .social-link {
    background: transparent;
    border: 2px solid #00ff9d;
    color: #00ff9d;
}

.template-carbon-preview {
    background: #1a1a1a;
    border: 1px solid #00ff9d;
}

.template-carbon-preview .preview-name {
    color: #00ff9d;
    font-weight: 900;
    text-transform: uppercase;
}

.template-carbon-preview .preview-title {
    color: #ffffff;
}

/* ===== TEMPLATE 25: MARBLE LUXURY ===== */
.template-marble {
    background: 
        linear-gradient(135deg, rgba(255,255,255,0.8) 0%, rgba(245,245,245,0.9) 100%),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="400" height="400"><defs><filter id="noise"><feTurbulence baseFrequency="0.02" numOctaves="5"/></filter></defs><rect width="400" height="400" filter="url(%23noise)" opacity="0.1"/></svg>');
    border: 4px solid #c9b037;
    position: relative;
}

.template-marble::before {
    content: '';
    position: absolute;
    top: 15px;
    right: 15px;
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, #c9b037, #f6e05e);
    border-radius: 50%;
    opacity: 0.3;
}

.template-marble .card-content {
    position: relative;
    z-index: 1;
}

.template-marble .card-name {
    color: #1a1a1a;
    font-size: 2.5rem;
    font-weight: 700;
    font-family: 'Playfair Display', serif;
    letter-spacing: 1px;
}

.template-marble .card-title {
    color: #5a5a5a;
    font-style: italic;
    font-size: 1.1rem;
}

.template-marble .card-divider {
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #c9b037, #f6e05e, #c9b037);
}

.template-marble .contact-row {
    color: #2a2a2a;
}

.template-marble .contact-row i {
    color: #c9b037;
}

.template-marble .social-link {
    background: #c9b037;
    color: #ffffff;
}

.template-marble-preview {
    background: linear-gradient(135deg, #f5f5f5, #ffffff);
    border: 2px solid #c9b037;
}

.template-marble-preview .preview-name {
    color: #1a1a1a;
    font-family: 'Playfair Display', serif;
}

.template-marble-preview .preview-title {
    color: #5a5a5a;
}

/* ===== TEMPLATE 26: CYBERPUNK ===== */
.template-cyberpunk {
    background: #000000;
    border: 2px solid #ff0080;
    position: relative;
    overflow: hidden;
}

.template-cyberpunk::before {
    content: '';
    position: absolute;
    top: 0;
    right: -100px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 0, 128, 0.3), transparent);
}

.template-cyberpunk::after {
    content: '';
    position: absolute;
    bottom: -50px;
    left: -50px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(0, 255, 255, 0.2), transparent);
}

.template-cyberpunk .card-content {
    position: relative;
    z-index: 1;
    font-family: 'Space Mono', monospace;
}

.template-cyberpunk .card-name {
    color: #ff0080;
    font-size: 2.3rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 0 0 10px rgba(255, 0, 128, 0.5);
}

.template-cyberpunk .card-title {
    color: #00ffff;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.template-cyberpunk .card-divider {
    background: linear-gradient(90deg, #ff0080, #00ffff);
    height: 3px;
}

.template-cyberpunk .contact-row {
    color: #ffffff;
}

.template-cyberpunk .contact-row i {
    color: #ff0080;
}

.template-cyberpunk .social-link {
    background: linear-gradient(135deg, #ff0080, #ff4d9f);
    border: 1px solid #00ffff;
}

.template-cyberpunk-preview {
    background: #000000;
    border: 1px solid #ff0080;
}

.template-cyberpunk-preview .preview-name {
    color: #ff0080;
    font-weight: 900;
}

.template-cyberpunk-preview .preview-title {
    color: #00ffff;
}

/* ===== TEMPLATE 27: GLASSMORPHISM ===== */
.template-glass {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    position: relative;
}

.template-glass::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    opacity: 0.8;
    z-index: -1;
}

.template-glass .card-content {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 35px;
}

.template-glass .card-name {
    color: #ffffff;
    font-size: 2.2rem;
    font-weight: 700;
}

.template-glass .card-title {
    color: rgba(255, 255, 255, 0.9);
}

.template-glass .card-divider {
    background: rgba(255, 255, 255, 0.5);
}

.template-glass .contact-row {
    color: rgba(255, 255, 255, 0.95);
}

.template-glass .contact-row i {
    color: #ffffff;
}

.template-glass .social-link {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.template-glass-preview {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.6), rgba(118, 75, 162, 0.6));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.template-glass-preview .preview-name,
.template-glass-preview .preview-title {
    color: #ffffff;
}

/* ===== TEMPLATE 28: ORIGAMI FOLD ===== */
.template-vintage {
    background: #ffffff;
    border: none;
    position: relative;
    clip-path: polygon(
        0 0, 70% 0, 75% 5%, 100% 5%,
        100% 100%, 5% 100%, 0 95%
    );
}

.template-vintage::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 80px 80px 0;
    border-color: transparent #ff6b6b transparent transparent;
}

.template-vintage::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 75px 75px 0;
    border-color: transparent #ffffff transparent transparent;
    margin: 2px;
}

.template-vintage .card-content {
    position: relative;
    z-index: 1;
    padding: 50px;
}

.template-vintage .card-name {
    color: #2d3436;
    font-size: 2.4rem;
    font-weight: 900;
    letter-spacing: 1px;
}

.template-vintage .card-title {
    color: #636e72;
    font-size: 1rem;
    margin-bottom: 20px;
    font-weight: 600;
}

.template-vintage .card-divider {
    width: 70px;
    height: 3px;
    background: linear-gradient(90deg, #ff6b6b, #4ecdc4);
    margin: 20px 0;
    position: relative;
}

.template-vintage .card-contacts {
    font-family: 'Inter', sans-serif;
}

.template-vintage .contact-row {
    color: #2d3436;
    font-weight: 500;
}

.template-vintage .contact-row i {
    color: #ff6b6b;
}

.template-vintage .card-social {
    justify-content: flex-start;
}

.template-vintage .social-link {
    background: linear-gradient(135deg, #ff6b6b, #4ecdc4);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(255, 107, 107, 0.3);
}

.template-vintage-preview {
    background: #ffffff;
    position: relative;
    clip-path: polygon(
        0 0, 70% 0, 80% 10%, 100% 10%,
        100% 100%, 10% 100%, 0 90%
    );
}

.template-vintage-preview::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 25px 25px 0;
    border-color: transparent #ff6b6b transparent transparent;
}

.template-vintage-preview .preview-name {
    color: #2d3436;
    font-weight: 900;
    position: relative;
    z-index: 1;
}

.template-vintage-preview .preview-title {
    color: #636e72;
    position: relative;
    z-index: 1;
}
/* ===== TEMPLATE 29: ARCHITECT GRID ===== */
.template-architect {
    background: #ffffff;
    border: 2px solid #000000;
    position: relative;
}

.template-architect::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        linear-gradient(rgba(0, 0, 0, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.05) 1px, transparent 1px);
    background-size: 20px 20px;
}

.template-architect::after {
    content: '';
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: #000000;
}

.template-architect .card-content {
    position: relative;
    z-index: 1;
}

.template-architect .card-name {
    color: #000000;
    font-size: 2rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 4px;
}

.template-architect .card-title {
    color: #666666;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.85rem;
}

.template-architect .card-divider {
    width: 100px;
    height: 4px;
    background: #000000;
}

.template-architect .contact-row {
    color: #333333;
}

.template-architect .contact-row i {
    color: #000000;
}

.template-architect .social-link {
    background: #000000;
    border-radius: 0;
}

.template-architect-preview {
    background: #ffffff;
    border: 1px solid #000000;
    position: relative;
}

.template-architect-preview::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        linear-gradient(rgba(0, 0, 0, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.05) 1px, transparent 1px);
    background-size: 10px 10px;
}

.template-architect-preview .preview-name {
    color: #000000;
    font-weight: 900;
    position: relative;
    z-index: 1;
}

.template-architect-preview .preview-title {
    color: #666666;
    position: relative;
    z-index: 1;
}

/* ===== TEMPLATE 30: QUANTUM WAVE ===== */
.template-quantum {
    background: #000814;
    border: none;
    position: relative;
    overflow: hidden;
}

.template-quantum::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(0, 150, 255, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(138, 43, 226, 0.2) 0%, transparent 50%);
}

.template-quantum::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to top, rgba(0, 150, 255, 0.3), transparent);
    clip-path: polygon(
        0 50%, 10% 45%, 20% 55%, 30% 50%, 40% 60%, 50% 55%,
        60% 65%, 70% 60%, 80% 70%, 90% 65%, 100% 70%,
        100% 100%, 0 100%
    );
}

.template-quantum .card-content {
    position: relative;
    z-index: 1;
}

.template-quantum .card-name {
    color: #00d9ff;
    font-size: 2.3rem;
    font-weight: 900;
    letter-spacing: 2px;
    text-shadow: 0 0 20px rgba(0, 217, 255, 0.5);
}

.template-quantum .card-title {
    color: #b19cd9;
    letter-spacing: 2px;
}

.template-quantum .card-divider {
    background: linear-gradient(90deg, #00d9ff, #b19cd9, #00d9ff);
    height: 2px;
}

.template-quantum .contact-row {
    color: #ffffff;
}

.template-quantum .contact-row i {
    color: #00d9ff;
}

.template-quantum .social-link {
    background: linear-gradient(135deg, #00d9ff, #8a2be2);
    border: 1px solid rgba(0, 217, 255, 0.5);
}

.template-quantum-preview {
    background: linear-gradient(135deg, #000814, #1a0b3f);
}

.template-quantum-preview .preview-name {
    color: #00d9ff;
    font-weight: 900;
}

.template-quantum-preview .preview-title {
    color: #b19cd9;
}

/* ===== MOBILE POLISH & ENHANCEMENTS ===== */

/* Smooth scrolling for the whole page */
html {
    scroll-behavior: smooth;
}

/* Better touch targets on mobile */
@media (max-width: 768px) {
    /* Ensure touch-friendly spacing */
    .template-card {
        min-height: 100px;
    }
    
    /* Add subtle press feedback */
    .template-card:active {
        transform: scale(0.97);
        transition: transform 0.1s ease;
    }
    
    .btn-export:active {
        opacity: 0.9;
    }
    
    /* Floating card shadow effect */
    .business-card {
        animation: floatCard 3s ease-in-out infinite;
    }
    
    @keyframes floatCard {
        0%, 100% {
            box-shadow: 
                0 20px 60px rgba(0, 0, 0, 0.15),
                0 8px 20px rgba(0, 0, 0, 0.1);
        }
        50% {
            box-shadow: 
                0 25px 70px rgba(0, 0, 0, 0.18),
                0 12px 25px rgba(0, 0, 0, 0.12);
        }
    }
    
    /* Status bar safe area for iOS */
    .app-header {
        padding-top: max(20px, env(safe-area-inset-top));
    }
    
    /* Better form focus states on mobile */
    .form-input:focus {
        box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.08);
    }
    
    /* Template grid scroll hint shadow */
    .template-section::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 30px;
        background: linear-gradient(to top, rgba(255, 255, 255, 0.9), transparent);
        pointer-events: none;
        display: none;
    }
    
    /* Active template indicator */
    .template-card.active::after {
        content: '✓';
        position: absolute;
        top: 6px;
        right: 6px;
        width: 20px;
        height: 20px;
        background: #000000;
        color: #ffffff;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.65rem;
        font-weight: bold;
    }
    
    .template-card {
        position: relative;
    }
    
    /* Improve notification on mobile */
    .notification {
        left: 16px !important;
        right: 16px !important;
        max-width: none !important;
    }
}

/* Landscape mobile adjustments */
@media (max-width: 768px) and (orientation: landscape) {
    .card-preview-wrapper {
        min-height: 200px;
        padding: 16px;
    }
    
    .business-card {
        animation: none;
    }
    
    .preview-header {
        flex-direction: row;
        align-items: center;
    }
    
    .preview-header .section-title {
        flex: 1;
        text-align: left;
    }
    
    .export-buttons {
        flex: 0 0 auto;
        width: auto;
    }
    
    .btn-export {
        padding: 10px 16px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .template-card.active {
        border-width: 3px;
    }
    
    .mobile-tab.active {
        border-bottom-width: 4px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .business-card {
        animation: none !important;
    }
    
    .template-section.active,
    .preview-section.active,
    .form-section.active {
        animation: none !important;
    }
    
    * {
        transition-duration: 0.01ms !important;
    }
}

/* Print styles for business card */
@media print {
    .mobile-tabs,
    .app-header,
    .app-footer,
    .form-section,
    .template-section,
    .export-buttons,
    .preview-header {
        display: none !important;
    }
    
    .preview-section {
        display: block !important;
        margin: 0;
        padding: 0;
    }
    
    .card-preview-wrapper {
        min-height: auto;
        padding: 0;
        background: none;
    }
    
    .business-card {
        transform: none !important;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}




