/* Quick Templates */
.quick-templates-section {
    background: var(--card);
    border-radius: 1.125rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border);
    box-shadow: 0 1px 3px var(--section-shadow);
}

.quick-templates-desc {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.quick-templates-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.625rem;
}

.quick-template-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.75rem 0.5rem;
    background: var(--input-bg);
    border: 2px solid var(--border);
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 44px;
    font-family: 'Manrope', sans-serif;
}

.quick-template-btn:hover {
    border-color: var(--primary);
    background: var(--modal-option-hover-bg);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--section-shadow);
}

.quick-template-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

.quick-template-btn .template-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.quick-template-btn .template-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text);
    text-align: center;
    line-height: 1.3;
}

/* Header */
.header {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.header h1 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
}

.theme-toggle {
    background: none;
    border: 2px solid var(--border);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text);
    margin-left: auto;
}

.theme-toggle:hover {
    border-color: var(--primary);
    background: var(--card);
    transform: scale(1.08);
    box-shadow: 0 2px 8px var(--section-shadow);
}

.header-btn {
    background: none;
    border: 2px solid var(--border);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text);
}

.header-btn:hover {
    border-color: var(--primary);
    background: var(--card);
    transform: scale(1.08);
    box-shadow: 0 2px 8px var(--section-shadow);
}

/* Hero */
.hero {
    text-align: center;
    padding: 2rem 1rem;
}
.hero h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.5rem;
}
.hero .tagline {
    font-size: 1rem;
    color: var(--text-muted);
}

/* Form Sections */
.section {
    background: var(--card);
    border-radius: 1.125rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border);
    box-shadow: 0 1px 3px var(--section-shadow);
}

.section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

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

.section-title {
    font-size: 0.9375rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text);
}

.form-group {
    margin-bottom: 1rem;
}

label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text);
}

input[type="text"],
input[type="url"],
textarea,
select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--input-border);
    border-radius: 0.625rem;
    font-family: 'Manrope', sans-serif;
    font-size: 0.9375rem;
    background: var(--input-bg);
    color: var(--text);
    transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--input-focus);
}

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

/* Radio & Checkbox Groups */
.radio-group,
.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.5rem;
}

.radio-item,
.checkbox-item {
    position: relative;
}

.radio-item input,
.checkbox-item input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.radio-label,
.checkbox-label {
    display: block;
    padding: 0.75rem 1rem;
    background: var(--input-bg);
    border: 2px solid var(--border);
    border-radius: 0.625rem;
    cursor: pointer;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
}

.radio-item input:checked+.radio-label,
.checkbox-item input:checked+.checkbox-label {
    border-color: var(--radio-selected-border);
    background: var(--radio-selected-bg);
    color: var(--primary);
    box-shadow: 0 0 0 3px var(--input-focus);
}

.radio-label:hover,
.checkbox-label:hover {
    border-color: var(--secondary);
}

/* Tab Navigation */
.tab-nav {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    background: var(--card);
    border-radius: 100px;
    padding: 0.375rem;
    border: 1px solid var(--border);
    box-shadow: 0 1px 3px var(--section-shadow);
}

.tab-btn {
    flex: 1;
    padding: 0.75rem 1.5rem;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    font-size: 0.9375rem;
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    color: var(--text);
}

.tab-btn.active {
    background: var(--btn-primary-gradient);
    color: var(--text-on-primary);
    box-shadow: var(--tab-active-shadow);
}

.tab-content {
    display: none;
}

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



/* Utility classes */
.btn-full-width {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    margin: 1.5rem 0;
}

.share-description {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.share-textarea {
    font-family: monospace;
    font-size: 0.8125rem;
}

.btn-group-center {
    justify-content: center;
}

.icon-margin-right {
    margin-right: 0.5rem;
}



/* Aspect Ratio Icons */
.aspect-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 0.5rem;
}

.aspect-icon {
    display: block;
    border: 2px solid currentColor;
    border-radius: 3px;
    background: var(--aspect-icon-bg);
}

.aspect-icon.square {
    width: 32px;
    height: 32px;
}

.aspect-icon.portrait {
    width: 26px;
    height: 32px;
}

