/* ==========================================================================
   DESIGN SYSTEM & CSS VARIABLES
   ========================================================================== */
:root {
    /* Color Palette */
    --color-bg-dark: #070b12;
    --color-bg-card: rgba(15, 23, 42, 0.65);
    --color-border: rgba(255, 255, 255, 0.08);
    --color-border-glow: rgba(212, 175, 55, 0.3);
    
    --color-text-main: #f8fafc;
    --color-text-muted: #94a3b8;
    
    /* Premium Metallic Gold Gradients */
    --gold-light: #fef08a;
    --gold-mid: #d4af37;
    --gold-dark: #aa7c11;
    --gold-metallic: linear-gradient(135deg, #fef08a 0%, #d4af37 40%, #aa7c11 70%, #fef08a 100%);
    --gold-glow: 0 0 20px rgba(212, 175, 55, 0.6), 0 0 40px rgba(212, 175, 55, 0.3);
    
    /* Interface theme colors */
    --color-primary: #d4af37;
    --color-primary-hover: #fef08a;
    --color-primary-rgb: 212, 175, 55;
    --color-success: #10b981;
    
    /* Layout properties */
    --radius-lg: 16px;
    --radius-md: 10px;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   RESET & GLOBAL STYLES
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Be Vietnam Pro', sans-serif;
    background-color: var(--color-bg-dark);
    color: var(--color-text-main);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
    position: relative;
}

/* Ambient Background Lights */
.bg-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    background: 
        radial-gradient(circle at 10% 20%, rgba(139, 0, 0, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(11, 25, 44, 0.25) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(212, 175, 55, 0.03) 0%, transparent 60%);
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}
::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.3);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 175, 55, 0.6);
}

/* ==========================================================================
   CONTAINER & APP HEADER
   ========================================================================== */
.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 24px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

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

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

.logo-icon {
    font-size: 32px;
    background: var(--gold-metallic);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 8px rgba(212,175,55,0.4));
}

.logo-text h1 {
    font-family: 'Cinzel', serif;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 2px;
    background: var(--gold-metallic);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-text span {
    font-size: 11px;
    color: var(--color-text-muted);
    letter-spacing: 3px;
    display: block;
    text-transform: uppercase;
}

.app-tagline {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--color-text-muted);
    font-size: 14px;
}

.badge {
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid var(--color-primary);
    color: var(--color-primary);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* ==========================================================================
   MAIN CONTENT SPLIT LAYOUT
   ========================================================================== */
.main-content {
    display: grid;
    grid-template-columns: 1fr 450px;
    gap: 28px;
    flex-grow: 1;
}

@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   LEFT COLUMN: STAGE PREVIEW (16:9 CANVAS)
   ========================================================================== */
.canvas-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-title h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.resolution-indicator {
    font-size: 12px;
    color: var(--color-text-muted);
    background: rgba(255, 255, 255, 0.04);
    padding: 4px 12px;
    border-radius: 4px;
    border: 1px solid var(--color-border);
}

.canvas-wrapper {
    background: rgba(0, 0, 0, 0.4);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 4px 30px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    height: 480px; /* Fixed height for preview box */
    width: 100%;
}

/* The Core Stage Banner using Container Query for scalable typography */
#stage-banner {
    width: 100%;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    aspect-ratio: 16 / 9;
    container-type: inline-size; /* Critical: establishes container for scaling text */
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.05);
    transition: background-image 0.5s ease-in-out, aspect-ratio 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    user-select: none;
}

/* Background assets mapping */
.banner-theme-red {
    background-image: url('assets/bg_red_gold.jpg');
}

.banner-theme-dark-red {
    background-image: url('assets/bg_dark_red.jpg');
}

.banner-theme-green {
    background-image: url('assets/bg_green_gold.jpg');
}

.banner-theme-blue {
    background-image: url('assets/bg_blue_gold.jpg');
}

.banner-theme-parchment {
    background-image: url('assets/bg_parchment.jpg');
}

/* Atmospheric Overlays */
.banner-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0) 50%, rgba(0,0,0,0.3) 100%);
    pointer-events: none;
    z-index: 1;
}

.banner-grid {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 20px 20px;
    pointer-events: none;
    z-index: 1;
    opacity: 0.5;
}

.light-beam {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at top, rgba(255, 240, 138, 0.08) 0%, transparent 60%);
    pointer-events: none;
    z-index: 2;
    transform: rotate(-15deg);
}

/* Particles Container */
.particles-container {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    overflow: hidden;
}

