:root {
    --dark-grey: #333333;
    --darker-grey: #222222;
    --light-grey-accent: #444444;
    --white: #ffffff;
    --black: #000000;
    --bonus-card-gradient: linear-gradient(135deg, #334155 0%, #0f172a 100%);
    --btn-primary-color: #d90429;
    --btn-primary-hover: #b00322;
    --btn-font-color: #ffffff;
}

body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f8f9fa;
}

/* Section 1: Top Bar */
.top-bar {
    background-color: #d90429; /* Red background */
    color: var(--white);
    font-size: 0.9rem;
    padding-top: 12px !important;
    padding-bottom: 12px !important;
}

/* Section 2: Steps Bar */
.steps-container {
    width: 100%;
    background-color: var(--dark-grey);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.step-bar {
    width: 100%;
    background-color: var(--dark-grey);
    display: flex;
}

.step-item {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 25px 40px;
    color: var(--white);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease, filter 0.3s ease;
    background: linear-gradient(90deg, var(--dark-grey) 75%, var(--light-grey-accent) 100%);
    z-index: 1;
    clip-path: polygon(0% 0%, calc(100% - 25px) 0%, 100% 50%, calc(100% - 25px) 100%, 0% 100%, 25px 50%);
    margin-left: -25px;
}

.step-item:first-child {
    margin-left: 0;
    clip-path: polygon(0% 0%, calc(100% - 25px) 0%, 100% 50%, calc(100% - 25px) 100%, 0% 100%);
}

.step-item:last-child {
    clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%, 25px 50%);
    background: var(--dark-grey);
}

.step-item:hover, .step-item.active {
    background: var(--light-grey-accent);
    filter: brightness(1.2);
    z-index: 2;
}

/* Inline Editing Feedback */
[contenteditable="true"] {
    outline: none;
    transition: background 0.2s;
    border-radius: 4px;
}
[contenteditable="true"]:hover {
    background: rgba(0, 0, 0, 0.05);
    cursor: text;
}
[contenteditable="true"]:focus {
    background: rgba(0, 0, 0, 0.08);
    box-shadow: 0 0 0 2px rgba(217, 4, 41, 0.2);
}

/* Loading Overlay Styles */
.loading-overlay, .processing-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.85);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
}

.processing-card {
    background: white;
    padding: 40px;
    border-radius: 30px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
    max-width: 380px;
    width: 90%;
}

.processing-loader {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #d90429;
    color: white;
    border-radius: 50%;
    font-size: 32px;
}

.pulse-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 4px solid #d90429;
    border-radius: 50%;
    animation: pulseLoader 1.5s ease-out infinite;
}

@keyframes pulseLoader {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.6); opacity: 0; }
}

/* Custom Confirmation Overlay */
.custom-confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.confirm-box {
    width: 90%;
    max-width: 400px;
}

@media (max-width: 768px) {
    .step-bar {
        flex-direction: column;
    }
    .step-item {
        padding: 20px;
        margin-left: 0;
        clip-path: none !important;
        border-bottom: 1px solid #444;
        background: var(--dark-grey);
    }
}

/* Section 3: Wood Background */
.wood-section {
    background-image: url('light_wood_background.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
    position: relative;
    z-index: 0;
}

.bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: white;
    opacity: 0;
    z-index: -1;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.wood-section .container {
    position: relative;
    z-index: 1;
}

.main-headline {
    color: #d90429;
    font-size: 2.5rem;
}

.sub-headline {
    font-size: 1.25rem;
}

#review-view > .main-headline,
#review-view > .sub-headline,
#review-view > .stars,
#review-view > h1.display-4,
#review-view > h4.text-muted {
    max-width: 87%;
    margin-left: auto;
    margin-right: auto;
}

.content-box {
    background-color: var(--white);
    border-radius: 20px;
    width: 80%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    color: #333;
    line-height: 1.8;
    text-align: center;
}

.content-box-dashed {
    --bonus-border-color: #d90429;
    --bonus-border-style: dashed;
    --bonus-border-width: 5px;
    border: var(--bonus-border-width) var(--bonus-border-style) var(--bonus-border-color) !important;
}

@media (max-width: 992px) {
    .content-box {
        width: 95%;
    }
}

@media (max-width: 768px) {
    .content-box {
        width: 100%;
        border-radius: 10px;
    }
    
    .wood-section .container {
        padding-left: 10px;
        padding-right: 10px;
    }
}

.lorem-text {
    letter-spacing: 0.5px;
}