.aspect-icon.landscape {
    width: 38px;
    height: 22px;
}

.aspect-icon.story {
    width: 18px;
    height: 32px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0.625rem;
    font-family: 'Manrope', sans-serif;
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.btn-primary {
    background: var(--btn-primary-gradient);
    color: var(--text-on-primary);
    box-shadow: var(--btn-primary-shadow);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--btn-primary-shadow-hover);
}

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

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

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

.btn-accent {
    background: var(--btn-accent-bg);
    color: var(--text-on-primary);
}

.btn-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Preset Section */
.preset-section {
    background: var(--preset-section-bg);
    border: 1px solid var(--preset-section-border);
    border-radius: 1.125rem;
    padding: 1rem 1.5rem;
    margin: 1rem 0;
}

.preset-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.preset-actions {
    display: flex;
    gap: 0.375rem;
}

.preset-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.625rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid var(--border);
    background: var(--input-bg);
    color: var(--text);
}

.preset-btn:hover {
    background: var(--primary);
    color: var(--text-on-primary);
    border-color: var(--primary);
    transform: translateY(-1px);
}

.preset-btn-reset {
    color: var(--preset-btn-reset-color);
    border-color: var(--preset-btn-reset-border);
}

.preset-btn-reset:hover {
    background: var(--preset-btn-reset-hover-bg);
    color: var(--text-on-primary);
    border-color: var(--preset-btn-reset-hover-bg);
}

.preset-btn svg {
    width: 14px;
    height: 14px;
}

#importFileInput {
    display: none;
}

.preset-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.preset-count {
    font-size: 0.75rem;
    color: var(--text-muted);
    background: var(--input-bg);
    padding: 0.125rem 0.5rem;
    border-radius: 100px;
}

.preset-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.preset-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 0.8125rem;
    cursor: pointer;
    transition: all 0.2s;
}

.preset-chip:hover {
    border-color: var(--primary);
    background: var(--preset-chip-hover-bg);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px var(--section-shadow);
}

.preset-chip .preset-delete {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--text-muted);
    font-size: 0.75rem;
    transition: all 0.2s;
}

.preset-chip .preset-delete:hover {
    background: var(--preset-delete-hover-bg);
    color: var(--preset-delete-hover-color);
}

.preset-empty {
    font-size: 0.8125rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: var(--modal-overlay);
    backdrop-filter: blur(var(--modal-backdrop-blur));
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

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

.modal {
    background: var(--bg);
    border-radius: 1.125rem;
    padding: 1.5rem;
    width: 90%;
    max-width: 400px;
    box-shadow: var(--modal-shadow);
    transform: scale(0.95);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.modal-overlay.show .modal {
    transform: scale(1);
    opacity: 1;
    animation: modalIn 0.3s ease forwards;
}

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

.modal-text {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.modal-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--input-border);
    border-radius: 0.625rem;
    font-family: 'Manrope', sans-serif;
    font-size: 0.9375rem;
    margin-bottom: 1rem;
    background: var(--input-bg);
    color: var(--text);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.modal-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--input-focus);
}

.modal-actions {
    display: flex;
    gap: 0.5rem;
}

.modal-actions .btn {
    flex: 1;
}

/* Modal (Options Selector) */
.modal-container {
    background: var(--bg);
    border-radius: 1.125rem;
    width: 100%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: var(--modal-shadow);
    transform: scale(0.95);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.modal-overlay.show .modal-container {
    transform: scale(1);
    opacity: 1;
    animation: modalIn 0.3s ease forwards;
}

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

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.625rem;
    color: var(--text-muted);
    transition: all 0.2s;
}

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

.modal-options {
    padding: 1rem;
    overflow-y: auto;
    max-height: 60vh;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.modal-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border: 2px solid var(--border);
    border-radius: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--input-bg);
}

.modal-option:hover {
    border-color: var(--primary);
    background: var(--modal-option-hover-bg);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px var(--section-shadow);
}

.modal-option.selected {
    border-color: var(--primary);
    background: var(--modal-option-selected-bg);
    box-shadow: 0 0 0 3px var(--input-focus);
}