.gold-particle {
    position: absolute;
    background: radial-gradient(circle, rgba(254, 240, 138, 1) 0%, rgba(212, 175, 55, 0.4) 60%, transparent 100%);
    border-radius: 50%;
    bottom: -10px;
    pointer-events: none;
    filter: drop-shadow(0 0 4px #d4af37);
}

/* Banner Content Wrapper */
.banner-content {
    position: relative;
    z-index: 10;
    width: 90%;
    height: 85%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    text-align: center;
    padding: 2% 0;
}

/* ==========================================================================
   SCALABLE TEXT LAYOUT (Using cqw units)
   ========================================================================== */
.banner-header-text {
    font-family: 'Cinzel', serif;
    font-size: calc(3.2cqw * var(--font-scale, 1) * var(--header-scale, 1));
    font-weight: 800;
    letter-spacing: 0.25em;
    color: #ffffff;
    text-shadow: 0 2px 5px rgba(0,0,0,0.8);
    transition: var(--transition-smooth);
}

.banner-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60%;
    gap: calc(1.5cqw * var(--font-scale, 1));
    margin: 1% 0;
}

.divider-line {
    flex-grow: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
}

.divider-star {
    font-size: calc(1.8cqw * var(--font-scale, 1));
    color: var(--color-primary);
    filter: drop-shadow(0 0 5px rgba(212,175,55,0.8));
}

.banner-main-title {
    font-family: 'Cinzel', serif;
    font-size: calc(7.2cqw * var(--font-scale, 1) * var(--title-scale, 1));
    font-weight: 900;
    letter-spacing: 0.08em;
    margin: 1% 0;
    transition: var(--transition-smooth);
    background: var(--gold-metallic);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.9));
}

.banner-subtitle {
    font-family: 'Be Vietnam Pro', sans-serif;
    font-size: calc(4.6cqw * var(--font-scale, 1) * var(--subtitle-scale, 1));
    font-weight: 800;
    letter-spacing: 0.12em;
    color: #ffffff;
    text-shadow: 0 3px 6px rgba(0,0,0,0.9);
    margin-bottom: 1.5%;
    transition: var(--transition-smooth);
}

.banner-slogan-box {
    background: linear-gradient(90deg, transparent 0%, rgba(212, 175, 55, 0.25) 30%, rgba(212, 175, 55, 0.25) 70%, transparent 100%);
    border-top: 1.5px solid rgba(212,175,55,0.4);
    border-bottom: 1.5px solid rgba(212,175,55,0.4);
    padding: 0.6% 8%;
    margin-bottom: 1.5%;
    display: inline-block;
}

.banner-slogan {
    font-family: 'Be Vietnam Pro', sans-serif;
    font-size: calc(2.8cqw * var(--font-scale, 1) * var(--slogan-scale, 1));
    font-weight: 700;
    letter-spacing: 0.15em;
    color: #fef08a;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
    text-transform: uppercase;
}

