/* ==========================================================================
   Email Signature Generator - Vikilinks
   ========================================================================== */

/* CSS Variables */
:root {
    --primary: #02c39a;
    --primary-dark: #00a884;
    --primary-light: #33d4b0;
    --secondary: #0a0a0a;
    --background: #0d1f1c;
    --background-light: #0f2925;
    --surface: #153531;
    --surface-light: #1a423d;
    --text: #ffffff;
    --text-muted: #94a3b8;
    --text-dark: #0a0a0a;
    --border: rgba(255, 255, 255, 0.1);
    --border-light: rgba(255, 255, 255, 0.15);
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -4px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.2);
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --font-display: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--background);
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }
h4 { font-size: 1.25rem; }

p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

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

a:hover {
    color: var(--primary-light);
}

/* Container */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ==========================================================================
   Header
   ========================================================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(13, 31, 28, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.logo svg {
    height: 36px;
    width: auto;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.header-nav a {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color var(--transition);
}

.header-nav a:hover {
    color: var(--text);
}

.signature-counter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--surface);
    border-radius: var(--radius);
    font-size: 0.85rem;
}

.counter-icon {
    font-size: 1rem;
}

.counter-text {
    color: var(--text-muted);
}

.counter-text strong {
    color: var(--primary);
    font-weight: 600;
}

/* Header Actions and Share/Bookmark Buttons */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-buttons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-bookmark,
.btn-share {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: 50px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition);
    font-size: 0.8rem;
    font-weight: 500;
    font-family: inherit;
    white-space: nowrap;
}

.btn-bookmark svg,
.btn-share svg {
    flex-shrink: 0;
    opacity: 0.8;
}

.btn-bookmark:hover,
.btn-share:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(2, 195, 154, 0.3);
}

.btn-bookmark:hover svg,
.btn-share:hover svg {
    opacity: 1;
}

.btn-bookmark:active,
.btn-share:active {
    transform: translateY(0);
}

.btn-share {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.btn-share:hover {
    background: #00a884;
    border-color: #00a884;
}

/* Share Modal */
.share-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.share-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.share-modal {
    background: var(--bg);
    border-radius: var(--radius-lg);
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.share-modal-overlay.active .share-modal {
    transform: scale(1);
}

.share-modal h3 {
    margin: 0 0 0.5rem;
    font-size: 1.5rem;
    color: var(--text);
}

.share-modal p {
    color: var(--text-muted);
    margin: 0 0 1.5rem;
    font-size: 0.9rem;
}

.share-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1rem;
    border: none;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.share-btn.facebook {
    background: #1877f2;
    color: white;
}

.share-btn.twitter {
    background: #1da1f2;
    color: white;
}

.share-btn.linkedin {
    background: #0a66c2;
    color: white;
}

.share-btn.whatsapp {
    background: #25d366;
    color: white;
}

.share-btn.email {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
}

.share-btn.copy {
    background: var(--primary);
    color: white;
}

.share-modal-close {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
    font-size: 0.9rem;
}

.share-modal-close:hover {
    background: var(--text);
    color: var(--bg);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 8rem 2rem 4rem;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(2, 195, 154, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 80% 60%, rgba(2, 195, 154, 0.1) 0%, transparent 50%);
}

.hero-pattern {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
}

.hero-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    width: 100%;
}

.hero-text {
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(2, 195, 154, 0.1);
    border: 1px solid rgba(2, 195, 154, 0.2);
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.hero-text h1 {
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--text) 0%, var(--text-muted) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-text > p {
    font-size: 1.125rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    max-width: 540px;
}

.hero-stats {
    display: flex;
    gap: 2.5rem;
    margin-bottom: 2.5rem;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: var(--primary);
    color: var(--secondary);
    font-weight: 600;
    font-size: 1rem;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}

.cta-button:hover {
    background: var(--primary-light);
    color: var(--secondary);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(2, 195, 154, 0.3);
}

.cta-button.large {
    padding: 1.25rem 2.5rem;
    font-size: 1.1rem;
}

.cta-button svg {
    transition: transform var(--transition);
}

.cta-button:hover svg {
    transform: translateX(4px);
}

/* Hero Preview */
.hero-preview {
    position: relative;
    perspective: 1000px;
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.preview-cards {
    position: relative;
    height: 400px;
}

.preview-card {
    position: absolute;
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-xl);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.preview-card.card-1 {
    top: 0;
    left: 10%;
    width: 280px;
    transform: rotate(-5deg);
    z-index: 3;
    animation: float 6s ease-in-out infinite;
}

.preview-card.card-2 {
    top: 40px;
    right: 5%;
    width: 300px;
    transform: rotate(3deg);
    z-index: 2;
    animation: float 6s ease-in-out infinite 1s;
}

.preview-card.card-3 {
    bottom: 0;
    left: 20%;
    width: 260px;
    transform: rotate(2deg);
    z-index: 1;
    animation: float 6s ease-in-out infinite 2s;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(var(--rotation, 0deg)); }
    50% { transform: translateY(-15px) rotate(var(--rotation, 0deg)); }
}

.mini-signature {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.mini-signature.horizontal {
    flex-direction: row;
}

.mini-signature.centered {
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.mini-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    flex-shrink: 0;
}

.mini-avatar.large {
    width: 70px;
    height: 70px;
}

.mini-lines {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mini-lines.centered {
    align-items: center;
}

.mini-line {
    height: 8px;
    border-radius: 4px;
    background: #e5e7eb;
}

.mini-line.long { width: 140px; }
.mini-line.medium { width: 100px; }
.mini-line.short { width: 60px; }

.mini-content {
    flex: 1;
}

.mini-socials {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.mini-socials span {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
}

/* ==========================================================================
   Generator Section
   ========================================================================== */
.generator-section {
    padding: 4rem 2rem;
    background: var(--background);
}

.generator-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 80px 1fr 450px;
    gap: 2rem;
    align-items: start;
}

/* Sidebar Navigation */
.generator-sidebar {
    position: sticky;
    top: 100px;
    align-self: start;
}

.step-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    background: linear-gradient(180deg, #1a1f2e 0%, #151922 100%);
    border-radius: var(--radius-xl);
    padding: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    width: 100%;
    max-width: 140px;
}

.step-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 0.65rem 0.5rem;
    border-radius: var(--radius-lg);
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
    border: 1px solid transparent;
    overflow: hidden;
}

.step-nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: transparent;
    border-radius: 0 3px 3px 0;
    transition: all 0.2s ease;
}

.step-nav-item:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.08);
}