.modal-option-preview {
    width: 48px;
    height: 48px;
    border-radius: 0.625rem;
    background: var(--card);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    flex-shrink: 0;
}

.modal-option-preview svg {
    width: 24px;
    height: 24px;
}

.modal-option-text {
    flex: 1;
    min-width: 0;
}

.modal-option-label {
    font-weight: 600;
    color: var(--text);
    font-size: 0.9375rem;
    margin-bottom: 0.25rem;
}

.modal-option-description {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* History Modal */
.history-modal {
    max-width: 600px;
}

.modal-body {
    padding: 1rem;
    overflow-y: auto;
    max-height: 60vh;
}

.history-entry {
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 0.75rem;
    transition: all 0.2s;
}

.history-entry:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px var(--section-shadow);
}

.history-entry-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.history-entry-topic {
    font-weight: 600;
    color: var(--text);
    font-size: 0.9375rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

.history-entry-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

.history-entry-preview {
    font-size: 0.8125rem;
    color: var(--text-muted);
    line-height: 1.5;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-bottom: 0.75rem;
}

.history-entry-actions {
    display: flex;
    gap: 0.5rem;
}

.history-btn-apply {
    font-size: 0.8125rem !important;
    padding: 0.375rem 0.75rem !important;
}

.history-btn-delete {
    font-size: 0.8125rem !important;
    padding: 0.375rem 0.75rem !important;
    background: none;
    border: 1px solid var(--border);
    color: var(--text-muted);
    border-radius: 0.625rem;
    cursor: pointer;
    transition: all 0.2s;
}

.history-btn-delete:hover {
    background: var(--error);
    color: var(--text-on-primary);
    border-color: var(--error);
}

.history-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.history-empty svg {
    opacity: 0.3;
    margin-bottom: 0.75rem;
}

.history-empty p {
    font-size: 0.875rem;
    margin: 0;
}

/* Live Preview */
.live-preview-section {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 1.125rem;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 1px 3px var(--section-shadow);
}

.live-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.live-preview-header h3 {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

.live-preview-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    background: var(--btn-primary-gradient);
    color: var(--text-on-primary);
    border-radius: 100px;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.live-preview-box {
    background: var(--input-bg);
    border: 1px dashed var(--border);
    border-radius: 0.75rem;
    padding: 1rem;
    font-family: 'Manrope', monospace;
    font-size: 0.8125rem;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 300px;
    overflow-y: auto;
    color: var(--text);
    transition: border-color 0.2s ease;
}

.live-preview-box:not(.empty) {
    border-style: solid;
    border-color: var(--primary);
    border-width: 1px;
}

.live-preview-box.empty {
    color: var(--text-muted);
    font-style: italic;
}

/* Output */
.output-section {
    background: linear-gradient(135deg, var(--output-gradient-start) 0%, var(--output-gradient-end) 100%);
    border-radius: 1.125rem;
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.output-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.output-header h3 {
    color: var(--text-on-primary);
    font-size: 1.125rem;
}

/* Variation Tabs */
.variation-tabs {
    display: flex;
    gap: 0.375rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.variation-tab {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: var(--input-bg);
    color: var(--text-muted);
    font-family: 'Manrope', sans-serif;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.variation-tab:hover {
    background: var(--card);
    color: var(--text);
    border-color: var(--secondary);
}

.variation-tab.active {
    background: var(--btn-primary-gradient);
    color: var(--text-on-primary);
    border-color: transparent;
    font-weight: 700;
    box-shadow: 0 2px 8px var(--section-shadow);
}

.output-box {
    background: var(--output-box-bg);
    border-radius: 0.75rem;
    padding: 1rem;
    min-height: 150px;
    font-family: 'Manrope', monospace;
    font-size: 0.875rem;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--text);
}

/* Toast */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--toast-bg);
    color: var(--toast-text);
    padding: 0.75rem 1.5rem;
    border-radius: 2rem;
    font-weight: 500;
    opacity: 0;
    transition: all 0.3s;
    z-index: 1000;
    box-shadow: var(--toast-shadow);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    animation: toastIn 0.4s ease forwards;
}

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

/* Compact spacing for social media inputs */
#identitas-digital .form-group {
    margin-bottom: 0.5rem;
}

#identitas-digital .grid-2 {
    gap: 0.5rem;
}

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

