/* =========================================
   BASE DESIGN SYSTEM & VARIABLES
   ========================================= */
:root {
    /* Color Palette - Ultra Premium Dark Theme */
    --bg-primary: #09090b; /* Zinc 950 */
    --bg-secondary: #18181b; /* Zinc 900 */
    --glass-bg: rgba(24, 24, 27, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 16px 40px 0 rgba(0, 0, 0, 0.4);

    --text-primary: #f8fafc;
    --text-secondary: #a1a1aa; /* Zinc 400 */

    --accent-primary: #6366f1;
    /* Indigo 500 */
    --accent-primary-hover: #4f46e5;
    --accent-glow: rgba(99, 102, 241, 0.4);

    --success: #10b981;
    --success-hover: #059669;
    --success-glow: rgba(16, 185, 129, 0.4);

    --danger: #ef4444;

    /* Typography */
    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-heading: 'Space Grotesk', var(--font-sans);

    /* Animation Speeds */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

    /* UI Measurements */
    --border-radius-sm: 8px;
    --border-radius-md: 16px;
    --border-radius-lg: 24px;
}

/* Light Theme Variables */
[data-theme="light"] {
    --bg-primary: #f8fafc;
    --bg-secondary: #e2e8f0;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.05);
    --glass-shadow: 0 8px 32px 0 rgba(30, 41, 59, 0.1);

    --text-primary: #0f172a;
    --text-secondary: #475569;

    --accent-primary: #4f46e5;
    --accent-primary-hover: #4338ca;
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* =========================================
   DYNAMIC BACKGROUND (Blobs)
   ========================================= */
.app-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 20s infinite ease-in-out alternate;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
    animation-delay: 0s;
}

.blob-2 {
    bottom: -20%;
    right: -10%;
    width: 70vw;
    height: 70vw;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.12) 0%, rgba(0, 0, 0, 0) 70%);
    animation-delay: -5s;
}

.blob-3 {
    top: 30%;
    left: 40%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.12) 0%, rgba(0, 0, 0, 0) 70%);
    animation-duration: 25s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(5%, 5%) scale(1.1);
    }

    66% {
        transform: translate(-5%, 8%) scale(0.9);
    }

    100% {
        transform: translate(0, 0) scale(1);
    }
}

/* =========================================
   LAYOUT & HEADER
   ========================================= */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

@media (max-width: 768px) {
    .app-header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.8rem;
    font-weight: 700;
    font-family: 'Dancing Script', cursive;
    color: var(--accent-primary);
    letter-spacing: 0.5px;
    text-shadow: 0 2px 10px rgba(99, 102, 241, 0.3);
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.5rem;
    }
}

.logo i {
    font-size: 1.5rem;
    filter: drop-shadow(0 0 8px var(--accent-glow));
}

.step-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.step-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: var(--transition-normal);
    opacity: 0.6;
}

.step-btn.active {
    color: var(--text-primary);
    opacity: 1;
}

.step-btn:not(:disabled):hover {
    color: var(--accent-primary);
    opacity: 1;
}

.step-btn:disabled {
    cursor: not-allowed;
}

.step-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--bg-secondary);
    font-size: 0.8rem;
    transition: var(--transition-normal);
}

.step-btn.active .step-num {
    background: var(--accent-primary);
    color: white;
    box-shadow: 0 0 10px var(--accent-glow);
}

.step-connector {
    width: 40px;
    height: 2px;
    background: var(--glass-border);
}

@media (max-width: 600px) {
    .step-connector {
        display: none;
    }
    
    .step-nav {
        gap: 0.5rem;
    }
    
    .step-btn {
        font-size: 0.9rem;
    }
}

.theme-toggle {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.25rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.theme-toggle:hover {
    background: var(--bg-secondary);
}

/* =========================================
   MAIN CONTAINER & PANELS
   ========================================= */
.app-main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    min-height: calc(100vh - 80px);
}

.step-section {
    display: none;
    animation: fadeIn var(--transition-slow);
}

.step-section.active {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 1024px) {
    .step-section.active {
        grid-template-columns: 1fr;
    }
    
    .controls-panel {
        max-height: none;
        position: relative;
        top: 0;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), var(--glass-shadow);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.glass-panel h2 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    color: var(--text-primary);
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 1rem;
}

.controls-panel {
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-primary) transparent;
    position: sticky;
    top: 90px;
}

.controls-panel::-webkit-scrollbar {
    width: 6px;
}

.controls-panel::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 10px;
}

/* =========================================
   CONTROLS & INPUTS
   ========================================= */
.control-group {
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.control-group label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}

/* Accordion UI */
.accordion-item {
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-sm);
    margin-bottom: 0.75rem;
    background: rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: var(--transition-normal);
}

.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 1rem;
    cursor: pointer;
    background: transparent;
    transition: var(--transition-fast);
}

.accordion-header:hover {
    background: rgba(255, 255, 255, 0.05);
}