.btn-custom-red {
    background-color: var(--btn-primary-color) !important;
    border-color: var(--btn-primary-color) !important;
    color: var(--btn-font-color) !important;
    font-size: 1.1rem;
    transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
    display: inline-block;
}

.btn-custom-red:hover {
    background-color: var(--btn-primary-hover) !important;
    border-color: var(--btn-primary-hover) !important;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Deletion Buttons */
.delete-img-btn, .delete-card-btn {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #d90429;
    color: white;
    border: 2px solid white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    transition: transform 0.2s, background 0.2s;
}

.delete-img-btn:hover, .delete-card-btn:hover {
    background: black;
    transform: scale(1.1);
}

.editable-image-wrapper {
    display: inline-block;
}

.branding-container {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.branding-img {
    border-radius: 0 !important;
    width: auto !important;
    height: auto !important;
    max-width: 100%;
    box-shadow: none !important;
}

/* Bonus Cards Styling */
.bonus-card {
    border-radius: 15px;
    overflow: hidden;
    text-align: center;
    transition: transform 0.3s ease;
    border: 2px solid #e0e0e0;
}

.bonus-card-row:hover .delete-card-btn {
    opacity: 1;
}

.delete-card-btn {
    top: 5px;
    right: 5px;
    opacity: 0.6;
}

.bonus-card-header {
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.bonus-tag {
    text-transform: uppercase;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 2px;
    margin-bottom: 5px;
    opacity: 0.9;
}

.bonus-title {
    font-size: 1.5rem;
    margin-bottom: 0;
}

.bonus-value {
    font-size: 1.1rem;
    font-weight: 400;
    opacity: 0.95;
    margin-top: 5px;
}

.bonus-card-body {
    font-size: 1rem;
    color: #555;
    border-bottom-left-radius: 15px;
    border-bottom-right-radius: 15px;
}

.gradient-1 {
    background: var(--bonus-card-gradient) !important;
}

.stars {
    color: #ffc107;
    font-size: 2rem;
    line-height: 1;
}

@media (max-width: 576px) {
    .btn-custom-red {
        font-size: 0.9rem;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

.editable-image {
    cursor: pointer;
    transition: filter 0.3s ease, transform 0.3s ease;
}

.editable-image:hover {
    filter: brightness(0.9) contrast(1.1);
}

.bonus-img-large {
    width: 100%;
    max-width: 600px;
    height: 350px;
    object-fit: contain;
    background-color: #f0f0f0;
}

.editable-image.image-set {
    background-color: transparent !important;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1) !important;
    border: none !important;
    width: auto !important;
    height: auto !important;
    max-width: 100%;
    border-radius: 20px;
}

/* Modal Tabs Custom Styling */
#imageModalTabs .nav-link {
    border: none;
    font-weight: 600;
    color: #888;
    padding: 10px 20px;
    font-size: 0.9rem;
    border-bottom: 3px solid transparent;
    border-radius: 0;
}

#imageModalTabs .nav-link.active {
    color: #d90429;
    border-bottom-color: #d90429;
    background: transparent;
}

/* Quick Creator Gradients */
.gradient-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
    gap: 8px;
    max-height: 150px;
    overflow-y: auto;
    padding: 5px;
    border: 1px solid #eee;
    border-radius: 8px;
}

.gradient-option {
    aspect-ratio: 1;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.2s, border-color 0.2s;
}

.gradient-option:hover {
    transform: scale(1.1);
}

.gradient-option.active {
    border-color: #000;
    box-shadow: 0 0 0 2px rgba(217, 4, 41, 0.3);
}

@media (max-width: 768px) {
    .bonus-img-large {
        height: auto;
        max-height: 250px;
    }
}

/* Settings FAB */
.settings-fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: var(--black);
    color: var(--white);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 1050;
    transition: right 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), transform 0.3s ease, background-color 0.3s ease;
}

body.has-bonus-gen .settings-fab {
    right: 105px;
}

.bonus-gen-fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #198754; /* Success Green */
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 1051;
    animation: fabAppear 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.bonus-gen-fab:hover {
    background-color: #157347;
    transform: scale(1.1);
}

@keyframes fabAppear {
    0% { opacity: 0; transform: rotate(0deg) scale(0.2); }
    100% { opacity: 1; transform: rotate(360deg) scale(1); }
}

.bonus-gen-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
    transition: transform 0.2s ease;
}

.bonus-gen-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.08);
}

.bonus-gen-card img {
    width: 100%;
    height: auto;
    object-fit: contain;
    max-height: 200px;
    background-color: #f0f0f0;
    border: 1px solid #eee;
}

.tracking-wider {
    letter-spacing: 0.05em;
}