/* Option Selector Button */
.option-selector-btn {
    width: 100%;
    padding: 1rem 1.25rem;
    background: var(--input-bg);
    border: 2px solid var(--border);
    border-radius: 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s;
    font-family: 'Manrope', sans-serif;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text);
}

.option-selector-btn:hover {
    border-color: var(--primary);
    background: var(--option-hover-bg);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px var(--section-shadow);
}

.option-selector-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

.option-selector-btn .current-value {
    color: var(--primary);
    font-weight: 600;
}

.option-selector-btn .chevron {
    color: var(--text-muted);
    transition: transform 0.2s;
}

.option-selector-btn:hover .chevron {
    transform: translateY(2px);
}

/* Stepper */
.stepper {
    background: var(--card);
    border-radius: 1.125rem;
    padding: 1.5rem 1.5rem 1.25rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
    box-shadow: 0 1px 3px var(--section-shadow);
}

.stepper-progress {
    height: 4px;
    background: var(--input-bg);
    border-radius: 100px;
    margin-bottom: 1.25rem;
    overflow: hidden;
}

.stepper-progress-bar {
    height: 100%;
    background: var(--btn-primary-gradient);
    border-radius: 100px;
    transition: width 0.4s ease;
    width: 0%;
}

.stepper-steps {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
}

.stepper-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    flex: 1;
    position: relative;
    z-index: 1;
}

.stepper-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--input-bg);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.stepper-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    text-align: center;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.stepper-step.active .stepper-circle {
    background: var(--btn-primary-gradient);
    border-color: var(--primary);
    color: var(--text-on-primary);
    box-shadow: 0 0 0 4px var(--input-focus);
    transform: scale(1.1);
}

.stepper-step.active .stepper-label {
    color: var(--primary);
    font-weight: 700;
}

.stepper-step.completed .stepper-circle {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--text-on-primary);
}

.stepper-step.completed .stepper-label {
    color: var(--text);
    font-weight: 600;
}

.stepper-step:not(.active):not(.completed) .stepper-circle:hover {
    border-color: var(--secondary);
    background: var(--card);
}

/* Step Content */
.step-content {
    display: none;
    animation: stepFadeIn 0.3s ease;
}

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

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

/* Step Navigation */
.step-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    gap: 1rem;
}

.btn-next,
.btn-prev {
    min-width: 140px;
}

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

.btn-prev:hover {
    background: var(--card);
    border-color: var(--secondary);
}

/* Touch Targets (44px minimum for accessibility) */
.btn {
    min-height: 44px;
}

.tab-btn {
    min-height: 44px;
}

.theme-toggle {
    min-width: 44px;
    min-height: 44px;
}

.header-btn {
    min-width: 44px;
    min-height: 44px;
}

.radio-label,
.checkbox-label {
    min-height: 44px;
}

input[type="text"],
input[type="url"],
textarea,
select {
    min-height: 44px;
}

.modal-input {
    min-height: 44px;
}