.banner-quote {
    font-family: 'Be Vietnam Pro', sans-serif;
    font-style: normal;
    font-size: calc(2.2cqw * var(--font-scale, 1) * var(--quote-scale, 1));
    font-weight: 600;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 2%;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

.banner-date {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: calc(2.5cqw * var(--font-scale, 1) * var(--date-scale, 1));
    font-weight: 600;
    color: #ffffff;
    text-shadow: 0 2px 5px rgba(0,0,0,0.9);
    letter-spacing: 0.02em;
    transition: var(--transition-smooth);
}

/* Specific Theme Text Color Adjustments */
/* Blue Theme Styling overrides */
.banner-theme-blue .banner-header-text {
    color: #f8fafc;
}
.banner-theme-blue .banner-subtitle {
    color: #f8fafc;
}
.banner-theme-blue .banner-slogan-box {
    background: linear-gradient(90deg, transparent 0%, rgba(254, 240, 138, 0.15) 30%, rgba(254, 240, 138, 0.15) 70%, transparent 100%);
    border-top: 1.5px solid rgba(254, 240, 138, 0.3);
    border-bottom: 1.5px solid rgba(254, 240, 138, 0.3);
}

/* Parchment/Heritage Theme Styling overrides */
.banner-theme-parchment .banner-header-text {
    color: #2b1810;
    text-shadow: none;
    font-weight: 900;
}
.banner-theme-parchment .divider-line {
    background: linear-gradient(90deg, transparent, #5c351f, transparent);
}
.banner-theme-parchment .divider-star {
    color: #5c351f;
    filter: none;
}
.banner-theme-parchment .banner-main-title {
    background: linear-gradient(135deg, #422006 0%, #78350f 40%, #451a03 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 1px 2px rgba(255,255,255,0.4));
}
.banner-theme-parchment .banner-subtitle {
    color: #3b1700;
    text-shadow: none;
    font-weight: 800;
}
.banner-theme-parchment .banner-slogan-box {
    background: linear-gradient(90deg, transparent 0%, rgba(120, 53, 15, 0.1) 30%, rgba(120, 53, 15, 0.1) 70%, transparent 100%);
    border-top: 1.5px solid rgba(120, 53, 15, 0.4);
    border-bottom: 1.5px solid rgba(120, 53, 15, 0.4);
}
.banner-theme-parchment .banner-slogan {
    color: #78350f;
    text-shadow: none;
}
.banner-theme-parchment .banner-quote {
    color: #451a03;
    text-shadow: none;
}
.banner-theme-parchment .banner-date {
    color: #451a03;
    text-shadow: none;
    font-weight: 700;
}

/* ==========================================================================
   TEXT GLOW / SHADOW STYLES
   ========================================================================== */
.glow-0 .banner-main-title { filter: none !important; -webkit-text-fill-color: initial !important; color: var(--color-primary); }
.glow-0 .banner-subtitle, .glow-0 .banner-header-text, .glow-0 .banner-date { text-shadow: none !important; }

.glow-1 .banner-main-title { filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5)) !important; }
.glow-1 .banner-subtitle, .glow-1 .banner-header-text, .glow-1 .banner-date { text-shadow: 0 1px 3px rgba(0,0,0,0.6) !important; }

.glow-2 .banner-main-title { filter: drop-shadow(0 4px 10px rgba(0,0,0,0.8)) !important; }
.glow-2 .banner-subtitle, .glow-2 .banner-header-text, .glow-2 .banner-date { text-shadow: 0 2px 6px rgba(0,0,0,0.85) !important; }

.glow-3 .banner-main-title { filter: drop-shadow(0 4px 12px rgba(212,175,55,0.4)) drop-shadow(0 6px 20px rgba(0,0,0,0.9)) !important; }
.glow-3 .banner-subtitle { text-shadow: 0 0 10px rgba(255,255,255,0.3), 0 3px 8px rgba(0,0,0,0.9) !important; }
.glow-3 .banner-header-text { text-shadow: 0 0 8px rgba(255,255,255,0.2), 0 2px 6px rgba(0,0,0,0.9) !important; }

.glow-4 .banner-main-title { 
    filter: drop-shadow(0 0 10px rgba(254,240,138,0.6)) drop-shadow(0 0 25px rgba(212,175,55,0.5)) drop-shadow(0 8px 30px rgba(0,0,0,0.95)) !important; 
}
.glow-4 .banner-subtitle { 
    text-shadow: 0 0 12px rgba(255,255,255,0.5), 0 0 20px rgba(255,255,255,0.2), 0 4px 10px rgba(0,0,0,0.95) !important; 
}
.glow-4 .banner-header-text { 
    text-shadow: 0 0 10px rgba(255,255,255,0.4), 0 0 18px rgba(255,255,255,0.1), 0 3px 8px rgba(0,0,0,0.95) !important; 
}

/* Adjust color preset overrides */
.color-solid-gold .banner-main-title {
    background: none !important;
    -webkit-text-fill-color: initial !important;
    color: #e5c158 !important;
}

.color-solid-white .banner-main-title {
    background: none !important;
    -webkit-text-fill-color: initial !important;
    color: #ffffff !important;
}

/* ==========================================================================
   ANIMATIONS & EFFECTS
   ========================================================================== */
.init-animations.banner-theme-red .light-beam,
.init-animations.banner-theme-dark-red .light-beam {
    animation: sweep 8s ease-in-out infinite alternate;
}
.init-animations.banner-theme-blue .light-beam,
.init-animations.banner-theme-green .light-beam {
    animation: pulse-light 10s ease-in-out infinite alternate;
}
.init-animations.banner-theme-parchment .light-beam {
    display: none;
}

@keyframes sweep {
    0% { transform: rotate(-20deg) scale(0.9); opacity: 0.5; }
    100% { transform: rotate(-10deg) scale(1.1); opacity: 1; }
}

@keyframes pulse-light {
    0% { opacity: 0.3; transform: scale(0.95); }
    100% { opacity: 0.8; transform: scale(1.05); }
}

.float-animation {
    animation: float-up var(--duration) linear infinite;
}

@keyframes float-up {
    0% {
        transform: translateY(0) scale(0.5);
        opacity: 0;
    }
    10% {
        opacity: var(--opacity);
    }
    90% {
        opacity: var(--opacity);
    }
    100% {
        transform: translateY(var(--distance)) scale(1.2);
        opacity: 0;
    }
}

/* Quick Action Panel Layout */
.canvas-quick-actions {
    display: flex;
    gap: 16px;
}

.canvas-quick-actions .btn {
    flex: 1;
}

/* ==========================================================================
   RIGHT COLUMN: CONTROL PANEL (GLASSMORPHISM)
   ========================================================================== */
.control-section {
    display: flex;
    flex-direction: column;
}

.control-card {
    background: var(--color-bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 120px);
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--color-border);
}