.step-nav-item:hover::before {
    background: rgba(2, 195, 154, 0.5);
}

.step-nav-item.active {
    color: #ffffff;
    background: linear-gradient(135deg, rgba(2, 195, 154, 0.2) 0%, rgba(2, 195, 154, 0.1) 100%);
    border-color: rgba(2, 195, 154, 0.3);
    box-shadow: 0 4px 16px rgba(2, 195, 154, 0.15);
}

.step-nav-item.active::before {
    background: var(--primary);
    box-shadow: 0 0 12px rgba(2, 195, 154, 0.6);
}

.step-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.step-icon svg {
    width: 16px;
    height: 16px;
}

.step-nav-item:hover .step-icon {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

.step-nav-item.active .step-icon {
    background: rgba(2, 195, 154, 0.25);
    color: var(--primary);
}

.step-nav-item.active .step-icon svg {
    color: var(--primary);
}

.step-text {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.2px;
    text-align: center;
    white-space: nowrap;
}

/* Form Area */
.generator-form-area {
    background: var(--surface);
    border-radius: var(--radius-xl);
    padding: 2rem;
    min-height: 600px;
}

.form-step {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.form-step.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.step-header {
    margin-bottom: 2rem;
}

.step-number {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.step-header h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.step-header p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
}

/* Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group.full-width {
    grid-column: span 2;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group label svg {
    flex-shrink: 0;
}

.required {
    color: var(--error);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.95rem;
    font-family: inherit;
    transition: all var(--transition);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(2, 195, 154, 0.1);
}

.form-group input.error,
.form-group select.error,
.form-group textarea.error {
    border-color: var(--error);
    background: rgba(239, 68, 68, 0.05);
}

.form-group input.error:focus,
.form-group select.error:focus,
.form-group textarea.error:focus {
    border-color: var(--error);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%2394a3b8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.form-hint a {
    color: var(--primary);
}

/* Toggle Buttons for Icon Color Selection */
.toggle-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.toggle-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: var(--surface-light);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.toggle-btn:hover {
    border-color: var(--primary);
    color: var(--text);
    background: rgba(2, 195, 154, 0.05);
}

.toggle-btn.active {
    border-color: var(--primary);
    background: rgba(2, 195, 154, 0.15);
    color: var(--primary);
}

.toggle-btn svg {
    flex-shrink: 0;
}

.toggle-btn.active svg {
    stroke: var(--primary);
}

.input-with-help {
    display: flex;
    gap: 0.5rem;
}

.input-with-help input {
    flex: 1;
}

.help-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: help;
    transition: all var(--transition);
    align-self: flex-start;
    margin-top: 0;
}

.help-btn:hover {
    background: var(--primary);
    color: var(--secondary);
    border-color: var(--primary);
}

/* Color Input */
.color-input-wrapper {
    display: flex;
    gap: 0.5rem;
}

.color-text {
    flex: 1;
}

.color-picker {
    width: 46px !important;
    height: 46px;
    padding: 0.25rem !important;
    cursor: pointer;
    border-radius: var(--radius) !important;
}

/* Slider */
.slider-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.slider {
    -webkit-appearance: none;
    width: 100%;
    height: 8px;
    background: var(--surface-light);
    border-radius: 4px;
    outline: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    transition: all var(--transition);
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.slider-labels span:nth-child(2) {
    color: var(--primary);
    font-weight: 500;
}

/* Form Divider */
.form-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1rem 0;
}

.form-divider::before,
.form-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.form-divider span {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
}

/* Checkbox */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.9rem;
}

.checkbox-label input {
    display: none;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-light);
    border-radius: 4px;
    position: relative;
    transition: all var(--transition);
}

.checkbox-label input:checked + .checkbox-custom {
    background: var(--primary);
    border-color: var(--primary);
}

.checkbox-label input:checked + .checkbox-custom::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 9px;
    border: solid var(--secondary);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Char Count */
.char-count {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: right;
}

/* Form Actions */
.form-actions {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.btn-prev,
.btn-next {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition);
    border: none;
    font-family: inherit;
}

.btn-prev {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
}

.btn-prev:hover {
    background: var(--surface-light);
    color: var(--text);
}

.btn-next {
    background: var(--primary);
    color: var(--secondary);
    margin-left: auto;
}

.btn-next:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
}

.btn-generate {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--secondary);
    font-weight: 700;
    font-size: 1rem;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
    margin-left: auto;
}

.btn-generate:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(2, 195, 154, 0.4);
}

/* Templates Grid */
.templates-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.template-card {
    position: relative;
    cursor: pointer;
}

