/* ===================
   CSS VARIABLES
   =================== */
:root {
    /* Brand Colors */
    --primary-color: #059fb5;
    --accent-color: #efab0b;
    --action-color: #e15f3a;

    /* Neutral Colors */
    --text-dark: #1f2937;
    --text-medium: #6b7280;
    --text-light: #9ca3af;
    --border-color: #e5e7eb;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;

    /* Typography */
    --font-main: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Spacing */
    --spacing-xs: 8px;
    --spacing-sm: 12px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 12px;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
}

/* ===================
   RESET & BASE
   =================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    color: var(--text-dark);
    line-height: 1.6;
    font-size: 15px;
}

/* ===================
   TYPOGRAPHY
   =================== */
h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
}

h2,
.section-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: var(--spacing-xl);
}

h3,
.subsection-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: var(--spacing-md);
}

label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-medium);
    display: block;
    margin-bottom: var(--spacing-xs);
}

/* ===================
   LAYOUT
   =================== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

/* Header with Banner */
.app-header {
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--spacing-xl);
    overflow: hidden;
}

.banner-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.header-banner {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    max-height: 200px;
}

/* Main Grid */
.app-main {
    padding: var(--spacing-xl) 0;
}

.editor-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    align-items: start;
}

/* ===================
   CARDS
   =================== */
.card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-md);
}

.section-divider {
    height: 1px;
    background: var(--border-color);
    margin: var(--spacing-xl) 0;
}

.card-section {
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-xl);
    border-top: 1px solid var(--border-color);
}

/* ===================
   FORM ELEMENTS
   =================== */
.form-group {
    margin-bottom: var(--spacing-lg);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
}

.color-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.form-group.half,
.form-group.color-input {
    margin-bottom: 0;
}

input[type="text"],
input[type="file"],
textarea,
select {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: var(--font-main);
    font-size: 15px;
    color: var(--text-dark);
    background: var(--bg-white);
    transition: all 0.2s ease;
}

input[type="text"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--action-color);
    box-shadow: 0 0 0 3px rgba(225, 95, 58, 0.1);
}

textarea {
    min-height: 100px;
    resize: vertical;
}

.char-counter {
    font-size: 13px;
    color: var(--text-light);
    text-align: right;
    margin-top: var(--spacing-xs);
}

/* Range Sliders */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--border-color);
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--action-color);
    cursor: pointer;
    transition: transform 0.2s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--action-color);
    cursor: pointer;
    border: none;
    transition: transform 0.2s ease;
}

input[type="range"]::-moz-range-thumb:hover {
    transform: scale(1.2);
}

/* ===================
   PREVIEW PANEL
   =================== */
.preview-panel {
    position: sticky;
    top: var(--spacing-lg);
}

.preview-header h2 {
    margin-bottom: var(--spacing-lg);
}

.canvas-container {
    background: linear-gradient(135deg, #f0f0f0 25%, transparent 25%),
        linear-gradient(225deg, #f0f0f0 25%, transparent 25%),
        linear-gradient(45deg, #f0f0f0 25%, transparent 25%),
        linear-gradient(315deg, #f0f0f0 25%, #ffffff 25%);
    background-position: 10px 0, 10px 0, 0 0, 0 0;
    background-size: 20px 20px;
    background-repeat: repeat;
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--border-color);
}

#quoteCanvas {
    max-width: 100%;
    height: auto;
    display: block;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-sm);
}

.preview-tip {
    font-size: 13px;
    color: var(--text-medium);
    text-align: center;
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-sm) var(--spacing-md);
    background: #fef3c7;
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--accent-color);
}

/* ===================
   BUTTONS
   =================== */
.actions {
    display: flex;
    justify-content: center;
    margin-bottom: var(--spacing-md);
}

