/* Photobooth Strip Designer CSS */

/* Oktah Font Face Declarations */
@font-face {
    font-family: 'Oktah';
    src: url('../branding/Oktah Regular/Oktah Regular.woff2') format('woff2'),
         url('../branding/Oktah Regular/Oktah Regular.woff') format('woff'),
         url('../branding/Oktah Regular/Oktah Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Oktah';
    src: url('../branding/Oktah Bold/Oktah Bold.woff2') format('woff2'),
         url('../branding/Oktah Bold/Oktah Bold.woff') format('woff'),
         url('../branding/Oktah Bold/Oktah Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1A2A6C;
    --accent-color: #F5C438;
    --cta-color: #3B82F6;
    --secondary-color: #1A2A6C;
    --success-color: #10b981;
    --info-color: #3B82F6;
    --warning-color: #F5C438;
    --danger-color: #ef4444;
    --light-gray: #f8fafc;
    --medium-gray: #e2e8f0;
    --dark-gray: #64748b;
    --text-color: #1A2A6C;
    --text-light: #ffffff;
    --strip-width: 590px;
    --strip-height: 1181px;
    --workspace-bg: rgb(240, 240, 240);
}

body {
    font-family: 'Oktah', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-gray);
    color: var(--text-color);
    overflow: hidden;
    line-height: 1.5;
}

/* App Container */
.app-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    background: var(--primary-color);
    color: var(--text-light);
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    z-index: 1000;
    border-bottom: 2px solid var(--accent-color);
}

.header-left .logo {
    display: flex;
    align-items: center;
    color: var(--text-light);
    height: 40px !important;
    overflow: hidden !important;
    flex-shrink: 0;
}

.header-left .logo .logo-image,
.logo-image,
img.logo-image,
.header .logo-image,
header .logo-image,
.header-left img {
    height: 40px !important;
    max-height: 40px !important;
    min-height: auto !important;
    width: auto !important;
    max-width: 200px !important;
    min-width: auto !important;
    object-fit: contain !important;
    object-position: center !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    vertical-align: middle !important;
    border: none !important;
    outline: none !important;
    box-sizing: border-box !important;
}

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

.header-right {
    display: flex;
    gap: 8px;
}

/* Buttons */
.btn {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--text-light);
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Oktah', sans-serif;
    text-decoration: none;
    outline: none;
}

.btn:hover {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-primary {
    background: var(--cta-color);
    border-color: var(--cta-color);
    color: var(--text-light);
}

.btn-primary:hover {
    background: #2563eb;
    border-color: #2563eb;
}

.btn-success {
    background: var(--success-color);
    border-color: var(--success-color);
    color: var(--text-light);
}

.btn-success:hover {
    background: #059669;
    border-color: #059669;
}

.btn-info {
    background: var(--cta-color);
    border-color: var(--cta-color);
    color: var(--text-light);
}

.btn-info:hover {
    background: #2563eb;
    border-color: #2563eb;
}

.btn-block {
    width: 100%;
    justify-content: center;
    margin-bottom: 10px;
    color: var(--text-color);
    border-color: var(--medium-gray);
    background: white;
}

.btn-block:hover {
    background: var(--light-gray);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-sm {
    padding: 4px 8px;
    font-size: 12px;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    width: 320px;
    background: var(--text-light);
    border-right: 1px solid var(--medium-gray);
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 20px rgba(26, 42, 108, 0.08);
}

.sidebar-tabs {
    display: flex;
    border-bottom: 1px solid var(--medium-gray);
    background: var(--light-gray);
}

.tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    padding: 18px 12px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--dark-gray);
    font-weight: 500;
    position: relative;
    border-bottom: 3px solid transparent;
}

.tab-btn:hover {
    background: rgba(59, 130, 246, 0.08);
    color: var(--cta-color);
}

.tab-btn.active {
    background: var(--text-light);
    color: var(--primary-color);
    border-bottom-color: var(--accent-color);
    box-shadow: 0 -2px 8px rgba(26, 42, 108, 0.1);
}

.tab-btn i {
    font-size: 20px;
}

.sidebar-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.tab-content {
    display: none;
}

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

.tab-content h3 {
    margin-bottom: 20px;
    font-size: 18px;
    color: var(--secondary-color);
    font-weight: 700;
    font-family: 'Oktah', sans-serif;
    letter-spacing: 0.025em;
}

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

.template-item {
    background: var(--text-light);
    border: 2px solid var(--medium-gray);
    border-radius: 12px;
    padding: 18px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 2px 8px rgba(26, 42, 108, 0.06);
}

.template-item:hover {
    border-color: var(--cta-color);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.15);
    transform: translateY(-3px);
}