.modal-close {
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preset-btn {
    min-height: 44px;
}

.option-selector-btn {
    min-height: 44px;
}

/* Prevent horizontal overflow */
.hero .tagline {
    max-width: 100%;
    overflow: hidden;
}

/* Responsive: Tablet (768px) */
@media (max-width: 768px) {
    /* Stepper: hide labels on tablet, show only circles */
    .stepper-label {
        display: none;
    }

    .stepper-circle {
        width: 32px;
        height: 32px;
        font-size: 0.8125rem;
    }

    .stepper-progress {
        height: 3px;
        margin-bottom: 1rem;
    }

    .stepper {
        padding: 1.25rem 1rem 1rem;
    }

    /* Modal: responsive on tablet */
    .modal-container {
        width: 95%;
        max-height: 90vh;
    }

    .modal {
        width: 95%;
        max-height: 90vh;
        overflow-y: auto;
    }

    .modal-options {
        max-height: 60vh;
    }

    /* Tab nav: slightly smaller on tablet */
    .tab-btn {
        font-size: 0.875rem;
        padding: 0.625rem 1rem;
    }

    
}

/* Responsive: Small mobile (640px) */
@media (max-width: 640px) {
    .modal-options {
        grid-template-columns: 1fr;
    }

    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }

    .radio-group,
    .checkbox-group {
        grid-template-columns: 1fr 1fr;
    }

    .stepper {
        padding: 1rem 0.75rem 0.75rem;
    }

    .stepper-circle {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }

    .stepper-progress {
        height: 3px;
    }

    .step-navigation {
        flex-direction: column-reverse;
        gap: 0.5rem;
    }

    .btn-next,
    .btn-prev {
        width: 100%;
        min-width: unset;
    }

    /* Section spacing tighter */
    .section {
        padding: 1.25rem 1rem;
    }

    /* Modal options scrollable */
    .modal-options {
        max-height: 55vh;
    }

    /* History modal responsive */
    .history-modal {
        width: 95%;
    }

    .history-entry {
        padding: 0.75rem;
    }

    /* Output section */
    .output-header {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    /* Live Preview */
    .live-preview-section {
        padding: 1rem;
    }

    .live-preview-box {
        max-height: 250px;
    }

    .variation-tabs {
        gap: 0.25rem;
    }

    .variation-tab {
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
    }

    /* Preset section */
    .preset-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .preset-actions {
        width: 100%;
        justify-content: flex-start;
    }

    /* Quick Templates: 2 columns on tablet */
    .quick-templates-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Responsive: Very small mobile (480px) */
@media (max-width: 480px) {
    /* Stepper: compact circles */
    .stepper {
        padding: 0.75rem 0.5rem 0.5rem;
    }

    .stepper-circle {
        width: 28px;
        height: 28px;
        font-size: 0.6875rem;
    }

    .stepper-progress {
        height: 2px;
        margin-bottom: 0.75rem;
    }

    .stepper-steps {
        gap: 0;
    }

    /* Tab nav: full-width stacked */
    .tab-nav {
        flex-direction: column;
        border-radius: 0.75rem;
        gap: 0.25rem;
        padding: 0.25rem;
    }

    .tab-btn {
        width: 100%;
        text-align: center;
        border-radius: 0.5rem;
    }

    /* Radio/checkbox: single column on very small screens */
    .radio-group,
    .checkbox-group {
        grid-template-columns: 1fr;
    }

    /* Form spacing */
    .form-group {
        margin-bottom: 0.75rem;
    }

    /* Textarea min-height on mobile */
    textarea {
        min-height: 100px;
    }

    /* Hero scales down further */
    .hero {
        padding: 1.5rem 0;
    }

    /* Section spacing tighter */
    .section {
        padding: 1rem 0.75rem;
        margin-bottom: 0.75rem;
    }

    .section-title {
        font-size: 0.8125rem;
    }

    /* Modal full width on small screens */
    .modal-container {
        width: 98%;
        max-height: 92vh;
        border-radius: 0.75rem;
    }

    .modal {
        width: 98%;
        max-height: 92vh;
        padding: 1rem;
        border-radius: 0.75rem;
    }

    .modal-header {
        padding: 1rem;
    }

    .modal-options {
        padding: 0.75rem;
        max-height: 50vh;
    }

    .modal-option {
        padding: 0.625rem;
    }

    /* Buttons full width */
    .btn-group {
        flex-direction: column;
    }

    .btn-group .btn {
        width: 100%;
    }

    /* Preset section */
    .preset-section {
        padding: 0.75rem;
    }

    .preset-list {
        gap: 0.375rem;
    }

    /* Quick Templates: 2 columns on small mobile */
    .quick-templates-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .quick-template-btn {
        padding: 0.5rem 0.375rem;
    }

    .quick-template-btn .template-icon {
        font-size: 1.25rem;
    }

    .quick-template-btn .template-label {
        font-size: 0.6875rem;
    }

    /* Output section */
    .output-section {
        padding: 1rem;
    }

    /* Live Preview */
    .live-preview-section {
        padding: 0.875rem;
    }

    .live-preview-box {
        max-height: 200px;
        font-size: 0.75rem;
    }

    /* Aspect labels */
    .aspect-label {
        padding: 0.75rem 0.25rem;
    }
}