.bonus-pdf-settings label {
    cursor: pointer;
}

.settings-fab:hover {
    transform: rotate(45deg) scale(1.1);
    background-color: var(--darker-grey);
    color: var(--white);
}

/* Initial Guide Animation */
.initial-guide {
    position: fixed;
    bottom: 110px;
    right: 110px;
    width: auto;
    z-index: 2200;
    pointer-events: none;
    display: flex;
    justify-content: center;
    animation: guide-bounce 2s infinite ease-in-out;
    transition: opacity 0.5s ease;
}

body.has-bonus-gen .initial-guide {
    right: 185px;
}

.guide-content {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

.guide-text {
    background: #d90429;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(217, 4, 41, 0.4);
    white-space: nowrap;
}

.guide-arrow {
    color: #d90429;
    font-size: 2.2rem;
    line-height: 1;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
    margin-right: -15px;
    margin-top: -5px;
}

.guide-fade-out {
    opacity: 0;
}

@keyframes guide-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

/* Project Menu Styling */
.project-dropdown-container {
    position: fixed;
    top: 140px;
    right: 20px;
    z-index: 2100;
    transition: opacity 0.3s ease, visibility 0.3s ease, top 0.3s ease;
}

body.steps-hidden .project-dropdown-container {
    top: 70px;
}

@media (max-width: 767.98px) {
    .project-dropdown-container {
        top: 70px !important;
    }
}

.dropdown-item i {
    width: 20px;
}

.dropdown-item:active {
    background-color: #d90429;
}

#projectMenuBtn {
    box-shadow: 0 0 15px rgba(0, 123, 255, 0.6), 0 0 5px rgba(0, 123, 255, 0.4);
    transition: all 0.3s ease;
}

#projectMenuBtn:hover {
    box-shadow: 0 0 25px rgba(0, 123, 255, 0.9), 0 0 10px rgba(0, 123, 255, 0.6);
}

/* Settings Sidebar */
.settings-sidebar {
    width: 400px !important;
    background-color: #fcfcfc;
    z-index: 1100 !important; /* Higher than FAB and backdrop */
    transition: transform 0.3s ease-in-out, opacity 0.5s ease-in-out !important;
}

.fade-out-sidebar {
    opacity: 0 !important;
    pointer-events: none;
}

.settings-sidebar .offcanvas-body {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto; /* Allow scrolling by default */
}

.settings-sidebar .tab-content {
    flex-grow: 1;
    /* Content area scrolls independently when tabs are used */
    overflow-y: auto;
    padding: 20px;
}

/* Ensure settings body doesn't double scroll when tab content is present */
.settings-sidebar .offcanvas-body:has(.tab-content) {
    overflow-y: hidden;
}

.settings-tabs {
    flex-shrink: 0;
    background-color: #fcfcfc;
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 1px solid #dee2e6;
}

.settings-tabs .nav-link {
    border: none;
    border-bottom: 2px solid transparent;
    color: #666;
    font-weight: 600;
    padding: 15px 10px;
    font-size: 0.85rem;
    border-radius: 0;
}

.settings-tabs .nav-link.active {
    color: #d90429;
    border-bottom: 2px solid #d90429;
    background: transparent;
}

.settings-tabs .nav-link:hover:not(.active) {
    background-color: rgba(0,0,0,0.05);
}

.x-small {
    font-size: 0.75rem;
}

/* Background Gallery Grid */
.bg-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 10px;
}