.template-item.active {
    border-color: var(--accent-color);
    background: rgba(245, 196, 56, 0.08);
    box-shadow: 0 8px 25px rgba(245, 196, 56, 0.2);
}

.template-item.active::after {
    content: '✓';
    position: absolute;
    top: -10px;
    right: -10px;
    background: var(--accent-color);
    color: var(--primary-color);
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(245, 196, 56, 0.3);
}

.template-preview {
    width: 100%;
    height: 120px;
    border-radius: 8px;
    margin-bottom: 12px;
    position: relative;
    background: var(--light-gray);
    border: 1px solid var(--medium-gray);
    overflow: hidden;
}

/* Template preview backgrounds - fallback gradients if no thumbnails */
.template1-preview {
    background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
    background-image: url('../templates/thumbnails/1.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.template2-preview {
    background: linear-gradient(180deg, #f1f5f9 0%, #cbd5e1 100%);
    background-image: url('../templates/thumbnails/2.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.template3-preview {
    background: linear-gradient(180deg, #f0f9ff 0%, #bae6fd 100%);
    background-image: url('../templates/thumbnails/3.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.template4-preview {
    background: linear-gradient(180deg, #fefce8 0%, #fde047 100%);
    background-image: url('../templates/thumbnails/4.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.template5-preview {
    background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
    background-image: url('../templates/thumbnails/5.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.template6-preview {
    background: linear-gradient(180deg, #f1f5f9 0%, #cbd5e1 100%);
    background-image: url('../templates/thumbnails/6.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.template7-preview {
    background: linear-gradient(180deg, #f0f9ff 0%, #bae6fd 100%);
    background-image: url('../templates/thumbnails/7.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.template8-preview {
    background: linear-gradient(180deg, #fefce8 0%, #fde047 100%);
    background-image: url('../templates/thumbnails/8.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.photo-placeholder {
    position: absolute;
    background: rgba(59, 130, 246, 0.15);
    border: 2px solid var(--cta-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    color: white;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.2), 0 1px 3px rgba(0,0,0,0.3);
    backdrop-filter: blur(2px);
}

/* Advanced Color Picker Styling */
.color-picker-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}

.color-picker-container .custom-color-picker {
    width: 60px;
    height: 40px;
    border: 2px solid var(--medium-gray);
    border-radius: 8px;
    cursor: pointer;
    padding: 0;
    background: none;
}

.color-picker-container .custom-color-picker::-webkit-color-swatch-wrapper {
    padding: 0;
    border: none;
    border-radius: 6px;
}

.color-picker-container .custom-color-picker::-webkit-color-swatch {
    border: none;
    border-radius: 6px;
}

.hex-input {
    flex: 1;
    padding: 8px 12px;
    border: 2px solid var(--medium-gray);
    border-radius: 6px;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 14px;
    text-transform: uppercase;
    transition: border-color 0.2s ease;
}

.hex-input:focus {
    outline: none;
    border-color: var(--cta-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.hex-input.invalid {
    border-color: var(--danger-color);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.color-presets {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    margin-top: 4px;
}

.color-preset {
    width: 32px;
    height: 32px;
    border: 2px solid var(--medium-gray);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.color-preset:hover {
    transform: scale(1.1);
    border-color: var(--cta-color);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.color-preset.active {
    border-color: var(--cta-color);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.color-preset[data-color="#ffffff"] {
    border-color: #ccc;
}

/* Email Form Styling */
.email-form {
    background: var(--light-gray);
    border: 1px solid var(--medium-gray);
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
}

.email-form h5 {
    margin: 0 0 12px 0;
    color: var(--text-color);
    font-weight: 600;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.email-form input,
.email-form textarea {
    padding: 10px 12px;
    border: 1px solid var(--medium-gray);
    border-radius: 6px;
    font-size: 14px;
    font-family: 'Oktah', sans-serif;
    transition: border-color 0.2s ease;
}

.email-form input:focus,
.email-form textarea:focus {
    outline: none;
    border-color: var(--cta-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.email-form textarea {
    resize: vertical;
    min-height: 60px;
}

/* Export Options Styling */
.export-options .format-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border: 2px solid var(--medium-gray);
    border-radius: 8px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.export-options input[type="radio"]:checked + .format-option {
    border-color: var(--cta-color);
    background: rgba(59, 130, 246, 0.05);
}

.export-options .format-option i {
    font-size: 18px;
    color: var(--cta-color);
    flex-shrink: 0;
}

/* Remove old placeholder styles - now using inline styles for positioning */

/* Text List Styling */
.added-texts {
    margin-top: 20px;
}

.added-texts h4 {
    font-size: 14px;
    margin-bottom: 10px;
    color: var(--primary-color);
    font-family: 'Oktah', sans-serif;
    font-weight: 700;
}

.text-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.text-item {
    display: flex;
    align-items: center;
    background: var(--text-light);
    border: 1px solid var(--medium-gray);
    border-radius: 6px;
    padding: 8px 12px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.text-item:hover {
    border-color: var(--cta-color);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

.text-item-content {
    flex: 1;
    font-size: 12px;
    color: var(--text-color);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.text-item-remove {
    background: var(--danger-color);
    border: none;
    color: white;
    border-radius: 4px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 10px;
    transition: all 0.2s ease;
}

.text-item-remove:hover {
    background: #dc2626;
    transform: scale(1.1);
}

/* Template Settings */
.template-settings {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--medium-gray);
}

.template-settings .form-group {
    margin-bottom: 0;
}

.branding-area {
    background: var(--primary-color);
    color: white;
    height: 15px;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    font-weight: bold;
}

.branding-area.large {
    height: 25px;
}

.template-item span {
    font-size: 13px;
    color: var(--dark-gray);
    font-weight: 500;
}

/* Branding Options */
.branding-options {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.form-group label {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 14px;
    letter-spacing: 0.025em;
}

.form-group input[type="text"] {
    padding: 12px 16px;
    border: 2px solid var(--medium-gray);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--text-light);
}

.form-group input[type="text"]:focus {
    outline: none;
    border-color: var(--cta-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.logo-upload-area {
    border: 2px dashed var(--medium-gray);
    border-radius: 8px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--light-gray);
}

.logo-upload-area:hover {
    border-color: var(--primary-color);
    background: rgba(233, 30, 99, 0.02);
}

.logo-upload-area i {
    font-size: 32px;
    color: var(--medium-gray);
    margin-bottom: 10px;
}

.logo-upload-area p {
    color: var(--dark-gray);
    font-size: 14px;
}

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

.color-option {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}

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

.color-option.active {
    border-color: white;
    box-shadow: 0 0 0 2px var(--secondary-color);
}

.custom-color-picker {
    width: 44px;
    height: 44px;
    border: 2px solid var(--medium-gray);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.custom-color-picker:hover {
    border-color: var(--cta-color);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

/* Text Options */
.text-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 25px;
}

.text-presets h4 {
    font-size: 14px;
    color: var(--secondary-color);
    margin-bottom: 15px;
    font-weight: 600;
}

.preset-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.preset-btn {
    background: var(--light-gray);
    border: 1px solid var(--medium-gray);
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    color: var(--dark-gray);
    transition: all 0.3s ease;
}

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

/* Decorations Grid */
.decorations-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.decoration-item {
    background: white;
    border: 1px solid var(--medium-gray);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.decoration-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.decoration-preview {
    width: 100%;
    height: 60px;
    border-radius: 4px;
    margin-bottom: 10px;
    background: var(--light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.frame-preview::before {
    content: '';
    width: 80%;
    height: 80%;
    border: 3px solid var(--primary-color);
    border-radius: 4px;
}

.border-preview::before {
    content: '';
    width: 100%;
    height: 100%;
    border: 2px solid var(--primary-color);
    border-radius: 4px;
}

.corner-preview::before,
.corner-preview::after {
    content: '';
    position: absolute;
    width: 15px;
    height: 15px;
    border: 2px solid var(--primary-color);
}

.corner-preview::before {
    top: 5px;
    left: 5px;
    border-right: none;
    border-bottom: none;
}

.corner-preview::after {
    bottom: 5px;
    right: 5px;
    border-left: none;
    border-top: none;
}

.pattern-preview {
    background: repeating-linear-gradient(
        45deg,
        var(--primary-color),
        var(--primary-color) 2px,
        transparent 2px,
        transparent 6px
    );
}

.decoration-item span {
    font-size: 12px;
    color: var(--dark-gray);
}

/* Canvas Area */
.canvas-area {
    flex: 1;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: auto;
    padding: 24px;
}

.canvas-info {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 10;
}

.strip-info {
    background: rgba(255, 255, 255, 0.95);
    padding: 8px 15px;
    border-radius: 20px;
    display: flex;
    gap: 15px;
    align-items: center;
    font-size: 12px;
    color: var(--dark-gray);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.strip-size {
    font-weight: 600;
    color: var(--primary-color);
}

.strip-dpi {
    font-weight: 500;
}

.canvas-container {
    position: relative;
    background: var(--workspace-bg, #f0f0f0);
    box-shadow: 0 12px 40px rgba(26, 42, 108, 0.12);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(26, 42, 108, 0.1);
    padding: 0;
}

.strip-canvas {
    max-height: calc(100vh - 200px);
    max-width: calc(100% - 40px);
}

#design-canvas {
    display: block;
    cursor: crosshair;
    max-width: 100%;
    max-height: 100%;
    background: transparent;
}

.photo-guides {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.photo-guide {
    position: absolute;
    background: rgba(233, 30, 99, 0.1);
    border: 2px dashed var(--primary-color);
    color: var(--primary-color);
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.photo-guide:hover {
    opacity: 1;
}

/* Selection Handles */
.selection-handles {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 10;
}

.selection-box {
    position: absolute;
    border: 2px solid var(--primary-color);
    background: rgba(233, 30, 99, 0.1);
    pointer-events: none;
    border-radius: 4px;
}

.resize-handle {
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--primary-color);
    border: 2px solid white;
    border-radius: 50%;
    pointer-events: all;
    cursor: nw-resize;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.resize-handle.nw { top: -5px; left: -5px; cursor: nw-resize; }
.resize-handle.ne { top: -5px; right: -5px; cursor: ne-resize; }
.resize-handle.sw { bottom: -5px; left: -5px; cursor: sw-resize; }
.resize-handle.se { bottom: -5px; right: -5px; cursor: se-resize; }
.resize-handle.n { top: -5px; left: 50%; transform: translateX(-50%); cursor: n-resize; }
.resize-handle.s { bottom: -5px; left: 50%; transform: translateX(-50%); cursor: s-resize; }
.resize-handle.w { left: -5px; top: 50%; transform: translateY(-50%); cursor: w-resize; }
.resize-handle.e { right: -5px; top: 50%; transform: translateY(-50%); cursor: e-resize; }

/* Properties Panel */
.properties-panel {
    width: 280px;
    background: white;
    border-left: 1px solid var(--medium-gray);
    display: flex;
    flex-direction: column;
    box-shadow: -2px 0 8px rgba(0,0,0,0.05);
}

.properties-header {
    padding: 20px;
    border-bottom: 1px solid var(--medium-gray);
    background: var(--light-gray);
}

.properties-header h3 {
    font-size: 16px;
    color: var(--secondary-color);
    font-weight: 700;
    font-family: 'Oktah', sans-serif;
}

.properties-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.strip-settings {
    background: var(--light-gray);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.strip-settings h4 {
    font-size: 14px;
    color: var(--secondary-color);
    margin-bottom: 12px;
    font-weight: 600;
}

.property-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 13px;
}

.property-row label {
    color: var(--dark-gray);
    font-weight: 500;
}

.property-row span {
    color: var(--secondary-color);
    font-weight: 600;
}

.no-selection {
    color: var(--dark-gray);
    font-style: italic;
    text-align: center;
    margin-top: 50px;
    font-size: 14px;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(3px);
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.3s ease-out;
}

.modal-content.large {
    max-width: 900px;
    max-height: 95vh;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid var(--medium-gray);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--light-gray);
}

.modal-header h3 {
    font-size: 18px;
    color: var(--secondary-color);
    font-weight: 700;
    font-family: 'Oktah', sans-serif;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--dark-gray);
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.modal-close:hover {
    background: var(--medium-gray);
    color: var(--secondary-color);
}

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

.modal-footer {
    padding: 20px 25px;
    border-top: 1px solid var(--medium-gray);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: var(--light-gray);
}

/* Preview Modal */
.preview-container {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.preview-strip {
    flex-shrink: 0;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

#preview-canvas {
    max-width: 300px;
    max-height: 600px;
    border: 1px solid var(--medium-gray);
    border-radius: 6px;
}

.preview-info {
    flex: 1;
}

.preview-info h4 {
    font-size: 16px;
    color: var(--secondary-color);
    margin-bottom: 15px;
    font-weight: 600;
}

.preview-info ul {
    list-style: none;
    margin-bottom: 20px;
}

.preview-info li {
    padding: 8px 0;
    color: var(--dark-gray);
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid var(--light-gray);
}

.preview-note {
    background: rgba(52, 152, 219, 0.1);
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid var(--info-color);
    font-size: 14px;
    color: var(--secondary-color);
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.preview-note i {
    color: var(--info-color);
    margin-top: 2px;
}

/* Export Options */
.export-options {
    margin-bottom: 25px;
}

.export-options h4 {
    font-size: 16px;
    color: var(--secondary-color);
    margin-bottom: 15px;
    font-weight: 600;
}

.export-options label {
    display: block;
    margin-bottom: 15px;
    cursor: pointer;
    padding: 15px;
    border: 2px solid var(--light-gray);
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.export-options label:hover {
    border-color: var(--primary-color);
    background: rgba(233, 30, 99, 0.02);
}

.export-options input[type="radio"] {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
}

.format-option {
    display: block;
    margin-left: 30px;
}

.format-option strong {
    color: var(--secondary-color);
    font-size: 16px;
}

.info-box {
    background: rgba(255, 193, 7, 0.1);
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid var(--warning-color);
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.info-box i {
    color: var(--warning-color);
    margin-top: 2px;
}

/* Save Success */
.save-success {
    text-align: center;
}

.success-icon {
    font-size: 48px;
    color: var(--success-color);
    margin-bottom: 15px;
}

.save-success p {
    font-size: 16px;
    color: var(--secondary-color);
    margin-bottom: 25px;
}

.save-code {
    background: var(--light-gray);
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.save-code label {
    display: block;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 10px;
    text-align: left;
}

.code-display {
    display: flex;
    gap: 8px;
}

.code-display input {
    flex: 1;
    padding: 10px;
    border: 1px solid var(--medium-gray);
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    background: white;
}

.save-code small {
    display: block;
    margin-top: 8px;
    color: var(--dark-gray);
    font-size: 12px;
    text-align: left;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .sidebar {
        width: 280px;
    }
    
    .properties-panel {
        width: 250px;
    }
}

@media (max-width: 1024px) {
    .sidebar {
        width: 260px;
    }
    
    .properties-panel {
        display: none;
    }
    
    .templates-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .header-center {
        order: 3;
        width: 100%;
        justify-content: center;
        margin-top: 10px;
    }
    
    .sidebar {
        width: 100%;
        height: 200px;
        order: 2;
    }
    
    .canvas-area {
        order: 1;
        flex: 1;
    }
    
    .main-content {
        flex-direction: column;
    }
    
    .sidebar-content {
        padding: 15px;
    }
    
    .canvas-container {
        max-height: 400px;
    }
}

/* Animations */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Notification System */
.notification {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: var(--success-color);
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 3000;
    transform: translateX(-400px);
    transition: transform 0.3s ease;
    font-weight: 500;
}

.notification.show {
    transform: translateX(0);
}

.notification.error {
    background: var(--danger-color);
}

.notification.warning {
    background: var(--warning-color);
}

.notification.info {
    background: var(--info-color);
}

/* Image Upload Styling */
.image-upload-section {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--light-gray);
}

.upload-info {
    font-size: 12px;
    color: var(--medium-gray);
    margin-top: 8px;
    text-align: center;
}

.uploaded-images h4 {
    font-size: 14px;
    margin-bottom: 10px;
    color: var(--dark-gray);
}

.images-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.image-item {
    position: relative;
    aspect-ratio: 1;
    border: 2px solid var(--light-gray);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--background-color);
}

.image-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-item .remove-image {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.image-item:hover .remove-image {
    opacity: 1;
}

.image-item .image-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.7);
    color: white;
    font-size: 10px;
    padding: 4px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light-gray);
}

::-webkit-scrollbar-thumb {
    background: var(--medium-gray);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--dark-gray);
}

/* Background Image Upload Styling */
.background-image-container {
    margin-top: 10px;
}

.background-image-container .btn {
    margin-right: 8px;
    margin-bottom: 10px;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--medium-gray);
    color: var(--text-color);
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-outline.btn-danger {
    border-color: #dc3545;
    color: #dc3545;
}

.btn-outline.btn-danger:hover {
    background: #dc3545;
    color: white;
}

.background-preview {
    background: white;
    border: 1px solid var(--medium-gray);
    border-radius: 6px;
    padding: 12px;
    margin-top: 10px;
}

.background-preview img {
    width: 100%;
    max-width: 200px;
    height: auto;
    border-radius: 4px;
    margin-bottom: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.background-info {
    font-size: 12px;
}

.background-info span {
    display: block;
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 8px;
    word-break: break-all;
}

.background-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.background-controls label {
    font-size: 11px;
    color: var(--text-color);
    font-weight: 500;
    margin: 0;
}

.background-controls input[type="range"] {
    flex: 1;
    min-width: 80px;
    height: 4px;
    border-radius: 2px;
    background: var(--light-gray);
    outline: none;
    -webkit-appearance: none;
}

.background-controls input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.background-controls input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

#background-opacity-value {
    font-size: 11px;
    font-weight: 500;
    color: var(--primary-color);
    min-width: 35px;
    text-align: right;
}

.help-text {
    display: block;
    font-size: 11px;
    color: var(--medium-gray);
    margin-top: 8px;
    line-height: 1.4;
}