.btn-primary {
    display: inline-block;
    padding: 14px 32px;
    background: linear-gradient(135deg, var(--action-color) 0%, #d14a2a 100%);
    color: #ffffff;
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 16px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, #d14a2a 0%, var(--action-color) 100%);
}

.btn-primary:active {
    transform: translateY(0);
}

.app-credit {
    font-size: 12px;
    color: var(--text-light);
    text-align: center;
    margin-top: var(--spacing-sm);
}

/* ===================
   FOOTER
   =================== */
.app-footer {
    background: var(--text-dark);
    color: var(--bg-light);
    padding: var(--spacing-lg) 0;
    margin-top: var(--spacing-xl);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.footer-left,
.footer-right {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 14px;
}

.app-footer a {
    color: var(--action-color);
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.2s ease;
}

.app-footer a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* ===================
   UTILITY CLASSES
   =================== */
.hidden {
    display: none !important;
}

/* ===================
   RESPONSIVE DESIGN
   =================== */
@media (max-width: 1024px) {
    .editor-grid {
        grid-template-columns: 1fr;
    }

    .header-banner {
        max-height: 150px;
    }

    .preview-panel {
        position: static;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 var(--spacing-md);
    }

    .app-main {
        padding: var(--spacing-lg) 0;
    }

    .header-banner {
        max-height: 120px;
    }

    .card {
        padding: var(--spacing-lg);
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .color-grid {
        grid-template-columns: 1fr;
    }

    h2,
    .section-title {
        font-size: 18px;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .header-banner {
        max-height: 100px;
    }

    .app-header {
        margin-bottom: var(--spacing-lg);
    }

    .card {
        padding: var(--spacing-md);
        border-radius: var(--radius-md);
    }

    h2,
    .section-title {
        font-size: 16px;
        margin-bottom: var(--spacing-lg);
    }

    .btn-primary {
        width: 100%;
        text-align: center;
    }

    .canvas-container {
        padding: var(--spacing-sm);
        min-height: 250px;
    }
}

/* ===================
   ABOUT SECTION
   =================== */
.main-separator {
    height: 2px;
    background: linear-gradient(to right, transparent, var(--border-color), transparent);
    margin: var(--spacing-xl) 0;
}

.about-section {
    max-width: 1000px;
    margin: 0 auto;
    background: var(--bg-white);
    border-top: 4px solid var(--primary-color);
}

.brand-title {
    color: var(--primary-color);
    border-bottom: 2px solid var(--accent-color);
    display: inline-block;
    padding-bottom: var(--spacing-xs);
    margin-bottom: var(--spacing-lg);
}

.brand-highlight {
    color: var(--action-color);
    font-weight: 700;
}

.about-content p {
    margin-bottom: var(--spacing-md);
    color: var(--text-dark);
    font-size: 16px;
    line-height: 1.8;
}

.feature-list,
.steps-list {
    margin-bottom: var(--spacing-xl);
    padding-left: var(--spacing-lg);
}

.feature-list li,
.steps-list li {
    margin-bottom: var(--spacing-sm);
    color: var(--text-dark);
    position: relative;
    line-height: 1.6;
}

/* Custom bullets for feature list */
.feature-list {
    list-style: none;
}

.feature-list li::before {
    content: "•";
    color: var(--accent-color);
    font-weight: bold;
    font-size: 1.5em;
    position: absolute;
    left: -1em;
    top: -5px;
}

/* Custom numbers for steps list */
.steps-list {
    counter-reset: step-counter;
    list-style: none;
}

.steps-list li {
    counter-increment: step-counter;
    padding-left: 2em;
}

.steps-list li::before {
    content: counter(step-counter);
    background: var(--primary-color);
    color: white;
    font-weight: bold;
    font-size: 12px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    left: 0;
    top: 2px;
}

@media (max-width: 768px) {
    .about-section {
        padding: var(--spacing-lg);
    }

    .steps-list li {
        padding-left: 0;
        margin-left: 2em;
    }

    .steps-list li::before {
        left: -2.5em;
    }
}