.accordion-header h3 {
    font-size: 0.95rem;
    color: var(--text-primary);
    margin: 0;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.accordion-header h3 i {
    font-size: 0.85rem;
    color: var(--accent-primary);
}

.accordion-header>i {
    color: var(--text-secondary);
    font-size: 0.75rem;
    transition: transform var(--transition-normal);
}

.accordion-item.active .accordion-header>i {
    transform: rotate(180deg);
}

.accordion-item.active .accordion-header {
    border-bottom: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.15);
}

.accordion-content {
    max-height: 0;
    padding: 0 1rem;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    overflow: hidden;
}

.accordion-item.active .accordion-content {
    max-height: 1200px;
    padding: 1rem;
    opacity: 1;
    pointer-events: auto;
}

.hidden {
    display: none !important;
}

/* Radio Cards (Shape selector) */
.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.radio-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.6rem 0.4rem;
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition-normal);
    background: rgba(0, 0, 0, 0.1);
    font-size: 0.8rem;
}

.radio-card input {
    position: absolute;
    opacity: 0;
}

.radio-card i {
    font-size: 1.1rem;
    color: var(--text-secondary);
    transition: var(--transition-normal);
}

.radio-card:hover {
    border-color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.05);
}

.radio-card.active {
    border-color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.1);
    box-shadow: inset 0 0 0 1px var(--accent-primary);
}

.radio-card.active i,
.radio-card.active span {
    color: var(--accent-primary);
}

/* Color Picker */
.color-picker-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(0, 0, 0, 0.1);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-md);
    border: 1px solid var(--glass-border);
}

input[type="color"] {
    -webkit-appearance: none;
    appearance: none;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    padding: 0;
    overflow: hidden;
    background: transparent;
}

input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

input[type="color"]::-webkit-color-swatch {
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}

.color-hex {
    font-family: monospace;
    font-size: 0.95rem;
    text-transform: uppercase;
}

.preset-colors {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
}

.preset-color {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform var(--transition-fast);
}

.preset-color.active {
    border-color: white;
    transform: scale(1.1);
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
}

/* Text Inputs */
.glass-input {
    width: 100%;
    padding: 0.8rem 1rem;
    background: rgba(0, 0, 0, 0.1);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 1rem;
    min-height: 48px;
    transition: var(--transition-normal);
}

.glass-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: rgba(0, 0, 0, 0.2);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

/* Toggle Switch */
.toggle-group {
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--glass-border);
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-secondary);
    transition: .4s;
    border-radius: 24px;
    border: 1px solid var(--glass-border);
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--accent-primary);
}

input:checked+.slider:before {
    transform: translateX(24px);
}

/* Buttons */
.primary-btn,
.secondary-btn,
.icon-btn {
    font-family: var(--font-sans);
    font-weight: 600;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all var(--transition-normal);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.primary-btn {
    width: 100%;
    padding: 1rem;
    background: var(--accent-primary);
    color: white;
    border: none;
    font-size: 1.05rem;
    margin-top: 1rem;
}

.primary-btn:hover {
    background: var(--accent-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--accent-glow);
}

.primary-btn.glow-effect:hover {
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.6);
}

.primary-btn.success {
    background: var(--success);
}

.primary-btn.success:hover {
    background: var(--success-hover);
    box-shadow: 0 8px 20px var(--success-glow);
}

.secondary-btn {
    padding: 0.75rem 1.25rem;
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--text-secondary);
}

/* Custom Range Slider */
.glass-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    outline: none;
    margin-top: 0.5rem;
}

.glass-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--text-primary);
    cursor: pointer;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
    border: 2px solid var(--accent-primary);
    transition: transform var(--transition-fast);
}

.glass-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

/* Color Picker Swatches (Signature) */
.preset-color {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform var(--transition-fast), border-color var(--transition-fast);
    padding: 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

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

.preset-color.active {
    border-color: var(--text-primary);
    transform: scale(1.1);
    box-shadow: 0 0 0 2px var(--bg-primary), 0 0 0 4px var(--text-primary);
}

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
}

.icon-btn:hover:not(:disabled) {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

.icon-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* =========================================
   CANVAS PREVIEW AREA (Step 1)
   ========================================= */
.preview-panel {
    display: flex;
    flex-direction: column;
}

.canvas-container {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><rect width="10" height="10" fill="rgba(128,128,128,0.1)"/><rect x="10" y="10" width="10" height="10" fill="rgba(128,128,128,0.1)"/></svg>');
    border: 1px dashed var(--glass-border);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    min-height: 400px;
}

#stamp-preview-canvas {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s;
}

.preview-actions {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
}

#download-stamp-img {
    width: auto;
    padding: 0.75rem 1.5rem;
    border-radius: 30px;
}

/* =========================================
   DOCUMENT STAMPER SECTION (Step 2)
   ========================================= */
#step-2 {
    display: none;
}

#step-2.active {
    display: block;
    /* Override grid for single column layout */
}

/* Upload Panel */
.upload-panel {
    max-width: 800px;
    margin: 4rem auto;
    text-align: center;
}

.drop-zone {
    border: 2px dashed var(--accent-primary);
    border-radius: var(--border-radius-lg);
    padding: 4rem 2rem;
    transition: var(--transition-normal);
    cursor: pointer;
    background: rgba(99, 102, 241, 0.02);
}