.card-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-body {
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Control fields style */
.control-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.group-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-primary);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

/* Theme Options Picker */
.theme-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.theme-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 12px 6px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: var(--transition-smooth);
}

.theme-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(212, 175, 55, 0.4);
}

.theme-btn.active {
    background: rgba(212, 175, 55, 0.08);
    border-color: var(--color-primary);
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.15);
}

.color-preview {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.2);
}

.color-preview.red-gold {
    background: linear-gradient(135deg, #8B0000, #d4af37);
}

.color-preview.dark-red-gold {
    background: linear-gradient(135deg, #4d0000, #d4af37);
}

.color-preview.green-gold {
    background: linear-gradient(135deg, #0f5132, #d4af37);
}

.color-preview.blue-gold {
    background: linear-gradient(135deg, #0B192C, #d4af37);
}

.color-preview.parchment-wood {
    background: linear-gradient(135deg, #e3c79a, #5c351f);
}

.theme-name {
    font-size: 11px;
    font-weight: 600;
    color: var(--color-text-main);
    text-align: center;
}

/* Inputs styling */
.input-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.input-field label {
    font-size: 12px;
    color: var(--color-text-muted);
}

.input-field input {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 10px 12px;
    color: var(--color-text-main);
    font-family: inherit;
    font-size: 13px;
    transition: var(--transition-smooth);
}

.input-field input:focus {
    border-color: var(--color-primary);
    outline: none;
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.15);
}

/* Sliders */
.slider-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--color-text-muted);
}

.slider-labels span:last-child {
    color: var(--color-primary);
    font-weight: 700;
}

.slider-field input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 5px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
}

.slider-field input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--color-primary);
    cursor: pointer;
    transition: transform 0.1s ease;
}

.slider-field input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    background: var(--color-primary-hover);
}

/* Color Presets Picker */
.color-preset-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.color-preset-field label {
    font-size: 12px;
    color: var(--color-text-muted);
}

.color-presets {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.color-preset-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 12px;
    color: var(--color-text-main);
    cursor: pointer;
    text-align: left;
    transition: var(--transition-smooth);
}

.color-preset-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

.color-preset-btn.active {
    border-color: var(--color-primary);
    background: rgba(212, 175, 55, 0.1);
    color: var(--color-primary-hover);
    font-weight: 600;
}

/* Custom Checkboxes */
.toggle-field {
    display: flex;
    align-items: center;
    margin-top: 4px;
}

.checkbox-container {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 28px;
    cursor: pointer;
    font-size: 12px;
    color: var(--color-text-muted);
    user-select: none;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    height: 18px;
    width: 18px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    transition: var(--transition-smooth);
}

.checkbox-container:hover input ~ .checkmark {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(212, 175, 55, 0.4);
}

.checkbox-container input:checked ~ .checkmark {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 6px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.control-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
    border-top: 1px solid var(--color-border);
    padding-top: 16px;
}

/* ==========================================================================
   BUTTONS DEFINITIONS
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    padding: 12px 20px;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: var(--gold-metallic);
    color: #000000;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
    font-weight: 700;
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.5);
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--color-border);
    color: var(--color-text-main);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-link {
    background: none;
    color: var(--color-text-muted);
    font-size: 12px;
    text-transform: none;
    padding: 0;
    border-radius: 0;
}

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

/* ==========================================================================
   FOOTER STYLING
   ========================================================================== */
.app-footer-bar {
    text-align: center;
    padding-top: 16px;
    border-top: 1px solid var(--color-border);
    color: var(--color-text-muted);
    font-size: 11px;
    letter-spacing: 1px;
}

/* ==========================================================================
   FULLSCREEN PORTAL STYLING
   ========================================================================== */
#fullscreen-portal {
    position: fixed;
    inset: 0;
    background: #000000;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease-in-out;
}