.template-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.template-preview {
    background: white;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.template-card input:checked + .template-preview {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(2, 195, 154, 0.2);
}

.template-card:hover .template-preview {
    border-color: var(--primary);
}

.template-name {
    display: block;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* Template Mini Previews */
.tpl-mini {
    width: 100%;
    display: flex;
    gap: 0.5rem;
}

.tpl-mini.horizontal {
    align-items: center;
}

.tpl-mini.centered {
    flex-direction: column;
    align-items: center;
}

.tpl-mini.side-by-side {
    justify-content: space-between;
}

.tpl-mini.compact {
    align-items: center;
}

.tpl-mini.bold-header {
    flex-direction: column;
    gap: 0.5rem;
}

.tpl-mini.minimal {
    flex-direction: column;
    align-items: flex-start;
}

.tpl-mini.pro-card {
    flex-direction: column;
    gap: 0.75rem;
}

.tpl-mini.two-column {
    justify-content: space-between;
}

.tpl-mini.with-banner {
    flex-direction: column;
    align-items: center;
}

.tpl-mini.executive {
    flex-direction: column;
    gap: 0.5rem;
}

.tpl-mini.logo-focus {
    align-items: center;
}

.tpl-mini.social-first {
    flex-direction: column;
    align-items: center;
}

.tpl-mini.gradient-border {
    padding: 2px;
    background: linear-gradient(90deg, #02c39a, #667eea, #764ba2);
    border-radius: 6px;
}

.tpl-mini.gradient-border .tpl-gradient-wrap {
    background: #1f2937;
    padding: 8px;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.tpl-mini.left-border {
    display: flex;
    align-items: stretch;
}

.tpl-mini.left-border .tpl-border-accent {
    width: 3px;
    background: #02c39a;
    border-radius: 2px;
    margin-right: 8px;
}

.tpl-mini.left-border .tpl-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
}

.tpl-mini.bold-style {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.tpl-mini.bold-style .tpl-name.large {
    width: 80px;
    height: 10px;
    background: #02c39a;
}

.tpl-mini.bold-style .tpl-divider.thick {
    width: 100%;
    height: 3px;
    background: #02c39a;
    border-radius: 1px;
}

.tpl-mini.executive .tpl-header-bar {
    width: 100%;
    height: 20px;
    background: linear-gradient(135deg, #02c39a 0%, #00a884 100%);
    border-radius: 4px 4px 0 0;
    margin-bottom: 6px;
}

.tpl-mini.executive .tpl-body {
    display: flex;
    align-items: center;
    gap: 6px;
}

.tpl-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, #02c39a 0%, #00a884 100%);
    flex-shrink: 0;
}

.tpl-avatar.small {
    width: 24px;
    height: 24px;
}

.tpl-avatar.centered {
    width: 40px;
    height: 40px;
}

.tpl-avatar.overlap {
    width: 35px;
    height: 35px;
    margin-top: -15px;
}

.tpl-info {
    flex: 1;
}

.tpl-info.centered {
    text-align: center;
}

.tpl-name {
    width: 50px;
    height: 6px;
    background: #374151;
    border-radius: 3px;
    margin-bottom: 4px;
}

.tpl-name.large {
    width: 70px;
    height: 8px;
}

.tpl-title {
    width: 35px;
    height: 4px;
    background: #9ca3af;
    border-radius: 2px;
    margin-bottom: 4px;
}

.tpl-contact {
    width: 45px;
    height: 4px;
    background: #d1d5db;
    border-radius: 2px;
}

.tpl-contact.inline {
    margin-top: 4px;
}

.tpl-divider {
    width: 60px;
    height: 1px;
    background: #02c39a;
    margin: 6px 0;
}

.tpl-header-bar {
    width: 100%;
    height: 6px;
    background: #02c39a;
    border-radius: 3px;
}

.tpl-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tpl-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tpl-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.5rem;
    border-top: 1px solid #e5e7eb;
}

.tpl-logo {
    width: 30px;
    height: 15px;
    background: #e5e7eb;
    border-radius: 2px;
}

.tpl-logo.large {
    width: 45px;
    height: 25px;
}

.tpl-socials {
    display: flex;
    gap: 3px;
}

.tpl-socials::before,
.tpl-socials::after {
    content: '';
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #02c39a;
}

.tpl-socials.large::before,
.tpl-socials.large::after {
    width: 16px;
    height: 16px;
}

.tpl-col {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tpl-banner {
    width: 100%;
    height: 20px;
    background: linear-gradient(135deg, #02c39a 0%, #00a884 100%);
    border-radius: 4px;
}

.tpl-signature {
    width: 50px;
    height: 20px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 30'%3E%3Cpath d='M5 25 Q 30 5 50 20 T 95 10' stroke='%23374151' fill='none' stroke-width='2'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
}

.tpl-left,
.tpl-right {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* ==========================================================================
   Preview Area
   ========================================================================== */
.generator-preview-area {
    position: sticky;
    top: 100px;
}

.preview-wrapper {
    background: var(--surface);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.preview-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: var(--primary);
}

.preview-dots {
    display: flex;
    gap: 6px;
}

.preview-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.2);
}

.preview-dots span:first-child {
    background: #ff5f57;
}

.preview-dots span:nth-child(2) {
    background: #febc2e;
}

.preview-dots span:last-child {
    background: #28c840;
}

.preview-title {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--secondary);
    opacity: 0.8;
}

.preview-email {
    background: white;
    min-height: 400px;
}

.preview-email-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.preview-to,
.preview-subject {
    font-size: 0.85rem;
    color: #374151;
}

.recipient {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    background: #ecfdf5;
    color: #059669;
    border-radius: 4px;
    font-weight: 500;
}

.preview-email-body {
    padding: 1.5rem;
}

.signature-preview {
    font-family: Arial, sans-serif;
}

.placeholder-signature {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    background: #f9fafb;
    border: 2px dashed #e5e7eb;
    border-radius: var(--radius);
    text-align: center;
    padding: 2rem;
}

.placeholder-signature p {
    color: #9ca3af;
    font-size: 0.9rem;
    margin: 0;
}

.preview-actions {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--surface);
    border-top: 1px solid var(--border);
}

.btn-action {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
}

.btn-action:hover:not(:disabled) {
    background: var(--primary);
    color: var(--secondary);
    border-color: var(--primary);
}

.btn-action:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-action.btn-clear {
    flex: 0 0 auto;
}

.btn-action.btn-clear:hover:not(:disabled) {
    background: var(--error);
    border-color: var(--error);
}

/* ==========================================================================
   Modal
   ========================================================================== */
.modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    overflow-y: auto;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
}

.modal-content {
    position: relative;
    background: var(--surface);
    border-radius: var(--radius-xl);
    max-width: 700px;
    width: 100%;
    margin: auto;
    animation: modalSlideIn 0.4s ease;
    z-index: 1;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-light);
    border: none;
    border-radius: 50%;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all var(--transition);
    z-index: 10;
}