.drop-zone:hover,
.drop-zone.dragover {
    background: rgba(99, 102, 241, 0.08);
    border-color: var(--text-primary);
    transform: scale(1.02);
}

.upload-icon-pulse {
    font-size: 4rem;
    color: var(--accent-primary);
    margin-bottom: 2rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 0 0 rgba(99, 102, 241, 0.4));
    }

    50% {
        transform: scale(1.1);
        filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.6));
    }

    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 0 rgba(99, 102, 241, 0.4));
    }
}

.drop-zone h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.text-highlight {
    color: var(--accent-primary);
    font-weight: 600;
}

.file-limits {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 1rem;
}

/* Workspace Area */
.workspace-area {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
}

.workspace-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.2);
    flex-wrap: wrap;
    gap: 1rem;
}

@media (max-width: 768px) {
    .workspace-toolbar {
        justify-content: center;
        flex-direction: column;
        padding: 1.25rem 1rem;
    }
}

.zoom-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(0, 0, 0, 0.1);
    padding: 0.25rem;
    border-radius: 30px;
    border: 1px solid var(--glass-border);
}

#zoom-level {
    font-variant-numeric: tabular-nums;
    min-width: 45px;
    text-align: center;
}

.document-viewer-wrapper {
    flex-grow: 1;
    overflow: auto;
    position: relative;
    padding: 2rem;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><rect width="10" height="10" fill="rgba(128,128,128,0.05)"/><rect x="10" y="10" width="10" height="10" fill="rgba(128,128,128,0.05)"/></svg>');
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 65vh;
}

.document-container {
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    background: white;
    /* Documents are usually white */
    transition: transform 0.2s ease-out;
    transform-origin: top center;
}

/* The physical canvas where PDF or Image is rendered */
#doc-render-canvas {
    display: block;
    max-width: none;
}

#doc-render-image {
    display: block;
    max-width: 100%;
}

/* Draggable Stamp Overlay */
.draggable-stamp {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    /* Start centered */
    cursor: grab;
    z-index: 10;
    touch-action: none;
    user-select: none;
    border: 2px dashed transparent;
    transition: border-color 0.2s;
}

.draggable-stamp:hover {
    border-color: rgba(99, 102, 241, 0.5);
}

.draggable-stamp:active {
    cursor: grabbing;
}

.draggable-stamp img {
    display: block;
    width: 200px;
    /* Default size */
    height: auto;
    pointer-events: none;
    /* Let the wrapper handle events */
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.resize-handle {
    position: absolute;
    width: 16px;
    height: 16px;
    background: white;
    border: 2px solid var(--accent-primary);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 10;
}

@media (max-width: 600px) {
    .resize-handle {
        width: 30px;
        height: 30px;
        opacity: 0.8; /* Make it more visible on mobile by default */
    }
}

.draggable-stamp:hover .resize-handle {
    opacity: 1;
}

.resize-handle.se {
    bottom: -8px;
    right: -8px;
    cursor: se-resize;
}

@media (max-width: 600px) {
    .resize-handle.se {
        bottom: -15px;
        right: -15px;
    }
}

.pdf-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-top: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.2);
}

/* =========================================
   LOADING OVERLAY
   ========================================= */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--glass-border);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .step-section.active {
        grid-template-columns: 380px 1fr;
    }
}

@media (max-width: 1024px) {
    .step-section.active {
        grid-template-columns: 1fr;
    }

    .controls-panel {
        max-height: none;
        position: static;
    }

    .preview-panel {
        min-height: 450px;
    }
}

@media (max-width: 768px) {
    .app-header {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
    }

    .workspace-toolbar {
        flex-direction: column;
        gap: 1rem;
    }

    .app-main {
        padding: 1rem;
    }

    .glass-panel {
        padding: 1rem;
    }
}

/* =========================================
   FOOTER & SEO CONTENT
   ========================================= */
.seo-content-section h2 {
    font-size: 1.8rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.seo-content-section h3 {
    font-size: 1.4rem;
    color: var(--accent-primary);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.seo-content-section p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.app-footer {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--glass-border);
    padding: 2rem 1rem;
    margin-top: 3rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--accent-primary);
    text-decoration: underline;
}

/* =========================================
   COOKIE CONSENT BANNER
   ========================================= */
.cookie-banner {
    position: fixed;
    bottom: -100px;
    left: 0;
    width: 100%;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--glass-border);
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.3);
    padding: 1rem;
    z-index: 2000;
    transition: bottom 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.cookie-banner.show {
    bottom: 0;
}
/* =========================================
   COOKIE BANNER MOBILE OPTIMIZATION
   ========================================= */
@media (max-width: 600px) {
    .cookie-banner {
        padding: 1rem;
    }
    
    .cookie-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .cookie-content p {
        font-size: 0.85rem;
        margin-bottom: 0.5rem;
    }
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.cookie-content p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
}

.cookie-content a {
    color: var(--accent-primary);
    text-decoration: underline;
}

@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}