/* ═══════════════════════════════════════════════ */
/*  TZ Generator — Wizard Styles                   */
/* ═══════════════════════════════════════════════ */

.tzgen-section {
    padding: var(--space-20) 0;
    padding-top: calc(var(--header-height) + var(--space-12));
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    z-index: 0;
    /* Creates stacking context so z-index: -1 children stay inside */
}

/* 🌊 Background Waves Animation */
.tz-background-waves {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    opacity: 0.6;
    /* Reduced opacity for full-screen readability */
    overflow: hidden;
}

.waves {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-height: 100%;
}



.waves {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Animation */
.parallax>use {
    animation: move-forever 25s cubic-bezier(.55, .5, .45, .5) infinite;
}

.parallax>use:nth-child(1) {
    animation-delay: -2s;
    animation-duration: 7s;
}

.parallax>use:nth-child(2) {
    animation-delay: -3s;
    animation-duration: 10s;
}

.parallax>use:nth-child(3) {
    animation-delay: -4s;
    animation-duration: 13s;
}

.parallax>use:nth-child(4) {
    animation-delay: -5s;
    animation-duration: 20s;
}

@keyframes move-forever {
    0% {
        transform: translate3d(-90px, 0, 0);
    }

    100% {
        transform: translate3d(85px, 0, 0);
    }
}

/* Shrinking for mobile */
@media (max-width: 768px) {
    .waves {
        height: 40px;
        min-height: 40px;
    }
}


.tzgen-card {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

/* ─── Progress Stepper ─── */
.tz-stepper {
    display: flex;
    justify-content: center;
    gap: var(--space-2);
    margin-bottom: var(--space-10);
}

.tz-step-indicator {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-text-secondary);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    transition: all var(--transition-normal);
    cursor: default;
}

.tz-step-indicator .num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--color-border);
    color: var(--color-text-secondary);
    font-size: 12px;
    font-weight: 700;
    transition: all var(--transition-normal);
}

.tz-step-indicator.active {
    background: rgba(168, 85, 247, 0.15);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.tz-step-indicator.active .num {
    background: var(--color-primary);
    color: #fff;
}

.tz-step-indicator.done {
    background: rgba(16, 185, 129, 0.1);
    border-color: #10b981;
    color: #10b981;
}

.tz-step-indicator.done .num {
    background: #10b981;
    color: #fff;
}

@media (max-width: 640px) {
    .tz-step-indicator span:not(.num) {
        display: none;
    }
}

/* ─── Form Steps ─── */
.tz-form-step {
    display: none;
    animation: tzFadeIn 0.3s ease;
}

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

@keyframes tzFadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tz-step-title {
    font-size: var(--text-2xl);
    font-weight: 700;
    margin-bottom: var(--space-6);
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.tz-step-title .emoji {
    font-size: 1.8em;
}

/* ─── Form Fields ─── */
.tz-field {
    margin-bottom: var(--space-6);
}

.tz-field label {
    display: block;
    font-weight: 600;
    font-size: var(--text-sm);
    margin-bottom: var(--space-2);
    color: var(--color-text);
}

.tz-field .hint {
    font-size: var(--text-xs);
    color: var(--color-text-secondary);
    margin-top: var(--space-1);
}

.tz-field input[type="text"],
.tz-field input[type="number"],
.tz-field input[type="password"],
.tz-field textarea,
.tz-field select {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    color: var(--color-text);
    font-size: var(--text-base);
    font-family: inherit;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.tz-field input:focus,
.tz-field textarea:focus,
.tz-field select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.15);
}

.tz-field textarea {
    min-height: 80px;
    resize: vertical;
}

.tz-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}

@media (max-width: 640px) {
    .tz-row {
        grid-template-columns: 1fr;
    }
}

/* ─── Image Upload Zone ─── */
.tz-upload-zone {
    border: 2px dashed var(--color-border);
    border-radius: var(--radius-xl);
    padding: var(--space-8) var(--space-4);
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.tz-upload-zone:hover,
.tz-upload-zone.dragover {
    border-color: var(--color-primary);
    background: rgba(168, 85, 247, 0.05);
}

.tz-upload-zone .upload-icon {
    font-size: 2.5em;
    margin-bottom: var(--space-2);
}

.tz-upload-zone .upload-text {
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
}

.tz-upload-zone .upload-hint {
    color: var(--color-text-secondary);
    font-size: var(--text-xs);
    opacity: 0.6;
    margin-top: var(--space-1);
}

.tz-upload-zone img.preview-img {
    max-height: 120px;
    border-radius: var(--radius-lg);
    margin-top: var(--space-2);
}

/* ─── Theme Picker ─── */
.tz-theme-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-3);
    margin-bottom: var(--space-6);
}