.modal-close:hover {
    background: var(--error);
    color: white;
}

.modal-header {
    text-align: center;
    padding: 2rem 2rem 1rem;
}

.modal-header h2 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.modal-header p {
    color: var(--text-muted);
    margin: 0;
}

.modal-body {
    padding: 1rem 2rem 2rem;
}

.modal-signature-preview {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    max-height: 300px;
    overflow-y: auto;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.btn-primary,
.btn-secondary {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
    border: none;
}

.btn-primary {
    background: var(--primary);
    color: var(--secondary);
}

.btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--surface-light);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--surface);
}

/* Email Form */
.email-form {
    background: var(--surface-light);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.email-form h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.email-form p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.email-input-group {
    display: flex;
    gap: 0.75rem;
}

.email-input-group input {
    flex: 1;
    padding: 0.875rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.95rem;
    font-family: inherit;
}

.email-input-group input:focus {
    outline: none;
    border-color: var(--primary);
}

.btn-send {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 1.5rem;
    background: var(--primary);
    color: var(--secondary);
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
}

.btn-send:hover {
    background: var(--primary-light);
}

.email-status {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    text-align: center;
}

.email-status.success {
    color: var(--primary);
}

.email-status.error {
    color: var(--error);
}

/* Copy button animation */
.btn-primary.copied,
.btn-secondary.copied {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: white !important;
    animation: copiedPulse 0.3s ease;
}

@keyframes copiedPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* ==========================================================================
   Modal Loading State
   ========================================================================== */
.modal-loading-state {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
    min-height: 300px;
}

.modal-loading-state.active {
    display: flex;
}

.signature-ready {
    display: none;
}

.signature-ready.active {
    display: block;
}

.loading-spinner {
    margin-bottom: 1.5rem;
}

.loading-spinner svg {
    display: block;
}

.spinner-circle {
    animation: spin 1.5s linear infinite;
    transform-origin: center;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.modal-loading-state .loading-text {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.modal-loading-state .loading-subtext {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.loading-icon {
    margin-bottom: 1rem;
}

.loading-icon svg {
    display: block;
}

.loading-animation {
    margin-bottom: 0.5rem;
}

.loading-dots {
    display: flex;
    gap: 10px;
}

.loading-dots span {
    width: 14px;
    height: 14px;
    background: var(--primary);
    border-radius: 50%;
    animation: bounce 1.4s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(2, 195, 154, 0.4);
}

.loading-dots span:nth-child(1) { animation-delay: 0s; }
.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

.loading-text {
    color: #ffffff;
    font-size: 1.4rem;
    font-weight: 600;
    margin-top: 1rem;
}

.loading-subtext {
    color: #9ca3af;
    font-size: 0.95rem;
    margin-top: 0.25rem;
}

.loading-progress {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin-top: 1.5rem;
    overflow: hidden;
}

.loading-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary), #00d9a5);
    border-radius: 2px;
    animation: progressFill 2s ease-in-out forwards;
}

@keyframes progressFill {
    0% { width: 0%; }
    20% { width: 20%; }
    50% { width: 60%; }
    80% { width: 85%; }
    100% { width: 100%; }
}

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

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Signature Generated State */
.signature-ready {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   Toast
   ========================================================================== */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: var(--success);
    color: white;
    border-radius: var(--radius);
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    z-index: 3000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   Templates Showcase Section
   ========================================================================== */
.templates-showcase {
    padding: 6rem 2rem;
    background: var(--background);
}

.templates-showcase-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.template-showcase-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
    transition: all var(--transition);
    border: 1px solid var(--border);
}

.template-showcase-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(2, 195, 154, 0.15);
}

.template-showcase-preview {
    background: white;
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1rem;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.template-showcase-card h4 {
    color: var(--text);
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.template-showcase-card p {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin: 0;
}

/* Template Demo Styles */
.tpl-demo {
    width: 100%;
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.tpl-demo-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #02c39a 0%, #00a884 100%);
    flex-shrink: 0;
}

.tpl-demo-avatar.centered {
    margin: 0 auto;
}

.tpl-demo-avatar.overlap {
    width: 35px;
    height: 35px;
    margin-top: -12px;
}

.tpl-demo-content,
.tpl-demo-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.tpl-demo-name {
    width: 60px;
    height: 8px;
    background: #374151;
    border-radius: 4px;
}

.tpl-demo-name.centered {
    margin: 0 auto;
    width: 70px;
}

.tpl-demo-title {
    width: 45px;
    height: 6px;
    background: #9ca3af;
    border-radius: 3px;
}

.tpl-demo-title.centered {
    margin: 0 auto;
}

.tpl-demo-contact {
    width: 55px;
    height: 5px;
    background: #d1d5db;
    border-radius: 2px;
}

.tpl-demo-logo {
    width: 50px;
    height: 25px;
    background: #e5e7eb;
    border-radius: 4px;
}

.tpl-demo-divider {
    width: 2px;
    height: 40px;
    background: #02c39a;
}

.tpl-demo-header {
    width: 100%;
    height: 20px;
    background: linear-gradient(135deg, #02c39a 0%, #00a884 100%);
    border-radius: 4px 4px 0 0;
}

.tpl-demo-body {
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tpl-demo-banner {
    width: 100%;
    height: 25px;
    background: linear-gradient(135deg, #02c39a 0%, #00a884 100%);
    border-radius: 4px 4px 0 0;
}

.tpl-demo-gradient-bar {
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #02c39a, #667eea, #764ba2);
    border-radius: 2px;
    margin-bottom: 8px;
}

/* Template demo variations */
.tpl-demo.minimal {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.tpl-demo.bold {
    flex-direction: column;
    gap: 0;
}

.tpl-demo.elegant {
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.tpl-demo.corporate {
    gap: 10px;
}

.tpl-demo.creative {
    flex-direction: column;
    gap: 6px;
}

.tpl-demo.creative .tpl-demo-content {
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

.tpl-demo.executive {
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.templates-cta {
    text-align: center;
}

/* ==========================================================================
   Privacy Policy Modal Styles
   ========================================================================== */
.privacy-modal-content {
    max-width: 900px;
    max-height: 90vh;
    background: var(--background);
}

.privacy-modal-content .modal-header {
    background: linear-gradient(135deg, var(--secondary) 0%, #1a3a35 100%);
    padding: 2rem;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    text-align: center;
}

.privacy-modal-content .modal-header h2 {
    color: var(--primary);
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.privacy-modal-content .modal-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.privacy-body {
    max-height: 65vh;
    overflow-y: auto;
    padding: 0;
    background: var(--background);
}

.privacy-content {
    padding: 1.5rem 2rem 2rem;
}

/* Contact Info Card */
.privacy-contact-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.privacy-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.privacy-contact-icon {
    width: 36px;
    height: 36px;
    background: rgba(2, 195, 154, 0.1);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.privacy-contact-icon svg {
    width: 18px;
    height: 18px;
    color: var(--primary);
}

.privacy-contact-text {
    font-size: 0.85rem;
}

.privacy-contact-text strong {
    display: block;
    color: var(--text);
    margin-bottom: 2px;
}

.privacy-contact-text span {
    color: var(--text-muted);
}

/* Section Styling */
.privacy-section {
    margin-bottom: 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.privacy-section-header {
    background: rgba(2, 195, 154, 0.05);
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.privacy-section-number {
    width: 28px;
    height: 28px;
    background: var(--primary);
    color: var(--secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
}

.privacy-section-header h3 {
    color: var(--text);
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.privacy-section-body {
    padding: 1.25rem;
}

.privacy-section-body p {
    color: var(--text-muted);
    font-size: 0.875rem;
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

.privacy-section-body p:last-child {
    margin-bottom: 0;
}

.privacy-section-body ul {
    color: var(--text-muted);
    font-size: 0.875rem;
    line-height: 1.7;
    margin: 0.75rem 0;
    padding-left: 0;
    list-style: none;
}

.privacy-section-body ul li {
    padding: 0.5rem 0 0.5rem 1.75rem;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.privacy-section-body ul li:last-child {
    border-bottom: none;
}

.privacy-section-body ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.85rem;
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    opacity: 0.7;
}

.privacy-section-body a {
    color: var(--primary);
    text-decoration: none;
}

.privacy-section-body a:hover {
    text-decoration: underline;
}

/* Highlight Box */
.privacy-highlight {
    background: rgba(2, 195, 154, 0.1);
    border-left: 4px solid var(--primary);
    padding: 1rem 1.25rem;
    margin: 1rem 0;
    border-radius: 0 var(--radius) var(--radius) 0;
}

.privacy-highlight p {
    color: var(--text) !important;
    margin: 0 !important;
    font-weight: 500;
}

/* Warning Box */
.privacy-warning {
    background: rgba(255, 193, 7, 0.1);
    border-left: 4px solid #ffc107;
    padding: 1rem 1.25rem;
    margin: 1rem 0;
    border-radius: 0 var(--radius) var(--radius) 0;
}

.privacy-warning p {
    color: var(--text) !important;
    margin: 0 !important;
}

/* Footer Agreement */
.privacy-agreement {
    background: var(--surface);
    border: 2px solid var(--primary);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-top: 2rem;
    text-align: center;
}

.privacy-agreement p {
    color: var(--text);
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

.privacy-agreement strong {
    color: var(--primary);
}

/* ==========================================================================
   How It Works Section
   ========================================================================== */
.how-it-works {
    padding: 6rem 2rem;
    background: var(--background-light);
}

.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 4rem;
}

.section-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(2, 195, 154, 0.1);
    border: 1px solid rgba(2, 195, 154, 0.2);
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.section-header h2 {
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.1rem;
    margin: 0;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.step-card {
    position: relative;
    background: var(--surface);
    border-radius: var(--radius-xl);
    padding: 2rem;
    text-align: center;
    transition: all var(--transition);
}

.step-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.step-number {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    opacity: 0.2;
}

.step-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: rgba(2, 195, 154, 0.1);
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    color: var(--primary);
}

.step-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.step-card p {
    font-size: 0.9rem;
    margin: 0;
}

/* ==========================================================================
   FAQ Section
   ========================================================================== */
.faq-section {
    padding: 6rem 2rem;
    background: var(--background);
}

.faq-grid {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    background: var(--surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 1rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
}

.faq-question:hover {
    background: var(--surface-light);
}

.faq-question svg {
    flex-shrink: 0;
    color: var(--text-muted);
    transition: transform var(--transition);
}

.faq-item.active .faq-question svg {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-answer p {
    padding: 0 1.5rem 1.5rem;
    font-size: 0.95rem;
    line-height: 1.7;
    margin: 0;
}

/* ==========================================================================
   Guides Section
   ========================================================================== */
.guides-section {
    padding: 6rem 2rem;
    background: var(--background-light);
}

.guides-tabs {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.guide-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
}

.guide-tab:hover {
    background: var(--surface-light);
    color: var(--text);
}

.guide-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--secondary);
}

.guide-tab svg {
    flex-shrink: 0;
}

.guides-content {
    max-width: 800px;
    margin: 0 auto;
}

.guide-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

.guide-content.active {
    display: block;
}

.guide-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.guide-intro {
    font-size: 1.05rem;
    margin-bottom: 2rem;
}

.guide-section {
    margin-bottom: 2.5rem;
}

.guide-section h4 {
    font-size: 1.1rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.guide-steps {
    list-style: none;
    counter-reset: step;
}

.guide-steps li {
    position: relative;
    padding-left: 3rem;
    padding-bottom: 1rem;
    margin-bottom: 0.5rem;
    border-left: 2px solid var(--border);
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.guide-steps li::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    left: -12px;
    top: 0;
    width: 24px;
    height: 24px;
    background: var(--primary);
    color: var(--secondary);
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

.guide-steps li:last-child {
    border-left-color: transparent;
}

.guide-steps li strong {
    color: var(--text);
}

.guide-tip {
    background: rgba(2, 195, 154, 0.1);
    border-left: 3px solid var(--primary);
    padding: 1rem 1.5rem;
    border-radius: 0 var(--radius) var(--radius) 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.guide-tip strong {
    color: var(--primary);
}

/* ==========================================================================
   CTA Section
   ========================================================================== */
.cta-section {
    padding: 6rem 2rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.cta-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.cta-content h2 {
    color: var(--secondary);
    margin-bottom: 1rem;
}

.cta-content p {
    color: rgba(0, 0, 0, 0.7);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.cta-section .cta-button {
    background: var(--secondary);
    color: var(--text);
}

.cta-section .cta-button:hover {
    background: white;
    color: var(--secondary);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    padding: 4rem 2rem 2rem;
    background: var(--secondary);
    border-top: 1px solid var(--border);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-brand p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 1rem;
    max-width: 250px;
}

.footer-logo {
    display: inline-block;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.footer-column h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text);
}

.footer-column a {
    display: block;
    color: var(--text-muted);
    font-size: 0.9rem;
    padding: 0.375rem 0;
    transition: color var(--transition);
}

.footer-column a:hover {
    color: var(--primary);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.footer-bottom p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
}

.footer-tagline {
    color: var(--text-muted);
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 1200px) {
    .generator-container {
        grid-template-columns: 70px 1fr 380px;
    }

    .templates-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-text > p {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-stats {
        justify-content: center;
    }

    .hero-preview {
        display: none;
    }

    .generator-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .generator-sidebar {
        position: static;
        order: -2;
    }

    .step-nav {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
        max-width: 100%;
        gap: 0.5rem;
    }

    .step-nav-item {
        flex: 0 0 auto;
        padding: 0.5rem 0.75rem;
    }

    .step-text {
        display: none;
    }

    .generator-preview-area {
        position: static;
        order: -1;
    }

    .preview-wrapper {
        max-height: 350px;
        overflow: hidden;
    }

    .preview-email {
        min-height: 250px;
    }

    .steps-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .templates-showcase-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-links {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    /* Header fixes */
    .header-container {
        padding: 0 1rem;
    }

    .logo svg {
        height: 32px;
    }

    .header-actions {
        gap: 0.75rem;
    }

    .header-buttons {
        display: flex;
        flex-direction: row;
        gap: 0.5rem;
    }

    .btn-bookmark,
    .btn-share {
        padding: 0.5rem 0.875rem;
        font-size: 0.8rem;
        gap: 0.4rem;
    }

    .btn-bookmark svg,
    .btn-share svg {
        width: 16px;
        height: 16px;
    }

    .signature-counter {
        display: none;
    }

    .share-modal {
        padding: 1.5rem;
        max-width: 95%;
    }

    .share-buttons {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .share-btn {
        padding: 0.75rem;
    }

    /* Section consistency */
    .templates-showcase {
        padding: 3rem 1rem;
    }

    .templates-showcase h2 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .templates-showcase > p {
        font-size: 0.9rem;
        margin-bottom: 2rem;
    }

    /* How it works section */
    .how-it-works {
        padding: 3rem 1rem;
    }

    .how-it-works h2 {
        font-size: 1.5rem;
    }

    /* FAQ section */
    .faq-section {
        padding: 3rem 1rem;
    }

    .faq-section h2 {
        font-size: 1.5rem;
    }

    /* Guides section */
    .guides-section {
        padding: 3rem 1rem;
    }

    .guides-section h2 {
        font-size: 1.5rem;
    }

    /* Footer */
    .footer {
        padding: 2rem 1rem;
    }

    .templates-showcase-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .template-showcase-card {
        padding: 1rem;
    }

    .template-showcase-preview {
        height: 80px;
        padding: 1rem;
    }

    .template-showcase-card h4 {
        font-size: 0.9rem;
    }

    .privacy-modal-content {
        margin: 0.5rem;
        max-height: 95vh;
    }

    .privacy-modal-content .modal-header {
        padding: 1.5rem 1rem;
    }

    .privacy-modal-content .modal-header h2 {
        font-size: 1.35rem;
    }

    .privacy-body {
        max-height: 70vh;
    }

    .privacy-content {
        padding: 1rem;
    }

    .privacy-contact-card {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        padding: 1rem;
    }

    .privacy-contact-item {
        gap: 0.5rem;
    }

    .privacy-contact-icon {
        width: 32px;
        height: 32px;
    }

    .privacy-contact-text {
        font-size: 0.8rem;
    }

    .privacy-section {
        margin-bottom: 1rem;
    }

    .privacy-section-header {
        padding: 0.875rem 1rem;
    }

    .privacy-section-number {
        width: 24px;
        height: 24px;
        font-size: 0.7rem;
    }

    .privacy-section-header h3 {
        font-size: 0.9rem;
    }

    .privacy-section-body {
        padding: 1rem;
    }

    .privacy-section-body p {
        font-size: 0.8rem;
    }

    .privacy-section-body ul li {
        padding: 0.4rem 0 0.4rem 1.5rem;
        font-size: 0.8rem;
    }

    .privacy-section-body ul li::before {
        width: 6px;
        height: 6px;
        top: 0.7rem;
    }

    .privacy-highlight,
    .privacy-warning {
        padding: 0.875rem 1rem;
        margin: 0.75rem 0;
    }

    .privacy-highlight p,
    .privacy-warning p {
        font-size: 0.8rem !important;
    }

    .privacy-agreement {
        padding: 1rem;
        margin-top: 1.5rem;
    }

    .privacy-agreement p {
        font-size: 0.8rem;
    }

    .header-nav {
        display: none;
    }

    .hero {
        padding: 5rem 1rem 2rem;
        min-height: auto;
    }

    .hero-badge {
        font-size: 0.85rem;
        padding: 0.5rem 1rem;
    }

    .hero-text h1 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }

    .hero-text > p {
        font-size: 1.05rem;
        margin-bottom: 1.5rem;
        line-height: 1.6;
    }

    .hero-stats {
        gap: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .stat-number {
        font-size: 1.75rem;
    }

    .stat-label {
        font-size: 0.85rem;
    }

    .cta-button {
        padding: 1rem 1.75rem;
        font-size: 1rem;
    }

    .generator-section {
        padding: 1.5rem 1rem;
    }

    .generator-container {
        gap: 1rem;
    }

    .generator-form-area {
        padding: 1.25rem;
        min-height: auto;
    }

    .step-header {
        margin-bottom: 1.5rem;
    }

    .step-header h2 {
        font-size: 1.5rem;
    }

    .step-header p {
        font-size: 0.95rem;
    }

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

    .form-group.full-width {
        grid-column: span 1;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.875rem;
        font-size: 16px; /* Prevents zoom on iOS */
    }

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

    .templates-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .template-preview {
        height: 90px;
        padding: 0.75rem;
    }

    .template-name {
        font-size: 0.8rem;
    }

    .form-actions {
        flex-direction: column;
        gap: 0.75rem;
        margin-top: 1.5rem;
        padding-top: 1rem;
    }

    .btn-prev,
    .btn-next,
    .btn-generate {
        width: 100%;
        justify-content: center;
        margin-left: 0;
    }

    .btn-next {
        order: -1;
    }

    .preview-wrapper {
        border-radius: var(--radius);
    }

    .preview-email {
        min-height: 200px;
    }

    .preview-email-body {
        padding: 1rem;
    }

    .preview-actions {
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 0.75rem;
    }

    .btn-action {
        flex: 1 1 45%;
        padding: 0.625rem 0.75rem;
        font-size: 0.75rem;
    }

    .btn-action.btn-clear {
        flex: 1 1 100%;
    }

    .steps-grid {
        grid-template-columns: 1fr;
    }

    .step-card {
        padding: 1.5rem;
    }

    .guides-tabs {
        flex-direction: column;
        align-items: stretch;
    }

    .guide-tab {
        justify-content: center;
    }

    /* Modal mobile styles */
    .modal {
        padding: 0.5rem;
        align-items: flex-start;
    }

    .modal-content {
        margin: 0;
        border-radius: var(--radius-lg);
        max-height: 95vh;
        overflow-y: auto;
    }

    .modal-header {
        padding: 1.25rem 1rem 0.75rem;
        position: sticky;
        top: 0;
        background: var(--surface);
        z-index: 10;
    }

    .modal-header h2 {
        font-size: 1.25rem;
    }

    .modal-close {
        width: 32px;
        height: 32px;
        top: 0.75rem;
        right: 0.75rem;
    }

    .modal-body {
        padding: 0.75rem 1rem 1.25rem;
    }

    .modal-signature-preview {
        padding: 1rem;
        margin-bottom: 1rem;
        max-height: 200px;
    }

    .modal-actions {
        flex-direction: column;
        gap: 0.75rem;
        margin-bottom: 1.25rem;
    }

    .btn-primary,
    .btn-secondary {
        padding: 0.875rem 1rem;
        font-size: 0.875rem;
    }

    .email-form {
        padding: 1rem;
    }

    .email-form h3 {
        font-size: 1rem;
    }

    .email-input-group {
        flex-direction: column;
        gap: 0.75rem;
    }

    .email-input-group input {
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .btn-send {
        justify-content: center;
        padding: 0.875rem 1rem;
    }

    /* How it works section */
    .how-it-works {
        padding: 3rem 1rem;
    }

    .section-header {
        margin-bottom: 2rem;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }

    /* FAQ section */
    .faq-section {
        padding: 3rem 1rem;
    }

    .faq-question {
        padding: 1rem;
        font-size: 0.9rem;
    }

    .faq-answer p {
        padding: 0 1rem 1rem;
        font-size: 0.85rem;
    }

    /* Guides section */
    .guides-section {
        padding: 3rem 1rem;
    }

    /* CTA section */
    .cta-section {
        padding: 3rem 1rem;
    }

    .cta-content h2 {
        font-size: 1.5rem;
    }

    .cta-content p {
        font-size: 0.95rem;
    }

    /* Footer */
    .footer {
        padding: 2rem 1rem 1.5rem;
    }

    .footer-brand p {
        max-width: 100%;
    }

    .footer-links {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    /* Loading state mobile */
    .modal-loading-state {
        padding: 2rem 1rem;
        min-height: 200px;
    }

    .loading-text {
        font-size: 1.1rem;
    }

    .loading-subtext {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    /* Header */
    .header {
        padding: 0.75rem 0;
    }

    .header-container {
        padding: 0 1rem;
    }

    .logo svg {
        height: 28px;
    }

    .header-actions {
        gap: 0.5rem;
    }

    .header-buttons {
        display: flex;
        flex-direction: row;
        gap: 0.375rem;
    }

    .btn-bookmark span,
    .btn-share span {
        display: none;
    }

    .btn-bookmark,
    .btn-share {
        padding: 0.5rem;
        border-radius: 50%;
        width: 36px;
        height: 36px;
    }

    .btn-bookmark svg,
    .btn-share svg {
        width: 16px;
        height: 16px;
    }

    /* Hero section */
    .hero {
        padding: 5.5rem 1rem 2rem;
        text-align: center;
    }

    .hero-content {
        padding: 0;
    }

    .hero-text {
        text-align: center;
    }

    .hero-text h1 {
        font-size: 1.65rem;
        line-height: 1.3;
    }

    .hero-text > p {
        font-size: 1rem;
        line-height: 1.6;
    }

    .hero-badge {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }

    .hero-stats {
        flex-wrap: wrap;
        gap: 1rem;
        justify-content: center;
    }

    .stat {
        flex: 0 0 calc(33.333% - 0.75rem);
        text-align: center;
        min-width: 80px;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .stat-label {
        font-size: 0.75rem;
    }

    .cta-button {
        width: 100%;
        justify-content: center;
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }

    /* Generator section */
    .generator-section {
        padding: 1.5rem 1rem;
    }

    .generator-form-area {
        padding: 1rem;
        border-radius: var(--radius);
    }

    .step-header {
        text-align: center;
        margin-bottom: 1.25rem;
    }

    .step-header h2 {
        font-size: 1.35rem;
    }

    .step-header p {
        font-size: 0.9rem;
    }

    .step-nav {
        padding: 0.375rem;
        gap: 0.25rem;
        border-radius: var(--radius);
    }

    .step-nav-item {
        padding: 0.5rem;
        border-radius: var(--radius);
    }

    .step-icon {
        width: 28px;
        height: 28px;
    }

    .step-icon svg {
        width: 14px;
        height: 14px;
    }

    .templates-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.625rem;
    }

    .template-preview {
        height: 75px;
        padding: 0.625rem;
    }

    .template-name {
        font-size: 0.75rem;
    }

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

    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px;
        padding: 0.875rem;
    }

    .color-input-wrapper {
        flex-direction: column;
    }

    .color-picker {
        width: 100% !important;
        height: 44px;
    }

    /* Preview section */
    .preview-wrapper {
        border-radius: var(--radius);
    }

    .preview-toolbar {
        padding: 0.625rem 1rem;
    }

    .preview-actions {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.75rem;
    }

    .btn-action {
        flex: none;
        width: 100%;
        justify-content: center;
        padding: 0.75rem;
        font-size: 0.85rem;
    }

    /* Sections */
    .templates-showcase {
        padding: 2.5rem 1rem;
    }

    .templates-showcase h2 {
        font-size: 1.5rem;
    }

    .templates-showcase > p {
        font-size: 0.95rem;
    }

    .templates-showcase-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }

    .template-showcase-card {
        padding: 1rem;
    }

    .template-showcase-preview {
        height: 70px;
        padding: 0.625rem;
    }

    .template-showcase-card h4 {
        font-size: 0.85rem;
        margin-top: 0.625rem;
    }

    .how-it-works {
        padding: 2.5rem 1rem;
    }

    .how-it-works h2 {
        font-size: 1.5rem;
    }

    .step-card {
        padding: 1.25rem;
    }

    .step-number {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }

    .step-card h3 {
        font-size: 1.1rem;
    }

    .step-card p {
        font-size: 0.9rem;
    }

    .faq-section {
        padding: 2.5rem 1rem;
    }

    .faq-section h2 {
        font-size: 1.5rem;
    }

    .faq-item summary {
        padding: 1rem;
        font-size: 0.95rem;
    }

    .faq-item p {
        padding: 0 1rem 1rem;
        font-size: 0.9rem;
    }

    .guides-section {
        padding: 2.5rem 1rem;
    }

    .guides-section h2 {
        font-size: 1.5rem;
    }

    .guide-content {
        padding: 1.25rem;
    }

    .guide-content ol li {
        font-size: 0.9rem;
        padding-left: 1.75rem;
    }

    /* Footer */
    .footer {
        padding: 2rem 1rem;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .footer-links {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .footer-links a {
        font-size: 0.85rem;
    }

    .footer p {
        font-size: 0.8rem;
    }

    /* Modal */
    .modal {
        padding: 0;
    }

    .modal-content {
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        max-height: 100vh;
        min-height: 100vh;
    }

    .modal-header {
        padding: 1.25rem;
    }

    .modal-header h2 {
        font-size: 1.15rem;
    }

    .modal-body {
        padding: 1.25rem;
    }

    .modal-signature-preview {
        max-height: 160px;
        padding: 1rem;
    }

    /* Signature preview scaling for mobile */
    .signature-preview {
        transform: scale(0.85);
        transform-origin: top left;
    }

    .placeholder-signature {
        min-height: 120px;
        padding: 1rem;
    }

    .placeholder-signature p {
        font-size: 0.85rem;
    }

    /* Share modal */
    .share-modal {
        padding: 1.5rem;
    }

    .share-modal h3 {
        font-size: 1.25rem;
    }

    .share-btn {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
}

/* Extra small devices */
@media (max-width: 360px) {
    .header-container {
        padding: 0 0.75rem;
    }

    .logo svg {
        height: 24px;
    }

    .header-buttons {
        gap: 0.25rem;
    }

    .btn-bookmark,
    .btn-share {
        width: 32px;
        height: 32px;
    }

    .hero {
        padding: 5rem 0.75rem 1.5rem;
    }

    .hero-text h1 {
        font-size: 1.4rem;
    }

    .hero-text > p {
        font-size: 0.9rem;
    }

    .stat-number {
        font-size: 1.35rem;
    }

    .stat-label {
        font-size: 0.7rem;
    }

    .generator-section {
        padding: 1rem 0.75rem;
    }

    .generator-form-area {
        padding: 0.75rem;
    }

    .step-header h2 {
        font-size: 1.2rem;
    }

    .templates-grid,
    .templates-showcase-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }

    .templates-showcase,
    .how-it-works,
    .faq-section,
    .guides-section {
        padding: 2rem 0.75rem;
    }

    .templates-showcase h2,
    .how-it-works h2,
    .faq-section h2,
    .guides-section h2 {
        font-size: 1.35rem;
    }

    .modal-actions {
        gap: 0.5rem;
    }

    .btn-primary,
    .btn-secondary {
        padding: 0.875rem;
        font-size: 0.9rem;
    }
}

/* ==========================================================================
   Animations
   ========================================================================== */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Scroll animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Loading state */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    animation: shimmer 1.5s infinite;
}