.bg-gallery-item {
    aspect-ratio: 16/10;
    background-size: cover;
    background-position: center;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.2s, border-color 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.bg-gallery-item:hover {
    transform: scale(1.05);
    border-color: #ddd;
}

.bg-gallery-item.active {
    border-color: #d90429;
    box-shadow: 0 0 0 2px rgba(217, 4, 41, 0.2);
}

/* Bonus Theme Grid */
.bonus-theme-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.bonus-theme-item {
    aspect-ratio: 16/9;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
}

.bonus-theme-item:hover {
    transform: scale(1.05);
}

.bonus-theme-item.active {
    border-color: #000;
    box-shadow: 0 0 0 2px rgba(0,0,0,0.1);
}

/* Floating Text Toolbar & Actions */
.text-toolbar {
    position: absolute;
    z-index: 2000;
    background: white;
    padding: 10px 16px;
    border-radius: 20px;
    box-shadow: 0 10px 35px rgba(0,0,0,0.2);
    border: 1px solid #efefef;
    transition: opacity 0.3s ease;
    min-width: 220px;
}

.toolbar-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.format-options {
    display: flex;
    align-items: center;
    gap: 8px;
}

.color-options {
    display: flex;
    gap: 6px;
    align-items: center;
}

.picker-divider {
    width: 1px;
    height: 24px;
    background-color: #eee;
}

.action-options {
    display: flex;
    gap: 5px;
}

.action-btn {
    background: transparent;
    border: none;
    color: #555;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 14px;
}

.action-btn:hover {
    background-color: #f0f0f0;
    color: #000;
}

.action-btn.delete:hover {
    background-color: #ffeef0;
    color: #d90429;
}

.color-circle {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s;
}

.color-circle:hover {
    transform: scale(1.2);
}

.color-custom-wrapper {
    position: relative;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.color-custom-wrapper input[type="color"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.color-custom-wrapper i {
    font-size: 14px;
    color: #666;
}

.custom-range-sm {
    height: 1.5rem;
}

.custom-range-sm::-webkit-slider-thumb {
    background: #d90429;
}

.custom-range-sm::-moz-range-thumb {
    background: #d90429;
}

/* Settings Bonus List Management */
.settings-bonus-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.settings-bonus-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: grab;
    transition: box-shadow 0.2s, transform 0.2s, background 0.2s;
}

.settings-bonus-item:hover {
    background-color: #fdfdfd;
    border-color: #d1d1d1;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.settings-bonus-item:active {
    cursor: grabbing;
}

.settings-bonus-item.dragging {
    opacity: 0.4;
    border: 1px dashed #d90429;
    transform: scale(0.98);
}

.settings-bonus-item .drag-handle {
    color: #bbb;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
}

.settings-bonus-item .bonus-name {
    flex-grow: 1;
    font-size: 0.8rem;
    font-weight: 500;
    color: #444;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.settings-bonus-item .delete-btn {
    color: #888;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
    line-height: 1;
}

.settings-bonus-item .delete-btn:hover {
    background-color: #fff0f1;
    color: #d90429;
}

/* Sub Tabs (for AI Content and Quick Creator) */
.sub-tabs .nav-link, .qc-nested-tabs .nav-link {
    background-color: #f0f0f0;
    color: #666;
    border-radius: 6px;
    margin: 0 2px;
}

.sub-tabs .nav-link.active, .qc-nested-tabs .nav-link.active {
    background-color: #d90429 !important;
    color: #fff !important;
}

/* Built-in Templates Styles */
.builtin-templates-scroll {
    max-height: 250px;
    overflow-y: auto;
    padding: 5px;
    border: 1px solid #eee;
    border-radius: 10px;
}

.builtin-card {
    height: 80px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    text-align: center;
    border: 2px solid transparent;
}

.builtin-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    border-color: rgba(255,255,255,0.3);
}

.builtin-card span {
    color: white;
    font-size: 0.8rem;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    line-height: 1.2;
    text-transform: uppercase;
}

/* Theme Engine */
.theme-midnight .top-bar { background-color: #1a237e; }
.theme-midnight .steps-container { --dark-grey: #0d47a1; --light-grey-accent: #1565c0; }

.theme-emerald .top-bar { background-color: #1b5e20; }
.theme-emerald .steps-container { --dark-grey: #2e7d32; --light-grey-accent: #388e3c; }

.theme-royal .top-bar { background-color: #4a148c; }
.theme-royal .steps-container { --dark-grey: #6a1b9a; --light-grey-accent: #7b1fa2; }

.theme-sunset .top-bar { background-color: #e65100; }
.theme-sunset .steps-container { --dark-grey: #ef6c00; --light-grey-accent: #f57c00; }

.theme-stealth .top-bar { background-color: #000000; }
.theme-stealth .steps-container { --dark-grey: #1a1a1a; --light-grey-accent: #2a2a2a; }

.theme-ocean .top-bar { background-color: #006064; }
.theme-ocean .steps-container { --dark-grey: #00838f; --light-grey-accent: #0097a7; }

.theme-luxury .top-bar { background-color: #000000; color: #d4af37; border-bottom: 1px solid #d4af37; }
.theme-luxury .steps-container { --dark-grey: #1a1a1a; --light-grey-accent: #d4af37; color: #fff; }

.theme-clean .top-bar { background-color: #f8f9fa; color: #333; border-bottom: 1px solid #ddd; }
.theme-clean .steps-container { --dark-grey: #e9ecef; --light-grey-accent: #dee2e6; color: #333; }

.theme-vibrant .top-bar { background-color: #c2185b; }
.theme-vibrant .steps-container { --dark-grey: #ad1457; --light-grey-accent: #d81b60; }

.theme-forest .top-bar { background-color: #004d40; }
.theme-forest .steps-container { --dark-grey: #00695c; --light-grey-accent: #00796b; }

.theme-berry .top-bar { background-color: #880e4f; }
.theme-berry .steps-container { --dark-grey: #ad1457; --light-grey-accent: #c2185b; }

.theme-sky .top-bar { background-color: #01579b; }
.theme-sky .steps-container { --dark-grey: #0277bd; --light-grey-accent: #0288d1; }

.theme-coffee .top-bar { background-color: #3e2723; }
.theme-coffee .steps-container { --dark-grey: #4e342e; --light-grey-accent: #5d4037; }

.theme-slate .top-bar { background-color: #263238; }
.theme-slate .steps-container { --dark-grey: #37474f; --light-grey-accent: #455a64; }

.theme-neon .top-bar { background-color: #000; color: #39ff14; text-shadow: 0 0 5px #39ff14; }
.theme-neon .steps-container { --dark-grey: #111; --light-grey-accent: #222; color: #39ff14; border: 1px solid #39ff14; }

.theme-lavender .top-bar { background-color: #4a148c; }
.theme-lavender .steps-container { --dark-grey: #5e35b1; --light-grey-accent: #673ab7; }

.theme-corporate .top-bar { background-color: #0d47a1; }
.theme-corporate .steps-container { --dark-grey: #1565c0; --light-grey-accent: #1976d2; }

.theme-fire .top-bar { background-color: #b71c1c; }
.theme-fire .steps-container { --dark-grey: #c62828; --light-grey-accent: #d32f2f; }

.theme-mint .top-bar { background-color: #004d40; }
.theme-mint .steps-container { --dark-grey: #00695c; --light-grey-accent: #4db6ac; }

.theme-yellow-black .top-bar { background-color: #ffcc00; color: #000; }
.theme-yellow-black .steps-container { --dark-grey: #000000; --light-grey-accent: #1a1a1a; }

.theme-yellow-blue .top-bar { background-color: #ffcc00; color: #000; }
.theme-yellow-blue .steps-container { --dark-grey: #1a237e; --light-grey-accent: #0d47a1; }

.theme-yellow-red .top-bar { background-color: #ffcc00; color: #000; }
.theme-yellow-red .steps-container { --dark-grey: #b71c1c; --light-grey-accent: #d90429; }

.theme-yellow-green .top-bar { background-color: #ffcc00; color: #000; }
.theme-yellow-green .steps-container { --dark-grey: #1b5e20; --light-grey-accent: #2e7d32; }

@media (max-width: 767.98px) {
    .steps-container {
        display: none !important;
    }
}

/* Step 2 Alert */
.step2-info-alert {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2000;
}

/* Exit Popup Styles */
.exit-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(2px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center; /* Centered vertically */
    padding: 20px;
}

.exit-popup-content {
    background: white;
    width: 90%;
    max-width: 550px;
    padding: 40px 30px;
    border-radius: 20px;
    position: relative;
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
    text-align: center;
    animation: slideDownFade 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

@property --percentage {
  syntax: '<percentage>';
  inherits: false;
  initial-value: 0%;
}

.scarcity-circle {
    position: absolute;
    left: -35px; /* Half outside */
    top: 50%;
    transform: translateY(-50%);
    width: 70px;
    height: 70px;
    background: conic-gradient(#d90429 var(--percentage), #000 0);
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #fff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 10;
    animation: clockProgress 60s linear infinite;
}

@keyframes clockProgress {
  to { --percentage: 100%; }
}

.exit-popup-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
}

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

.blink-orange {
    color: #fd7e14;
    animation: blinker-orange 1s linear infinite;
}

@keyframes blinker-orange {
    50% { opacity: 0.2; }
}

.word-count-warning {
    background-color: #fffaf0;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #ffeeba;
}

/* HTML Editor Overlay */
.html-editor-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.html-editor-card {
    background: white;
    width: 100%;
    max-width: 800px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0,0,0,0.4);
    display: flex;
    flex-direction: column;
}

.html-editor-header {
    padding: 15px 25px;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.html-editor-body {
    padding: 20px;
}

.html-editor-footer {
    padding: 15px 25px;
    background: #f8f9fa;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.html-editor-body textarea {
    resize: vertical;
    min-height: 120px;
    background: #1e1e1e;
    color: #d4d4d4;
    border: none;
    padding: 15px;
}

.html-editor-body textarea:focus {
    background: #1e1e1e;
    color: #fff;
    box-shadow: none;
}

@media (max-width: 576px) {
    .settings-sidebar {
        width: 100% !important;
    }
    .settings-fab {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}