@media (max-width: 640px) {
    .tz-theme-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.tz-theme-option {
    padding: var(--space-4);
    border-radius: var(--radius-xl);
    border: 2px solid var(--color-border);
    cursor: pointer;
    text-align: center;
    transition: all var(--transition-normal);
    background: var(--color-surface);
}

.tz-theme-option:hover {
    border-color: var(--color-primary);
    transform: translateY(-2px);
}

.tz-theme-option.selected {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.2);
}

.tz-theme-option .theme-preview {
    display: flex;
    gap: 4px;
    justify-content: center;
    margin-bottom: var(--space-2);
}

.tz-theme-option .color-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tz-theme-option .theme-label {
    font-size: var(--text-sm);
    font-weight: 600;
}

.tz-theme-option .theme-codes {
    font-size: var(--text-xs);
    color: var(--color-text-secondary);
    margin-top: 2px;
}

/* ─── Style Picker ─── */
.tz-style-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-3);
}

@media (max-width: 640px) {
    .tz-style-grid {
        grid-template-columns: 1fr;
    }
}

.tz-style-option {
    padding: var(--space-4);
    border-radius: var(--radius-xl);
    border: 2px solid var(--color-border);
    cursor: pointer;
    text-align: center;
    transition: all var(--transition-normal);
    background: var(--color-surface);
}

.tz-style-option:hover {
    border-color: var(--color-primary);
}

.tz-style-option.selected {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.2);
}

.tz-style-option .style-icon {
    font-size: 1.5em;
    margin-bottom: var(--space-1);
}

.tz-style-option .style-label {
    font-weight: 600;
    font-size: var(--text-sm);
}

/* ─── Payment Checkboxes ─── */
.tz-payment-options {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.tz-payment-card {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-5);
    border-radius: var(--radius-xl);
    border: 2px solid var(--color-border);
    cursor: pointer;
    transition: all var(--transition-normal);
    background: var(--color-surface);
}

.tz-payment-card:hover {
    border-color: var(--color-primary);
}

.tz-payment-card.selected {
    border-color: var(--color-primary);
    background: rgba(168, 85, 247, 0.05);
}

.tz-payment-card input[type="checkbox"] {
    display: none;
}

.tz-payment-card .pay-check {
    width: 24px;
    height: 24px;
    border-radius: var(--radius-md);
    border: 2px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all var(--transition-fast);
}

.tz-payment-card.selected .pay-check {
    background: var(--color-primary);
    border-color: var(--color-primary);
}

.tz-payment-card.selected .pay-check::after {
    content: '✓';
    color: #fff;
    font-size: 14px;
    font-weight: 700;
}

.tz-payment-card .pay-info h4 {
    font-weight: 600;
    margin-bottom: 2px;
}

.tz-payment-card .pay-info p {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

.tz-payment-notice {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    margin-top: var(--space-4);
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

/* ─── Navigation Buttons ─── */
.tz-nav {
    display: flex;
    justify-content: space-between;
    margin-top: var(--space-8);
    gap: var(--space-4);
}

.tz-nav .btn {
    min-width: 140px;
}

/* ─── Result Area ─── */
.tz-result-area {
    position: relative;
}

.tz-result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}

.tz-result-header h3 {
    font-size: var(--text-xl);
    font-weight: 700;
}

.tz-result-actions {
    display: flex;
    gap: var(--space-2);
}

.tz-result-output {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    max-height: 500px;
    overflow-y: auto;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 13px;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--color-text-secondary);
}

.tz-result-output::-webkit-scrollbar {
    width: 6px;
}

.tz-result-output::-webkit-scrollbar-track {
    background: transparent;
}

.tz-result-output::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 3px;
}

.tz-result-hint {
    margin-top: var(--space-4);
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    background: rgba(168, 85, 247, 0.08);
    border: 1px solid rgba(168, 85, 247, 0.2);
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    text-align: center;
}

.tz-result-hint a {
    color: var(--color-primary);
    font-weight: 600;
}

/* ─── Copy Feedback ─── */
.btn.copied {
    background: #10b981 !important;
    border-color: #10b981 !important;
}