#fullscreen-portal.fullscreen-portal-active {
    opacity: 1;
    pointer-events: auto;
}

#fullscreen-canvas-container {
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

#fullscreen-canvas-container #stage-banner {
    width: 100%;
    height: 100%;
    aspect-ratio: 16 / 9;
    max-width: 100%;
    max-height: 100%;
    border-radius: 0;
    box-shadow: none;
}

.btn-close-portal {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 18px;
    cursor: pointer;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.btn-close-portal:hover {
    background: rgba(212, 175, 55, 0.8);
    color: black;
    border-color: transparent;
    transform: scale(1.1);
}

/* ==========================================================================
   PRINT MEDIA STYLES
   ========================================================================== */
@media print {
    @page {
        size: landscape;
        margin: 0;
    }
    
    body {
        background: #ffffff;
        color: #000000;
    }
    
    .bg-glow, 
    .app-header, 
    .app-footer-bar, 
    .control-section, 
    .canvas-quick-actions, 
    .section-title, 
    .resolution-indicator {
        display: none !important;
    }
    
    .container {
        padding: 0;
        margin: 0;
        max-width: 100% !important;
        width: 100vw !important;
        height: 100vh !important;
    }
    
    .main-content {
        grid-template-columns: 1fr !important;
        padding: 0;
        margin: 0;
    }
    
    .canvas-section, .canvas-wrapper {
        padding: 0 !important;
        margin: 0 !important;
        background: none !important;
        border: none !important;
        box-shadow: none !important;
        width: 100vw !important;
        height: 100vh !important;
    }
    
    #stage-banner {
        width: 100vw !important;
        height: 100vh !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        border: none !important;
        margin: 0 !important;
    }
}

/* ==========================================================================
   INPUTS WITH CONTROLS (FONT FAMILY & ITALIC SELECTORS)
   ========================================================================== */
.input-with-controls {
    display: flex;
    gap: 8px;
    align-items: center;
    width: 100%;
}

.input-with-controls input {
    flex-grow: 1;
}

.font-select {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 10px 8px;
    color: var(--color-text-main);
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
    min-width: 110px;
    transition: var(--transition-smooth);
}

.font-select:focus {
    border-color: var(--color-primary);
    outline: none;
}

.font-select option {
    background-color: #0b111e;
    color: #ffffff;
}

.italic-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.italic-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(212, 175, 55, 0.4);
    color: var(--color-text-main);
}

.italic-btn.active {
    background: rgba(212, 175, 55, 0.15);
    border-color: var(--color-primary);
    color: var(--color-primary-hover);
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.2);
}

/* Background image uploader styling */
.upload-bg-container {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn-upload {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1.5px dashed var(--color-border-glow);
    padding: 12px;
    font-size: 12px;
    color: var(--color-text-main);
    transition: var(--transition-smooth);
}

.btn-upload:hover {
    background: rgba(212, 175, 55, 0.08);
    border-color: var(--color-primary);
}

.upload-name-text {
    font-size: 11px;
    color: var(--color-success);
    text-align: center;
    font-style: italic;
}

/* Size Customization CSS */
.custom-size-fields {
    margin-top: 10px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
}

.size-input-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    width: 100%;
}

.size-divider-x {
    font-size: 18px;
    color: var(--color-text-muted);
    font-weight: 700;
    margin-bottom: 8px;
    user-select: none;
}

.flex-1 {
    flex: 1;
}

.size-hint {
    display: block;
    margin-top: 6px;
    font-size: 10px;
    color: var(--color-text-muted);
    font-style: italic;
}

/* Typography Formatting Controls Styling */
.text-format-controls {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 6px;
    width: 100%;
}

.text-format-controls .font-select {
    flex-grow: 1;
}

.size-control {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 0 8px;
    height: 38px;
    color: var(--color-text-muted);
}

.size-control input[type="number"] {
    background: transparent;
    border: none;
    color: var(--color-text-main);
    width: 32px;
    font-size: 12px;
    font-family: inherit;
    text-align: center;
    padding: 0;
}

.size-control input[type="number"]:focus {
    outline: none;
}

/* Remove default spin buttons */
.size-control input[type="number"]::-webkit-inner-spin-button,
.size-control input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.size-control span {
    font-size: 11px;
    color: var(--color-text-muted);
}

.bold-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.bold-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(212, 175, 55, 0.4);
    color: var(--color-text-main);
}

.bold-btn.active {
    background: rgba(212, 175, 55, 0.15);
    border-color: var(--color-primary);
    color: var(--color-primary-hover);
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.2);
}


