@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css');

/* Persian Fonts - B Fonts */
@font-face {
    font-family: 'B Nazanin';
    src: url('https://cdn.fontcdn.ir/Font/Persian/B-Nazanin/B-Nazanin.woff2') format('woff2'),
         url('https://cdn.fontcdn.ir/Font/Persian/B-Nazanin/B-Nazanin.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'B Titr';
    src: url('https://cdn.fontcdn.ir/Font/Persian/B-Titr/B-Titr.woff2') format('woff2'),
         url('https://cdn.fontcdn.ir/Font/Persian/B-Titr/B-Titr.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'B Yekan';
    src: url('https://cdn.fontcdn.ir/Font/Persian/B-Yekan/B-Yekan.woff2') format('woff2'),
         url('https://cdn.fontcdn.ir/Font/Persian/B-Yekan/B-Yekan.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'B Mitra';
    src: url('https://cdn.fontcdn.ir/Font/Persian/B-Mitra/B-Mitra.woff2') format('woff2'),
         url('https://cdn.fontcdn.ir/Font/Persian/B-Mitra/B-Mitra.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'B Lotus';
    src: url('https://cdn.fontcdn.ir/Font/Persian/B-Lotus/B-Lotus.woff2') format('woff2'),
         url('https://cdn.fontcdn.ir/Font/Persian/B-Lotus/B-Lotus.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'B Homa';
    src: url('https://cdn.fontcdn.ir/Font/Persian/B-Homa/B-Homa.woff2') format('woff2'),
         url('https://cdn.fontcdn.ir/Font/Persian/B-Homa/B-Homa.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'B Koodak';
    src: url('https://cdn.fontcdn.ir/Font/Persian/B-Koodak/B-Koodak.woff2') format('woff2'),
         url('https://cdn.fontcdn.ir/Font/Persian/B-Koodak/B-Koodak.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'B Badr';
    src: url('https://cdn.fontcdn.ir/Font/Persian/B-Badr/B-Badr.woff2') format('woff2'),
         url('https://cdn.fontcdn.ir/Font/Persian/B-Badr/B-Badr.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'B Zar';
    src: url('https://cdn.fontcdn.ir/Font/Persian/B-Zar/B-Zar.woff2') format('woff2'),
         url('https://cdn.fontcdn.ir/Font/Persian/B-Zar/B-Zar.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'B Traffic';
    src: url('https://cdn.fontcdn.ir/Font/Persian/B-Traffic/B-Traffic.woff2') format('woff2'),
         url('https://cdn.fontcdn.ir/Font/Persian/B-Traffic/B-Traffic.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'B Roya';
    src: url('https://cdn.fontcdn.ir/Font/Persian/B-Roya/B-Roya.woff2') format('woff2'),
         url('https://cdn.fontcdn.ir/Font/Persian/B-Roya/B-Roya.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'B Kamran';
    src: url('https://cdn.fontcdn.ir/Font/Persian/B-Kamran/B-Kamran.woff2') format('woff2'),
         url('https://cdn.fontcdn.ir/Font/Persian/B-Kamran/B-Kamran.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'B Farnaz';
    src: url('https://cdn.fontcdn.ir/Font/Persian/B-Farnaz/B-Farnaz.woff2') format('woff2'),
         url('https://cdn.fontcdn.ir/Font/Persian/B-Farnaz/B-Farnaz.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'B Morvarid';
    src: url('https://cdn.fontcdn.ir/Font/Persian/B-Morvarid/B-Morvarid.woff2') format('woff2'),
         url('https://cdn.fontcdn.ir/Font/Persian/B-Morvarid/B-Morvarid.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'B Shapour';
    src: url('https://cdn.fontcdn.ir/Font/Persian/B-Shapour/B-Shapour.woff2') format('woff2'),
         url('https://cdn.fontcdn.ir/Font/Persian/B-Shapour/B-Shapour.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'B Setareh';
    src: url('https://cdn.fontcdn.ir/Font/Persian/B-Setareh/B-Setareh.woff2') format('woff2'),
         url('https://cdn.fontcdn.ir/Font/Persian/B-Setareh/B-Setareh.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    /* Modern Color Palette */
    --primary: 251 63% 51%;     /* #6366f1 - Modern indigo */
    --primary-dark: 251 63% 45%; /* #5855eb */
    --secondary: 217 91% 59%;    /* #3b82f6 - Bright blue */
    --accent: 142 76% 47%;       /* #10b981 - Fresh green */
    --danger: 0 84% 60%;         /* #ef4444 - Modern red */
    --warning: 45 93% 58%;       /* #f59e0b - Warm orange */
    
    /* Neutral Colors */
    --background: 220 13% 97%;   /* #f8fafc - Very light blue-gray */
    --surface: 0 0% 100%;        /* #ffffff - Pure white */
    --surface-secondary: 220 14% 96%; /* #f1f5f9 - Light gray-blue */
    --border: 220 13% 91%;       /* #e2e8f0 - Light border */
    --border-light: 220 13% 95%; /* #f1f5f9 - Very light border */
    
    /* Text Colors */
    --text-primary: 222 84% 5%;  /* #0f172a - Very dark blue */
    --text-secondary: 215 25% 27%; /* #374151 - Dark gray */
    --text-muted: 215 16% 47%;   /* #6b7280 - Medium gray */
    --text-light: 220 9% 59%;    /* #94a3b8 - Light gray */
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    /* Spacing */
    --space-xs: 0.25rem; 
    --space-sm: 0.5rem; 
    --space-md: 1rem;  
    --space-lg: 1.5rem;   
    --space-xl: 2rem;    
    --space-2xl: 3rem;  
    
    /* Border Radius */
    --radius-sm: 0.375rem;  
    --radius: 0.5rem;      
    --radius-md: 0.75rem;  
    --radius-lg: 1rem;    
    --radius-xl: 1.5rem;   
    
    /* Transitions */
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: Helvetica, 'Helvetica Neue', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #f8fafc;
    color: hsl(var(--text-primary));
    line-height: 1.6;
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
    overflow-x: hidden;
    caret-color: transparent;
    min-height: 100vh;
}

/* Header Styles */
.app-header {
    background: linear-gradient(135deg, hsl(var(--primary)) 0%, hsl(var(--secondary)) 100%);
    color: white;
    padding: var(--space-md) var(--space-2xl);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.app-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Ccircle cx='30' cy='30' r='1'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
    pointer-events: none;
}

.header-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-title {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.header-icon {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
}

.export-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.export-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.logout-btn {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    gap: 6px;
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: rgba(239, 68, 68, 0.4);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    color: #dc2626;
}

.header-buttons {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.user-info-btn {
    background: rgba(139, 69, 19, 0.2);
    border: 1px solid rgba(139, 69, 19, 0.3);
    color: white;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.user-info-btn:hover:not(:disabled) {
    background: rgba(139, 69, 19, 0.3);
    border-color: rgba(139, 69, 19, 0.4);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.user-info-btn:disabled {
    background: rgba(139, 69, 19, 0.1);
    border-color: rgba(139, 69, 19, 0.2);
    color: rgba(255, 255, 255, 0.5);
    cursor: not-allowed;
    transform: none;
}

.app-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0;
    letter-spacing: -0.025em;
}

/* Export Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal-overlay.show {
    display: flex;
}

.modal-container {
    background: hsl(var(--surface));
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
}

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

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg);
    border-bottom: 1px solid hsl(var(--border));
    background: hsl(var(--surface-secondary));
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: hsl(var(--text-primary));
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: hsl(var(--text-muted));
    cursor: pointer;
    padding: var(--space-xs);
    border-radius: var(--radius);
    transition: var(--transition);
}

.close-btn:hover {
    background: hsl(var(--danger) / 0.1);
    color: hsl(var(--danger));
}

.modal-body {
    padding: var(--space-lg);
    max-height: 60vh;
    overflow-y: auto;
}

.export-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.export-option {
    padding: var(--space-lg);
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    text-align: center;
}

.export-option h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
    color: hsl(var(--text-primary));
}

.export-option p {
    color: hsl(var(--text-muted));
    font-size: 0.875rem;
    margin-bottom: var(--space-lg);
}

.preview-container {
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    padding: var(--space-md);
    background: hsl(var(--surface-secondary));
    max-height: 300px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    white-space: pre-wrap;
}

/* Main Options Modal Styles */
.options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    margin-top: var(--space-md);
}

.option-card {
    background: hsl(var(--surface));
    border: 2px solid hsl(var(--border));
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.option-card:hover {
    border-color: hsl(var(--primary));
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.option-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, hsl(var(--primary)), hsl(var(--secondary)));
    opacity: 0;
    transition: var(--transition);
}

.option-card:hover::before {
    opacity: 1;
}

.option-icon {
    font-size: 3rem;
    margin-bottom: var(--space-md);
    display: block;
}

.option-card h4 {
    color: hsl(var(--text-primary));
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.option-card p {
    color: hsl(var(--text-secondary));
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: var(--space-lg);
}

.option-card .btn {
    width: 100%;
    justify-content: center;
    gap: var(--space-sm);
}

/* Responsive design for options grid */
@media (max-width: 768px) {
    .options-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
    
    .option-card {
        padding: var(--space-lg);
    }
    
    .option-icon {
        font-size: 2.5rem;
    }
}

/* Main App Layout */
.app {
    display: flex;
    height: calc(100vh - 80px);
    gap: 1px;
    background: hsl(var(--border));
    position: relative;
}

/* Element Panel */
.element-panel {
    width: 300px;
    background: hsl(var(--surface));
    border-right: 1px solid hsl(var(--border));
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow);
}

.panel-header {
    padding: var(--space-md);
    border-bottom: 1px solid hsl(var(--border-light));
}

.panel-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: hsl(var(--text-primary));
    margin-bottom: 0;
}

.elements-grid {
    padding: var(--space-md);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-sm);
}

.element {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm);
    background: hsl(var(--surface-secondary));
    border: 1px solid hsl(var(--border-light));
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    color: hsl(var(--text-secondary));
    text-align: center;
    font-size: 0.75rem;
}

.element:hover {
    background: hsl(var(--primary) / 0.05);
    border-color: hsl(var(--primary) / 0.2);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.element-icon {
    font-size: 1.25rem;
    opacity: 0.8;
}

/* Design Area */
.design-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: hsl(var(--surface-secondary));
    align-content: center;
}

.design-canvas {
    flex: 1;
    padding: var(--space-2xl);
    overflow: auto;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.content-container {
    width: 100%;
    max-width: 800px;
    min-height: 600px;
    background: hsl(var(--surface));
    box-shadow: var(--shadow-xl);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    position: relative;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 400px;
    text-align: center;
    opacity: 0.6;
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: var(--space-lg);
}

.empty-state h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: var(--space-md);
    color: hsl(var(--text-secondary));
}

.empty-state p {
    color: hsl(var(--text-muted));
    max-width: 280px;
}

/* Canvas Blocks */
.canvas-block {
    transition: var(--transition-slow);
    position: relative;
    border-radius: var(--radius);
    margin: 0;
    cursor: pointer;
}

.canvas-block:hover {
    background-color: hsl(var(--primary) / 0.02);
    box-shadow: 0 0 0 1px hsl(var(--primary) / 0.1);
}

.canvas-block.selected {
    outline: 3px solid hsl(var(--primary));
    outline-offset: 3px;
    background: linear-gradient(135deg, hsl(var(--primary) / 0.08) 0%, hsl(var(--primary) / 0.03) 100%);
    box-shadow: 
        0 0 0 1px hsl(var(--primary) / 0.1),
        0 8px 32px hsl(var(--primary) / 0.15),
        0 4px 16px hsl(var(--primary) / 0.1);
    border-radius: var(--radius-lg);
    transform: translateY(-1px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.canvas-block.selected::before {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    background: linear-gradient(45deg, hsl(var(--primary) / 0.1), transparent, hsl(var(--primary) / 0.1));
    border-radius: var(--radius-lg);
    z-index: -1;
    animation: selectedGlow 2s ease-in-out infinite alternate;
}

@keyframes selectedGlow {
    from {
        opacity: 0.3;
        transform: scale(1);
    }
    to {
        opacity: 0.6;
        transform: scale(1.02);
    }
}

/* Multi-select styles */
.canvas-block.multi-selected {
    outline: 3px solid hsl(var(--accent));
    outline-offset: 3px;
    background: linear-gradient(135deg, hsl(var(--accent) / 0.08) 0%, hsl(var(--accent) / 0.03) 100%);
    box-shadow: 
        0 0 0 1px hsl(var(--accent) / 0.1),
        0 8px 32px hsl(var(--accent) / 0.15),
        0 4px 16px hsl(var(--accent) / 0.1);
    border-radius: var(--radius-lg);
    transform: translateY(-1px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.canvas-block.multi-selected::before {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    background: linear-gradient(45deg, hsl(var(--accent) / 0.1), transparent, hsl(var(--accent) / 0.1));
    border-radius: var(--radius-lg);
    z-index: -1;
    animation: multiSelectedGlow 2s ease-in-out infinite alternate;
}

@keyframes multiSelectedGlow {
    from {
        opacity: 0.3;
        transform: scale(1);
    }
    to {
        opacity: 0.6;
        transform: scale(1.02);
    }
}

/* Hover effects for selected elements */
.canvas-block.selected:hover,
.canvas-block.multi-selected:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 0 0 1px hsl(var(--primary) / 0.2),
        0 12px 40px hsl(var(--primary) / 0.2),
        0 6px 20px hsl(var(--primary) / 0.15);
}

.canvas-block.multi-selected:hover {
    box-shadow: 
        0 0 0 1px hsl(var(--accent) / 0.2),
        0 12px 40px hsl(var(--accent) / 0.2),
        0 6px 20px hsl(var(--accent) / 0.15);
}

/* Selection indicators */
.canvas-block.selected::after,
.canvas-block.multi-selected::after {
    content: '✓';
    position: absolute;
    top: -12px;
    right: -12px;
    width: 24px;
    height: 24px;
    background: hsl(var(--primary));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    box-shadow: var(--shadow-md);
    z-index: 10;
    animation: selectionIndicator 0.3s ease-out;
}

.canvas-block.multi-selected::after {
    background: hsl(var(--accent));
    color: hsl(var(--accent-foreground));
}

@keyframes selectionIndicator {
    from {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    to {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

/* Selection count indicator for multi-select */
.canvas-block.multi-selected::after {
    color: white;
    content: attr(data-selection-index);
    font-size: 10px;
    font-weight: 700;
}

/* Enhanced focus states */
.canvas-block.selected:focus,
.canvas-block.multi-selected:focus {
    outline: 4px solid hsl(var(--ring));
    outline-offset: 4px;
}

/* Selection animation on add/remove */
.canvas-block {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.canvas-block.selected,
.canvas-block.multi-selected {
    animation: selectionPulse 0.5s ease-out;
}

@keyframes selectionPulse {
    0% {
        transform: scale(1) translateY(0);
    }
    50% {
        transform: scale(1.02) translateY(-2px);
    }
    100% {
        transform: scale(1) translateY(-1px);
    }
}

.selection-box {
    position: absolute;
    border: 2px dashed hsl(var(--primary));
    background-image: radial-gradient(circle, hsl(var(--primary) / 0.6) 1px, transparent 1px);
    background-size: 4px 4px;
    pointer-events: none;
    z-index: 1000;
    border-radius: var(--radius);
    box-shadow: 0 0 0 1px hsl(var(--primary) / 0.2);
    animation: selectionPulse 1s ease-in-out infinite alternate;
}

@keyframes selectionPulse {
    from {
        border-color: hsl(var(--primary));
        box-shadow: 0 0 0 1px hsl(var(--primary) / 0.2), 0 0 10px hsl(var(--primary) / 0.1);
    }
    to {
        border-color: hsl(var(--primary) / 0.7);
        box-shadow: 0 0 0 2px hsl(var(--primary) / 0.3), 0 0 20px hsl(var(--primary) / 0.2);
    }
}

.design-canvas {
    position: relative;
    user-select: none;
}

/* Canvas Toolbar - Subtle Glass Design */
.canvas-toolbar {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 14px;
    padding: 8px 16px;
    display: flex;
    gap: 12px;
    align-items: center;
    backdrop-filter: blur(15px) saturate(150%);
    box-shadow: 
        0 6px 18px rgba(0, 0, 0, 0.12),
        0 3px 8px rgba(0, 0, 0, 0.08),
        0 1px 4px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05);
    z-index: 900;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.canvas-toolbar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.2) 0%, 
        rgba(255, 255, 255, 0.05) 50%, 
        rgba(255, 255, 255, 0.02) 100%);
    border-radius: 14px;
    z-index: -1;
}

.canvas-toolbar::after {
    content: '';
    position: absolute;
    top: 1px;
    left: 1px;
    right: 1px;
    bottom: 1px;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.1) 0%, 
        rgba(255, 255, 255, 0.02) 50%, 
        transparent 100%);
    border-radius: 13px;
    z-index: -1;
}

.canvas-toolbar:hover {
    background: rgba(255, 255, 255, 0.35);
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.15),
        0 4px 12px rgba(0, 0, 0, 0.1),
        0 2px 6px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        inset 0 -1px 0 rgba(0, 0, 0, 0.08);
    transform: translateX(-50%) translateY(-1px) scale(1.01);
}

.toolbar-group {
    display: flex;
    gap: 8px;
    align-items: center;
    position: relative;
}

.toolbar-group:not(:last-child)::after {
    content: '';
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 24px;
    background: linear-gradient(to bottom, 
        transparent 0%, 
        rgba(0, 0, 0, 0.1) 20%, 
        rgba(0, 0, 0, 0.15) 50%, 
        rgba(0, 0, 0, 0.1) 80%, 
        transparent 100%);
}

.toolbar-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.3);
    color: rgba(0, 0, 0, 0.7);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(8px);
    box-shadow: 
        0 2px 6px rgba(0, 0, 0, 0.08),
        0 1px 3px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05);
}

.toolbar-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.2) 0%, 
        rgba(255, 255, 255, 0.05) 50%, 
        rgba(255, 255, 255, 0.02) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 10px;
}

.toolbar-btn::after {
    content: '';
    position: absolute;
    top: 1px;
    left: 1px;
    right: 1px;
    bottom: 1px;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.15) 0%, 
        rgba(255, 255, 255, 0.03) 50%, 
        transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 9px;
}

.toolbar-btn:hover {
    background: rgba(255, 255, 255, 0.5);
    color: rgba(0, 0, 0, 0.8);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 
        0 6px 16px rgba(0, 0, 0, 0.15),
        0 3px 8px rgba(0, 0, 0, 0.1),
        0 1px 4px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.6),
        inset 0 -1px 0 rgba(0, 0, 0, 0.08);
}

.toolbar-btn:hover::before {
    opacity: 1;
}

.toolbar-btn:hover::after {
    opacity: 1;
}

.toolbar-btn.active {
    background: linear-gradient(135deg, 
        rgba(99, 102, 241, 0.6) 0%, 
        rgba(139, 92, 246, 0.6) 100%);
    color: white;
    box-shadow: 
        0 6px 16px rgba(99, 102, 241, 0.3),
        0 3px 8px rgba(139, 92, 246, 0.2),
        0 1px 4px rgba(99, 102, 241, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    transform: translateY(-1px) scale(1.03);
}

.toolbar-btn.active::before {
    opacity: 0;
}

.toolbar-btn.active::after {
    opacity: 0;
}

.toolbar-btn i {
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.1));
}

.toolbar-btn:hover i {
    transform: scale(1.1);
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.toolbar-btn.active i {
    transform: scale(1.05);
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.1));
}

/* Toolbar animations */
@keyframes toolbarSlideIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }
}

.canvas-toolbar {
    animation: toolbarSlideIn 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Setting Info Styles - Modern Glass Design */
.setting-info {
    color: black;
    background: none;
    font-weight: normal;
    font-size: 1rem;
    padding: 0;
    margin: 0 0 1em 0;
    border: none;
    box-shadow: none;
}



.setting-info p {
    margin: 0;
    color: rgba(0, 0, 0, 0.6);
    font-size: 0.95rem;
    line-height: 1.6;
    font-style: italic;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
}


@keyframes infoGlow {
    from {
        filter: drop-shadow(0 0 2px rgba(99, 102, 241, 0.3));
    }
    to {
        filter: drop-shadow(0 0 6px rgba(99, 102, 241, 0.6));
    }
}

/* Lucide Icons in Toolbar */
.toolbar-btn i[data-lucide] {
    width: 22px;
    height: 22px;
    stroke-width: 2.2;
    stroke: currentColor;
    fill: none;
    transition: all 0.3s ease;
}

/* Background Theme Classes */
.theme-gradient-sunset {
    background: linear-gradient(135deg, #ff6b6b 0%, #feca57 50%, #ff9ff3 100%);
}

.theme-gradient-ocean {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.theme-gradient-forest {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.theme-gradient-purple {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}

.theme-gradient-fire {
    background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
}

.theme-animated-gradient {
    background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}



/* Theme Animations */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}



/* Multi-select UI styles */
.selected-elements-list {
    max-height: 200px;
    overflow-y: auto;
    border: 2px solid hsl(var(--primary) / 0.1);
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, hsl(var(--surface)) 0%, hsl(var(--muted) / 0.1) 100%);
    margin-top: var(--space-sm);
    box-shadow: var(--shadow-md), inset 0 0 20px hsl(var(--primary) / 0.05);
    backdrop-filter: blur(5px);
}

.selected-element-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md);
    border-bottom: 1px solid hsl(var(--border));
    transition: var(--transition);
    position: relative;
}

.selected-element-item:last-child {
    border-bottom: none;
}

.selected-element-item:hover {
    background: hsl(var(--muted) / 0.5);
    transform: translateX(2px);
}

.selected-element-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: hsl(var(--primary));
    border-radius: 0 var(--radius) var(--radius) 0;
    opacity: 0;
    transition: var(--transition);
}

.selected-element-item:hover::before {
    opacity: 1;
}

.element-type {
    font-size: 0.875rem;
    font-weight: 600;
    color: hsl(var(--text-primary));
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.element-type::before {
    content: '📦';
    font-size: 1rem;
}

.remove-element-btn {
    background: linear-gradient(135deg, hsl(var(--muted)) 0%, hsl(var(--destructive) / 0.1) 100%);
    border: 2px solid hsl(var(--border));
    color: hsl(var(--text-muted));
    cursor: pointer;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    backdrop-filter: blur(5px);
    box-shadow: var(--shadow-sm);
}

.remove-element-btn:hover {
    background: linear-gradient(135deg, hsl(var(--destructive)) 0%, hsl(var(--destructive-dark)) 100%);
    color: hsl(var(--destructive-foreground));
    border-color: hsl(var(--destructive));
    transform: scale(1.1) rotate(5deg);
    box-shadow: var(--shadow-lg), 0 0 15px hsl(var(--destructive) / 0.3);
}

/* Multi-select property panel styling */
#multiSelectProps {
    background: linear-gradient(135deg, hsl(var(--surface)) 0%, hsl(var(--muted) / 0.3) 100%);
    border-radius: var(--radius-lg);
    border: 2px solid hsl(var(--primary) / 0.2);
    box-shadow: var(--shadow-lg), 0 0 20px hsl(var(--primary) / 0.1);
    position: relative;
    overflow: hidden;
}

#multiSelectProps::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, hsl(var(--primary)), hsl(var(--primary-dark)), hsl(var(--primary)));
    background-size: 200% 100%;
    animation: gradientShift 2s ease-in-out infinite;
}

#multiSelectProps .form-section {
    background: hsl(var(--surface));
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-lg);
    border: 1px solid hsl(var(--border));
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

#multiSelectProps .form-section:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-1px);
}

#multiSelectProps .form-section h4 {
    background: linear-gradient(135deg, hsl(var(--primary) / 0.15) 0%, hsl(var(--primary) / 0.05) 100%);
    color: hsl(var(--primary));
    padding: var(--space-lg);
    margin: 0;
    border-bottom: 1px solid hsl(var(--border));
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#multiSelectProps .form-group {
    padding: var(--space-lg);
}

#multiSelectProps .btn {
    border-radius: var(--radius-lg);
    font-weight: 600;
    padding: var(--space-md) var(--space-lg);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
}

#multiSelectProps .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;
}

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

#multiSelectProps .btn-primary {
    background: linear-gradient(135deg, hsl(var(--primary)) 0%, hsl(var(--primary-dark)) 100%);
    color: hsl(var(--primary-foreground));
    box-shadow: var(--shadow-md);
}

#multiSelectProps .btn-primary:hover {
    background: linear-gradient(135deg, hsl(var(--primary-dark)) 0%, hsl(var(--primary)) 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

#multiSelectProps .btn-outline {
    background: hsl(var(--surface));
    color: hsl(var(--text-primary));
    border-color: hsl(var(--border));
    box-shadow: var(--shadow-sm);
}

#multiSelectProps .btn-outline:hover {
    background: hsl(var(--muted));
    border-color: hsl(var(--primary));
    color: hsl(var(--primary));
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

#multiSelectProps .btn-danger {
    background: linear-gradient(135deg, hsl(var(--destructive)) 0%, hsl(var(--destructive-dark)) 100%);
    color: hsl(var(--destructive-foreground));
    box-shadow: var(--shadow-md);
}

#multiSelectProps .btn-danger:hover {
    background: linear-gradient(135deg, hsl(var(--destructive-dark)) 0%, hsl(var(--destructive)) 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

#multiSelectProps .btn-sm {
    padding: var(--space-sm) var(--space-md);
    font-size: 0.875rem;
}

#selectedCount {
    background: linear-gradient(135deg, hsl(var(--primary)) 0%, hsl(var(--primary-dark)) 100%);
    color: white;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-lg);
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid hsl(var(--primary) / 0.2);
}

/* Alignment Classes */
.align-left {
    text-align: left;
    justify-content: flex-start;
}

.align-center {
    text-align: center;
    justify-content: center;
}

.align-right {
    text-align: right;
    justify-content: flex-end;
}

/* Button Styles */
.button-block {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.button-block button,
.button-block a {
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 40px;
    font-family: inherit;
    line-height: 1;
}

/* Button Variations */
.button-solid {
    background: hsl(var(--primary));
    color: white;
}

.button-solid:hover {
    background: hsl(var(--primary-dark));
    transform: translateY(-1px);
}

.button-outline {
    background: transparent;
    border: 2px solid hsl(var(--primary)) !important;
    color: hsl(var(--primary));
    padding: 10px 22px;
}

.button-outline:hover {
    background: hsl(var(--primary));
    color: white;
}

.button-ghost {
    background: transparent;
    color: hsl(var(--primary));
}

.button-ghost:hover {
    background: hsl(var(--primary) / 0.1);
}

.button-gradient {
    background: linear-gradient(135deg, hsl(var(--primary)) 0%, hsl(var(--secondary)) 100%);
    color: white;
}

.button-gradient:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.button-rounded {
    background: hsl(var(--primary));
    color: white;
    border-radius: 25px !important;
}

.button-rounded:hover {
    background: hsl(var(--primary-dark));
    transform: translateY(-1px);
}



/* Gallery Styles */
.gallery-block {
    width: 100%;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-md);
    max-width: 100%;
}

.gallery-masonry {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: var(--space-sm);
    max-width: 100%;
}

.gallery-carousel {
    display: flex;
    gap: var(--space-sm);
    overflow-x: auto;
    padding: var(--space-sm);
    scrollbar-width: thin;
    scrollbar-color: hsl(var(--border)) transparent;
}

.gallery-carousel::-webkit-scrollbar {
    height: 6px;
}

.gallery-carousel::-webkit-scrollbar-track {
    background: transparent;
}

.gallery-carousel::-webkit-scrollbar-thumb {
    background: hsl(var(--border));
    border-radius: 3px;
}

.gallery-carousel::-webkit-scrollbar-thumb:hover {
    background: hsl(var(--text-muted));
}

.gallery-image {
    aspect-ratio: 1;
    border-radius: var(--radius);
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border: 1px solid hsl(var(--border));
    transition: all 0.2s ease;
    cursor: pointer;
}

.gallery-image:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

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

.gallery-placeholder {
    text-align: center;
    color: hsl(var(--text-muted));
    font-size: 0.875rem;
    padding: var(--space-xl);
    border: 2px dashed hsl(var(--border));
    border-radius: var(--radius);
    background: hsl(var(--surface-secondary));
}

/* Gallery Image List Improvements */
.gallery-image-list .list-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm);
    background: hsl(var(--surface));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    margin-bottom: var(--space-xs);
    transition: var(--transition);
}

.gallery-image-list .list-item:hover {
    border-color: hsl(var(--primary) / 0.3);
    background: hsl(var(--surface-secondary));
}

.gallery-image-list .list-item img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid hsl(var(--border));
    cursor: pointer;
    transition: var(--transition);
}

.gallery-image-list .list-item img:hover {
    transform: scale(1.1);
    border-color: hsl(var(--primary));
}

/* Divider Styles */
.divider-line {
    border-radius: 10px;
}

.divider-text-between {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.divider-text-between::before,
.divider-text-between::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--line-color, hsl(var(--border)));
    border-radius: 10px;
}

.divider-text {
    white-space: nowrap;
    font-size: 0.875rem;
    color: hsl(var(--text-muted));
}

/* Video Styles */
.video-block {
    width: 100%;
    max-width: 100%;
}

.video-block video {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 400px;
    border-radius: var(--radius);
}

.video-upload {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-2xl);
    border: 2px dashed hsl(var(--border));
    border-radius: var(--radius);
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.video-upload:hover {
    border-color: hsl(var(--primary));
    background: hsl(var(--primary) / 0.02);
}

/* Messenger Styles */
.messenger-block {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.messenger-btn {
    padding: var(--space-sm) var(--space-md);
    border: none;
    border-radius: var(--radius);
    color: white;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    transition: var(--transition);
}

.messenger-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Social Links Styles */
.social-block {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.social-link {
    padding: var(--space-sm) var(--space-md);
    border: none;
    border-radius: var(--radius);
    background: hsl(var(--primary));
    color: white;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    transition: var(--transition);
}

.social-link:hover {
    background: hsl(var(--primary-dark));
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Contact Styles */
.contact-block {
    padding: var(--space-2xl);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
    min-width: 0;
}

/* Contact button grid containers */
.contact-block div[style*="grid-template-columns"] {
    overflow: visible;
    width: 100%;
    min-width: 0;
}

/* Contact button links */
.contact-block a[href] {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

/* Auto full-width indicator */
.checkbox-label small {
    display: block;
    margin-top: 2px;
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: normal;
}

.checkbox-label input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.contact-default {
    background: hsl(var(--surface-secondary));
    border: 1px solid hsl(var(--border));
}

.contact-card {
    background: hsl(var(--surface));
    box-shadow: var(--shadow-lg);
    border: 1px solid hsl(var(--border));
}

.contact-minimal {
    background: transparent;
    border: none;
    padding: var(--space-lg);
}

.contact-content {
    position: relative;
    z-index: 1;
    overflow: hidden;
    border-radius: var(--radius-lg);
}

.contact-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--space-md);
    font-family: inherit;
}

.contact-methods {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
}

.contact-method {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md);
    background: hsl(var(--surface));
    border-radius: var(--radius);
    border: 1px solid hsl(var(--border));
    text-decoration: none;
    color: hsl(var(--text-primary));
    transition: var(--transition);
    font-family: inherit;
}

.contact-method:hover {
    border-color: hsl(var(--primary));
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.contact-method i {
    font-size: 1.25rem;
    color: hsl(var(--primary));
}

/* Event Styles */
.event-block {
    padding: var(--space-2xl);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    overflow: visible;
}

.event-default {
    background: hsl(var(--surface-secondary));
    border: 1px solid hsl(var(--border));
}

.event-card {
    background: hsl(var(--surface));
    box-shadow: var(--shadow-lg);
    border: 1px solid hsl(var(--border));
}

.event-minimal {
    background: transparent;
    border: none;
    padding: var(--space-lg);
}

.event-content {
    position: relative;
    z-index: 1;
    overflow: hidden;
    border-radius: var(--radius-lg);
}

.event-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--space-md);
    font-family: inherit;
}

.event-text {
    margin-bottom: var(--space-lg);
    line-height: 1.6;
    font-family: inherit;
}

.event-button {
    padding: var(--space-sm) var(--space-lg);
    border: none;
    border-radius: var(--radius);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
    font-family: inherit;
}

.event-button:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Profile Styles */
.profile-block {
    overflow: visible;
    position: relative;
}

.profile-default {
    background: hsl(var(--surface));
    overflow: visible;
}

.profile-minimal {
    background: transparent;
    border: none;
}

.profile-banner {
    height: 120px;
    background: linear-gradient(135deg, hsl(var(--primary)) 0%, hsl(var(--secondary)) 100%);
    position: relative;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.profile-logo {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: hsl(var(--surface));
    border: 4px solid hsl(var(--surface));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: hsl(var(--primary));
    overflow: hidden;
}

.profile-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.profile-content {
    padding: 60px var(--space-lg) var(--space-lg) var(--space-lg);
    text-align: center;
    overflow: hidden;
}

.profile-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
    color: hsl(var(--text-primary));
    font-family: inherit;
}

.profile-title {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: var(--space-md);
    color: hsl(var(--text-secondary));
    font-family: inherit;
}

.profile-description {
    font-size: 0.875rem;
    line-height: 1.6;
    color: hsl(var(--text-muted));
    font-family: inherit;
}

.profile-minimal .profile-banner {
    height: 80px;
    background: transparent;
}

/* Logo Style Variations */
.profile-logo.logo-circle {
    border-radius: 50% !important;
}

.profile-logo.logo-square {
    border-radius: 0 !important;
}

.profile-logo.logo-rounded {
    border-radius: 12px !important;
}

.profile-logo.logo-hexagon {
    border-radius: 0 !important;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

/* Logo image variations */
.profile-logo.logo-circle img {
    border-radius: 50% !important;
}

.profile-logo.logo-square img {
    border-radius: 0 !important;
}

.profile-logo.logo-rounded img {
    border-radius: 12px !important;
}

.profile-logo.logo-hexagon img {
    border-radius: 0 !important;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

/* Logo border improvements */
.profile-logo {
    box-sizing: border-box;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    /* Ensure borders render properly in all browsers */
    background-clip: padding-box;
    -webkit-background-clip: padding-box;
    -moz-background-clip: padding-box;
}

.profile-logo img {
    display: block;
    margin: 0;
    padding: 0;
    /* Ensure image fits perfectly within logo container */
    box-sizing: border-box;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
}

/* Logo position variations for different layouts */
.profile-logo.logo-left {
    left: 24px !important;
    transform: translateX(0) !important;
}

.profile-logo.logo-right {
    right: 24px !important;
    left: auto !important;
    transform: translateX(0) !important;
}

.profile-logo.logo-center {
    left: 50% !important;
    transform: translateX(-50%) !important;
}


/* Enhanced Text Cursor Visibility */
input[type="text"], 
textarea {
    caret-color: hsl(var(--primary));
    /* Ensure cursor is always visible */
    caret-shape: block;
    font-family: inherit;
}

/* Enhanced focus states for better cursor visibility */
input[type="text"]:focus, 
textarea:focus {
    caret-color: hsl(var(--primary));
    outline: 2px solid hsl(var(--primary));
    outline-offset: 1px;
    background: hsla(var(--primary), 0.08);
    box-shadow: 0 0 0 3px hsla(var(--primary), 0.1);
    transition: all 0.2s ease;
}

/* Properties panel specific enhancements */
.properties-panel input[type="text"],
.properties-panel textarea {
    caret-color: hsl(var(--primary));
    border: 2px solid hsl(var(--border));
    transition: all 0.2s ease;
}

.properties-panel input[type="text"]:focus,
.properties-panel textarea:focus {
    border-color: hsl(var(--primary));
    background: white;
    caret-color: hsl(var(--primary));
}

/* Enhanced text selection styling */
input[type="text"]::selection,
textarea::selection {
    background: hsl(var(--primary));
    color: white;
}

/* Make placeholder text more visible when focused */
input[type="text"]:focus::placeholder,
textarea:focus::placeholder {
    color: hsla(var(--text-muted), 0.6);
    font-style: italic;
}

/* Icon Protection - Prevent font changes from affecting icons */
i[class*="fa-"],
.fas,
.fab,
.far,
.fal,
.fad,
.fass,
.fasr,
.fasl {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands", "Font Awesome 6 Pro" !important;
    font-weight: 900 !important;
    font-style: normal !important;
}

/* Specific icon protection for brand icons */
.fab {
    font-family: "Font Awesome 6 Brands" !important;
    font-weight: 400 !important;
}

/* Ensure icons maintain their styling regardless of parent font */
.contact-method i,
.messenger-btn i,
.social-link i,
.canvas-block i[class*="fa-"],
.messenger-container i,
.contact-block i,
.social-block i {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands" !important;
    font-weight: 900 !important;
    font-style: normal !important;
}

.canvas-block .fab,
.messenger-container .fab,
.contact-block .fab,
.social-block .fab {
    font-family: "Font Awesome 6 Brands" !important;
    font-weight: 400 !important;
}

/* Additional protection for dynamically generated content */
*[class*="fa-"] {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
}

*[class*="fab"] {
    font-family: "Font Awesome 6 Brands" !important;
    font-weight: 400 !important;
}

/* Properties Panel */
.properties-panel {
    width: 300px; 
    background: hsl(var(--surface));
    border-left: 1px solid hsl(var(--border));
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow);
}

.empty-properties {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-2xl);
    text-align: center;
    opacity: 0.6;
    height: 300px;
}

.empty-properties .empty-icon {
    font-size: 2rem;
    margin-bottom: var(--space-md);
}

.empty-properties h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
    color: hsl(var(--text-secondary));
}

.empty-properties p {
    color: hsl(var(--text-muted));
    max-width: 200px;
    font-size: 0.875rem;
}

.property-form {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-md);
}

.form-section {
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid hsl(var(--border-light));
}

.form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.form-section h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: hsl(var(--text-primary));
    margin-bottom: var(--space-md);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-group {
    margin-bottom: var(--space-md);
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: hsl(var(--text-secondary));
    margin-bottom: var(--space-xs);
}

.form-control {
    width: 100%;
    padding: var(--space-sm);
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-family: inherit;
    background: hsl(var(--surface));
    color: hsl(var(--text-primary));
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: hsl(var(--primary));
    box-shadow: 0 0 0 3px hsl(var(--primary) / 0.1);
}

.color-input {
    height: 40px;
    min-width: 60px;
    padding: 4px;
    border: 2px solid hsl(var(--border));
    border-radius: 8px;
    cursor: pointer;
    background: hsl(var(--surface));
    transition: all 0.3s ease;
}

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

.color-input:focus {
    outline: none;
    border-color: hsl(var(--primary));
    box-shadow: 0 0 0 3px hsl(var(--primary) / 0.1);
}

/* Spacing Controls */
.spacing-controls {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.spacing-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.spacing-group > label {
    font-size: 0.875rem;
    font-weight: 500;
    color: hsl(var(--text-secondary));
}

.spacing-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-sm);
}

.spacing-input-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.spacing-input-group label {
    font-size: 0.75rem;
    color: hsl(var(--text-muted));
    text-align: center;
}

.spacing-input {
    text-align: center;
    font-size: 0.75rem;
    padding: var(--space-xs);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
}

.btn-action {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.875rem;
}

/* Button Styles */
.btn {
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    justify-content: center;
    text-decoration: none;
}

.btn-primary {
    background: hsl(var(--primary));
    color: white;
}

.btn-primary:hover {
    background: hsl(var(--primary-dark));
}

.btn-secondary {
    background: hsl(var(--text-muted));
    color: white;
}

.btn-secondary:hover {
    background: hsl(var(--text-secondary));
}

.btn-danger {
    background: hsl(var(--danger));
    color: white;
}

.btn-danger:hover {
    background: hsl(var(--danger) / 0.9);
}

.btn-outline {
    background: transparent;
    border: 1px solid hsl(var(--border));
    color: hsl(var(--text-secondary));
}

.btn-outline:hover {
    background: hsl(var(--surface-secondary));
    border-color: hsl(var(--primary));
    color: hsl(var(--primary));
}

.btn-sm {
    padding: var(--space-xs) var(--space-sm);
    font-size: 0.75rem;
}

/* Range Input Styles */
input[type="range"] {
    --webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: hsl(var(--border));
    outline: none;
    margin: var(--space-xs) 0;
    
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: hsl(var(--primary));
    cursor: pointer;
    transition: var(--transition);
}

input[type="range"]::-webkit-slider-thumb:hover {
    background: hsl(var(--primary-dark));
    transform: scale(1.1);
}

input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: hsl(var(--primary));
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.range-value {
    font-size: 0.75rem;
    color: hsl(var(--text-muted));
    margin-left: var(--space-sm);
}

/* List Styles */
.button-list,
.contact-buttons-list,
.image-list {
    display: block;
    flex-direction: column;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

/* Enhanced Social Links List */
.social-links-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.social-link-item {
    background: hsl(var(--surface));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

.social-link-item:hover {
    border-color: hsl(var(--primary) / 0.3);
    box-shadow: var(--shadow-sm);
}

.social-link-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-sm);
}

.social-link-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: hsl(var(--text-primary));
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.social-link-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    color: white;
}

.social-link-remove {
    width: 24px;
    height: 24px;
    border-radius: var(--radius-sm);
    border: none;
    background: hsl(var(--danger) / 0.1);
    color: hsl(var(--danger));
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    transition: var(--transition);
}

.social-link-remove:hover {
    background: hsl(var(--danger));
    color: white;
}

.social-link-controls {
    display: flex;
    gap: var(--space-xs);
    align-items: center;
}

.social-link-reorder {
    width: 24px;
    height: 24px;
    border-radius: var(--radius-sm);
    border: none;
    background: hsl(var(--muted));
    color: hsl(var(--muted-foreground));
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    transition: var(--transition);
}

.social-link-reorder:hover:not(:disabled) {
    background: hsl(var(--accent));
    color: hsl(var(--accent-foreground));
}

.social-link-reorder:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.contact-address-textarea {
    width: 100%;
    min-height: 72px;
    padding: var(--space-sm);
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.875rem;
    resize: vertical;
    transition: var(--transition);
    background: hsl(var(--background));
    color: hsl(var(--foreground));
}

.contact-address-textarea:focus {
    outline: none;
    border-color: hsl(var(--primary));
    box-shadow: 0 0 0 1px hsl(var(--primary) / 0.2);
}

.contact-address-field {
    grid-column: 1 / -1;
    width: 100%;
}

.social-link-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-sm);
    width: 100%;
    overflow: hidden;
}

.social-link-field {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    min-width: 0;
    overflow: hidden;
}

.social-link-field label {
    font-size: 0.75rem;
    font-weight: 500;
    color: hsl(var(--text-secondary));
}

.social-link-field input,
.social-link-field select {
    padding: var(--space-xs) var(--space-sm);
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    font-size: 0.75rem;
    background: hsl(var(--surface));
    color: hsl(var(--text-primary));
    transition: var(--transition);
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.social-link-field input:focus,
.social-link-field select:focus {
    outline: none;
    border-color: hsl(var(--primary));
    box-shadow: 0 0 0 2px hsl(var(--primary) / 0.1);
}

.social-link-color {
    width: 100%;
    height: 32px;
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
}

.social-link-color:hover {
    border-color: hsl(var(--primary));
    transform: scale(1.02);
}

/* Checkbox Styles for Contact Buttons */
.checkbox-label {
    display: flex !important;
    align-items: center !important;
    gap: var(--space-xs) !important;
    cursor: pointer;
    font-size: 0.75rem !important;
    font-weight: 500 !important;
    color: hsl(var(--text-secondary)) !important;
    padding: var(--space-xs) 0 !important;
}

.checkbox-label input[type="checkbox"] {
    width: 16px !important;
    height: 16px !important;
    accent-color: hsl(var(--primary)) !important;
    margin: 0 !important;
    cursor: pointer;
}

.checkbox-text {
    flex: 1;
    cursor: pointer;
    user-select: none;
}

/* Compact layout for smaller screens */
@media (max-width: 480px) {
    .social-link-content {
        grid-template-columns: 1fr;
    }
}

/* Handle very long URLs and text */
@media (max-width: 600px) {
    .social-link-content {
        grid-template-columns: 1fr;
        gap: var(--space-xs);
    }
    
    .social-link-field input,
    .social-link-field select {
        font-size: 0.7rem;
        padding: var(--space-xs);
    }
}

.list-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm);
    background: hsl(var(--surface-secondary));
    border-radius: var(--radius);
    border: 1px solid hsl(var(--border-light));
}

.list-item input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 0.875rem;
    color: hsl(var(--text-primary));
}

.list-item input:focus {
    outline: none;
}

.list-item button {
    width: 24px;
    height: 24px;
    border-radius: var(--radius-sm);
    border: none;
    background: hsl(var(--danger));
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    transition: var(--transition);
}

.list-item button:hover {
    background: hsl(var(--danger) / 0.9);
}

/* Shadow Animations */
@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 var(--shadow-color, rgba(0, 0, 0, 0.2)); }
    50% { box-shadow: 0 0 20px 5px var(--shadow-color, rgba(0, 0, 0, 0.4)); }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 10px 2px var(--shadow-color, rgba(0, 0, 0, 0.3)); }
    50% { box-shadow: 0 0 30px 10px var(--shadow-color, rgba(0, 0, 0, 0.6)); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); box-shadow: 0 5px 15px var(--shadow-color, rgba(0,0,0,0.2)); }
    50% { transform: translateY(-5px); box-shadow: 0 15px 25px var(--shadow-color, rgba(0,0,0,0.5)); }
}

.shadow-pulse {
    animation: pulse 2s infinite;
}

.shadow-glow {
    animation: glow 2s infinite;
}

.shadow-float {
    animation: float 3s ease-in-out infinite;
}

/* Text Shadow Animations for Labels */
@keyframes textShadowPulse {
    0%, 100% { 
        text-shadow: 0 2px 4px var(--shadow-color, rgba(0, 0, 0, 0.2)); 
    }
    50% { 
        text-shadow: 0 4px 20px var(--shadow-color, rgba(0, 0, 0, 0.6)), 
                     0 2px 8px var(--shadow-color, rgba(0, 0, 0, 0.4)); 
    }
}

@keyframes textShadowGlow {
    0%, 100% { 
        text-shadow: 0 2px 8px var(--shadow-color, rgba(0, 0, 0, 0.3)); 
    }
    50% { 
        text-shadow: 0 4px 25px var(--shadow-color, rgba(0, 0, 0, 0.7)), 
                     0 2px 12px var(--shadow-color, rgba(0, 0, 0, 0.5)); 
    }
}

@keyframes textShadowFloat {
    0%, 100% { 
        transform: translateY(0); 
        text-shadow: 0 2px 6px var(--shadow-color, rgba(0, 0, 0, 0.2)); 
    }
    50% { 
        transform: translateY(-2px); 
        text-shadow: 0 6px 15px var(--shadow-color, rgba(0, 0, 0, 0.4)), 
                     0 3px 8px var(--shadow-color, rgba(0, 0, 0, 0.3)); 
    }
}

.text-shadow-pulse {
    animation: textShadowPulse 2s infinite;
}

.text-shadow-glow {
    animation: textShadowGlow 2s infinite;
}

.text-shadow-float {
    animation: textShadowFloat 3s ease-in-out infinite;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .app {
        flex-direction: column;
        height: auto;
    }
    
    .element-panel,
    .properties-panel {
        width: 100px;
        max-height: 200px;
        overflow-y: auto;
    }
    
    .design-area {
        min-height: 60vh;
    }
    
    .export-options {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: var(--space-md);
        text-align: center;
    }
    
    .elements-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .spacing-inputs {
        grid-template-columns: 1fr;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    

}

/* Gradient Controls */
#customGradientGroup .form-control {
    margin-bottom: 8px;
}

#gradientTypeGroup,
#gradientRotationGroup {
    margin-top: 16px;
}

#gradientRotationGroup .range-value {
    font-weight: 500;
    color: #6366f1;
}

/* Canvas Shadow Controls */
#customCanvasShadowGroup .spacing-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-md);
}

#customCanvasShadowGroup .spacing-input-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

#customCanvasShadowGroup .spacing-input-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: hsl(var(--text-primary));
}

#customCanvasShadowGroup .color-input {
    width: 100%;
    height: 40px;
    border: 2px solid hsl(var(--border));
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
}

#customCanvasShadowGroup .color-input:hover {
    border-color: hsl(var(--primary));
    transform: scale(1.02);
}

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

::-webkit-scrollbar-track {
    background: hsl(var(--surface-secondary));
}

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

::-webkit-scrollbar-thumb:hover {
    background: hsl(var(--text-muted));
}

/* Background Themes and Animations */
.theme-gradient-sunset {
    background: linear-gradient(135deg, #ff6b6b 0%, #feca57 50%, #ff9ff3 100%);
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
}

.theme-gradient-ocean {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-size: 400% 400%;
    animation: gradientShift 10s ease infinite;
}

.theme-gradient-forest {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    background-size: 400% 400%;
    animation: gradientShift 12s ease infinite;
}

.theme-gradient-purple {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

.theme-gradient-fire {
    background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
    background-size: 400% 400%;
    animation: gradientShift 6s ease infinite;
}

/* Improved Geometric Pattern */
.theme-animated-geometric {
    background: linear-gradient(45deg, #1e293b, #334155);
    position: relative;
    overflow: hidden;
}

.theme-animated-geometric::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    right: -50%;
    bottom: -50%;
    background-image: 
        linear-gradient(45deg, transparent 30%, rgba(99, 102, 241, 0.15) 50%, transparent 70%),
        linear-gradient(-45deg, transparent 30%, rgba(59, 130, 246, 0.15) 50%, transparent 70%),
        linear-gradient(90deg, transparent 40%, rgba(139, 92, 246, 0.1) 60%, transparent 80%),
        linear-gradient(0deg, transparent 40%, rgba(236, 72, 153, 0.1) 60%, transparent 80%);
    background-size: 200px 200px;
    filter: blur(0.5px);
    animation: geometricMove 25s linear infinite;
}

.theme-animated-gradient {
    background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
    background-size: 400% 400%;
    animation: gradientMove 15s ease infinite;
}

/* Animated Mesh Theme */
.theme-animated-mesh {
    background: #0f0f23;
    position: relative;
    overflow: hidden;
}

.theme-animated-mesh::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    right: -50%;
    bottom: -50%;
    background-image: 
        radial-gradient(ellipse at 25% 25%, rgba(99, 102, 241, 0.6) 0%, transparent 70%),
        radial-gradient(ellipse at 75% 75%, rgba(59, 130, 246, 0.6) 0%, transparent 70%),
        radial-gradient(ellipse at 50% 50%, rgba(139, 92, 246, 0.5) 0%, transparent 70%),
        radial-gradient(ellipse at 10% 80%, rgba(236, 72, 153, 0.4) 0%, transparent 60%),
        radial-gradient(ellipse at 90% 20%, rgba(34, 197, 94, 0.4) 0%, transparent 60%);
    filter: blur(1px);
    animation: meshFloat 20s ease-in-out infinite;
}

.theme-animated-mesh::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, transparent 0%, rgba(15, 15, 35, 0.3) 100%);
    pointer-events: none;
}

/* Neon Glow Theme */
.theme-animated-neon {
    background: #0a0a0a;
    position: relative;
    overflow: hidden;
}

.theme-animated-neon::before {
    content: '';
    position: absolute;
    top: -100%;
    left: -100%;
    right: -100%;
    bottom: -100%;
    background: 
        radial-gradient(ellipse at 25% 25%, rgba(0, 255, 255, 0.3) 0%, transparent 50%),
        radial-gradient(ellipse at 75% 75%, rgba(255, 0, 255, 0.3) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(0, 255, 0, 0.2) 0%, transparent 50%);
    filter: blur(4px);
    animation: neonPulse 8s ease-in-out infinite;
}

/* Sunset Glow Theme */
.theme-animated-sunset {
    background: linear-gradient(45deg, #ff6b6b, #feca57, #ff9ff3, #48dbfb);
    background-size: 400% 400%;
    position: relative;
    overflow: hidden;
}

.theme-animated-sunset::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 50% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    filter: blur(2px);
    animation: sunsetGlow 12s ease-in-out infinite;
}

/* Liquid Flow Theme */
.theme-animated-liquid {
    background: linear-gradient(45deg, #667eea, #764ba2);
    position: relative;
    overflow: hidden;
}

.theme-animated-liquid::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    right: -50%;
    bottom: -50%;
    background: 
        radial-gradient(ellipse at 30% 30%, rgba(255, 255, 255, 0.2) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 70%, rgba(255, 255, 255, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    filter: blur(3px);
    animation: liquidFlow 16s ease-in-out infinite;
}

/* Aurora Borealis Theme */
.theme-animated-aurora {
    background: linear-gradient(45deg, #667eea, #764ba2, #f093fb, #f5576c);
    background-size: 400% 400%;
    position: relative;
    overflow: hidden;
}

.theme-animated-aurora::before {
    content: '';
    position: absolute;
    top: -100%;
    left: -100%;
    right: -100%;
    bottom: -100%;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 40% 60%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    filter: blur(2px);
    animation: auroraFloat 18s ease-in-out infinite;
}

/* New Theme Classes - REMOVED */

/* New Themes - REMOVED */

/* Theme Group Styling */
optgroup {
    font-weight: 600;
    font-size: 0.9em;
    color: hsl(var(--text-secondary));
    background: linear-gradient(135deg, hsl(var(--surface)) 0%, hsl(var(--muted) / 0.1) 100%);
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    margin: 2px 0;
    padding: 4px 8px;
}

optgroup[label*="Common"] {
    color: #059669;
    border-color: #10b981;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
}

optgroup[label*="Rare"] {
    color: #7c3aed;
    border-color: #8b5cf6;
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
}

optgroup[label*="Epic"] {
    color: #dc2626;
    border-color: #ef4444;
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
}

option {
    font-weight: 400;
    color: hsl(var(--text-primary));
    padding: 4px 8px;
    margin: 1px 0;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

option:hover {
    background: hsl(var(--primary) / 0.1);
    color: hsl(var(--primary));
}

/* Subscription-based option restrictions */
option:disabled {
    color: #999 !important;
    font-style: italic !important;
    background: rgba(0, 0, 0, 0.05) !important;
    cursor: not-allowed !important;
    opacity: 0.6;
}

option:disabled:hover {
    background: rgba(0, 0, 0, 0.05) !important;
    color: #999 !important;
}

/* Lock icon styling for restricted options */
option[data-restricted="true"] {
    background: linear-gradient(90deg, #f8f9fa 0%, #fff3cd 100%);
    border-left: 3px solid #ffc107;
}

/* Subscription tier indicators */
.subscription-restriction-notice {
    font-size: 0.8em;
    color: #6c757d;
    font-style: italic;
    padding: 4px 8px;
    background: #f8f9fa;
    border-radius: 4px;
    margin: 4px 0;
}

/* Subscription tier icon styling */
.subscription-tier-icon {
    font-size: 0.9em;
    margin-left: 4px;
    margin-right: 4px;
    transition: transform 0.2s ease;
}

.user-info-btn:hover .subscription-tier-icon {
    transform: scale(1.1);
}

.admin-tools-btn {
    background: rgba(255, 165, 0, 0.2);
    border: 1px solid rgba(255, 165, 0, 0.3);
    color: white;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: var(--font-sm);
    transition: all 0.3s ease;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.admin-tools-btn:hover {
    background: rgba(255, 165, 0, 0.3);
    border-color: rgba(255, 165, 0, 0.4);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Theme Animation Keyframes */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes meshFloat {
    0%, 100% {
        transform: translate(0, 0) scale(1) rotate(0deg);
        opacity: 0.6;
    }
    25% {
        transform: translate(30px, -30px) scale(1.2) rotate(5deg);
        opacity: 0.8;
    }
    50% {
        transform: translate(-30px, -60px) scale(0.8) rotate(-5deg);
        opacity: 0.6;
    }
    75% {
        transform: translate(-60px, -30px) scale(1.1) rotate(3deg);
        opacity: 0.8;
    }
}

@keyframes geometricMove {
    0% {
        transform: translateX(-200px) translateY(-200px) rotate(0deg);
    }
    50% {
        transform: translateX(0px) translateY(0px) rotate(180deg);
    }
    100% {
        transform: translateX(200px) translateY(200px) rotate(360deg);
    }
}

@keyframes auroraFloat {
    0%, 100% {
        transform: translate(0, 0) scale(1) rotate(0deg);
        opacity: 0.1;
    }
    33% {
        transform: translate(40px, -40px) scale(1.3) rotate(120deg);
        opacity: 0.2;
    }
    66% {
        transform: translate(-40px, -80px) scale(0.7) rotate(240deg);
        opacity: 0.1;
    }
}

@keyframes cosmicTwinkle {
    0%, 100% {
        opacity: 0.3;
        transform: translateY(0px);
    }
    50% {
        opacity: 1;
        transform: translateY(-10px);
    }
}

@keyframes liquidFlow {
    0%, 100% {
        transform: translate(0, 0) scale(1) rotate(0deg);
        opacity: 0.2;
    }
    25% {
        transform: translate(50px, -50px) scale(1.4) rotate(90deg);
        opacity: 0.3;
    }
    50% {
        transform: translate(-50px, -100px) scale(0.6) rotate(180deg);
        opacity: 0.2;
    }
    75% {
        transform: translate(-100px, -50px) scale(1.2) rotate(270deg);
        opacity: 0.3;
    }
}

@keyframes neonPulse {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.3;
        filter: blur(4px) brightness(1);
    }
    50% {
        transform: translate(20px, -20px) scale(1.2);
        opacity: 0.6;
        filter: blur(2px) brightness(1.5);
    }
}

@keyframes sunsetGlow {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.1;
    }
    50% {
        transform: translate(-30px, -30px) scale(1.1);
        opacity: 0.2;
    }
}

/* New Theme Animations - REMOVED */

/* New Theme Animations - REMOVED */

/* Bank Card Styles */
.bankcard-block {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 180px;
    background: transparent;
    box-shadow: none;
}

.bankcard {
    width: min(400px, 90vw);
    height: 240px;
    background: linear-gradient(135deg, #6366f1 0%, #3b82f6 100%);
    border-radius: 24px;
    box-shadow: 0 12px 40px 0 rgba(99,102,241,0.3), 0 4px 12px rgba(0,0,0,0.1);
    color: #fff;
    padding: 32px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    font-family: Helvetica, 'Helvetica Neue', 'SF Pro Display', Arial, sans-serif;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(20px);
}

.bankcard:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 20px 60px 0 rgba(99,102,241,0.4), 0 8px 24px rgba(0,0,0,0.15);
}

.bankcard:active {
    transform: translateY(-2px) scale(1.01);
    transition: all 0.1s ease;
}

.bankcard-chip {
    width: 54px;
    height: 36px;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border-radius: 10px;
    margin-bottom: 36px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15), inset 0 1px 2px rgba(255,255,255,0.2);
    position: relative;
}

.bankcard-chip::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 32px;
    height: 24px;
    background: linear-gradient(135deg, #d1d5db 0%, #9ca3af 100%);
    border-radius: 4px;
}

.bankcard-number {
    font-size: 1.5rem;
    letter-spacing: 3px;
    font-weight: 700;
    margin-bottom: 28px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.2);
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}

.bankcard-owner {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.95;
    text-shadow: 0 1px 4px rgba(0,0,0,0.15);
    margin-top: auto;
    color: #ffffff;
}

.bankcard-bank-name {
    position: absolute !important;
    top: 24px !important;
    right: 24px !important;
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    color: rgba(255, 255, 255, 0.95) !important;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3) !important;
    text-align: right !important;
    line-height: 1.3 !important;
    max-width: 140px !important;
    word-wrap: break-word !important;
    direction: rtl !important;
    font-family: 'Vazir', 'Tahoma', 'Arial', sans-serif !important;
    background: rgba(0,0,0,0.1) !important;
    padding: 6px 10px !important;
    border-radius: 8px !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    z-index: 10 !important;
    display: block !important;
}

/* Responsive Card Sizes */
@media (max-width: 768px) {
    .bankcard-block {
        padding: 16px !important;
        min-height: 220px;
    }
    
    .bankcard {
        width: min(340px, 95vw);
        height: 200px;
        padding: 24px;
        border-radius: 20px;
    }
    
    .bankcard-chip {
        width: 48px;
        height: 32px;
        margin-bottom: 28px;
    }
    
    .bankcard-chip::after {
        width: 28px;
        height: 20px;
    }
    
    .bankcard-number {
        font-size: 1.3rem;
        letter-spacing: 2.5px;
        margin-bottom: 24px;
    }
    
    .bankcard-owner {
        font-size: 1rem;
        letter-spacing: 1.5px;
    }
    
    .bankcard-bank-name {
        top: 20px !important;
        right: 20px !important;
        font-size: 0.8rem !important;
        max-width: 120px !important;
        padding: 4px 8px !important;
        border-radius: 6px !important;
    }
}

@media (max-width: 480px) {
    .bankcard-block {
        padding: 12px !important;
        min-height: 200px;
    }
    
    .bankcard {
        width: min(300px, 92vw);
        height: 180px;
        padding: 20px;
        border-radius: 16px;
    }
    
    .bankcard-chip {
        width: 42px;
        height: 28px;
        margin-bottom: 24px;
    }
    
    .bankcard-chip::after {
        width: 24px;
        height: 18px;
    }
    
    .bankcard-number {
        font-size: 1.1rem;
        letter-spacing: 2px;
        margin-bottom: 20px;
    }
    
    .bankcard-owner {
        font-size: 0.9rem;
        letter-spacing: 1.2px;
    }
    
    .bankcard-bank-name {
        top: 16px !important;
        right: 16px !important;
        font-size: 0.75rem !important;
        max-width: 100px !important;
        padding: 3px 6px !important;
        border-radius: 4px !important;
    }
}

@media (max-width: 320px) {
    .bankcard {
        width: min(280px, 90vw);
        height: 160px;
        padding: 16px;
    }
    
    .bankcard-number {
        font-size: 1rem;
        letter-spacing: 1.5px;
    }
    
    .bankcard-owner {
        font-size: 0.8rem;
        letter-spacing: 1px;
    }
    
    .bankcard-bank-name {
        font-size: 0.7rem !important;
        max-width: 80px !important;
    }
}

/* User Management Modal Styles */
.user-tabs {
    display: flex;
    border-bottom: 2px solid var(--border);
    margin-bottom: 1.5rem;
}

.tab-btn {
    background: none;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.tab-btn:hover {
    color: var(--text-secondary);
}

.tab-btn.active {
    color: hsl(var(--primary));
    border-bottom-color: hsl(var(--primary));
}

.tab-content {
    display: none;
}

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

.search-input-group {
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
}

.search-input-group .form-control {
    flex: 1;
}

.search-results {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: var(--surface-secondary);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.user-info h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.user-details {
    margin-bottom: 1.5rem;
}

.user-details p {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.user-details strong {
    color: var(--text-primary);
    font-weight: 600;
}

.no-results {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

.no-results .empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.no-results h4 {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

/* User Export Controls */
.user-export-controls {
    display: flex;
    gap: var(--space-md);
    align-items: flex-start;
    margin-top: var(--space-sm);
}

.export-username-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.export-username-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    font-size: 14px;
    color: hsl(var(--text-primary));
}

.export-username-label i {
    color: hsl(var(--primary));
    font-size: 13px;
}

.export-username-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid hsl(var(--border));
    border-radius: 8px;
    background: hsl(var(--surface));
    color: hsl(var(--text-primary));
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.export-username-input:focus {
    outline: none;
    border-color: hsl(var(--primary));
    box-shadow: 0 0 0 3px hsla(var(--primary), 0.1);
    background: hsl(var(--surface));
}

.export-username-input::placeholder {
    color: hsl(var(--text-muted));
    font-weight: 400;
}

.export-username-hint {
    font-size: 12px;
    color: hsl(var(--text-muted));
    font-style: italic;
}

.export-button {
    flex-shrink: 0;
    margin-top: 22px; /* Align with input after label */
}

.user-export-controls .form-control {
    flex: 1;
    min-width: 0;
}

.user-export-controls .btn {
    white-space: nowrap;
}

/* Responsive adjustments for user modal */
@media (max-width: 768px) {
    .user-tabs {
        flex-direction: column;
        border-bottom: none;
    }
    
    .tab-btn {
        border-bottom: none;
        border-left: 3px solid transparent;
        margin-bottom: 0;
        text-align: left;
    }
    
    .tab-btn.active {
        border-left-color: hsl(var(--primary));
        background: var(--surface-secondary);
    }
    
    .search-input-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .user-export-controls {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Enhanced toolbar responsiveness */
@media (max-width: 768px) {
    .canvas-toolbar {
        top: 15px;
        padding: 10px 16px;
        gap: 14px;
        border-radius: 14px;
    }
    
    .toolbar-btn {
        width: 40px;
        height: 40px;
        border-radius: 10px;
        font-size: 1rem;
    }
    
    .toolbar-btn i[data-lucide] {
        width: 18px;
        height: 18px;
        stroke-width: 2.4;
    }
    
    .toolbar-group {
        gap: 10px;
    }
    
    .toolbar-group:not(:last-child)::after {
        right: -12px;
        height: 24px;
    }
}

@media (max-width: 480px) {
    .canvas-toolbar {
        top: 10px;
        padding: 8px 12px;
        gap: 12px;
        border-radius: 12px;
    }
    
    .toolbar-btn {
        width: 36px;
        height: 36px;
        border-radius: 8px;
        font-size: 0.9rem;
    }
    
    .toolbar-btn i[data-lucide] {
        width: 16px;
        height: 16px;
        stroke-width: 2.5;
    }
    
    .toolbar-group {
        gap: 8px;
    }
    
    .toolbar-group:not(:last-child)::after {
        right: -10px;
        height: 20px;
    }
}

/* Toolbar focus states for accessibility */
.toolbar-btn:focus {
    outline: none;
    box-shadow: 
        0 0 0 3px rgba(99, 102, 241, 0.3),
        0 2px 8px rgba(0, 0, 0, 0.06),
        0 1px 3px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.toolbar-btn:focus:hover {
    box-shadow: 
        0 0 0 3px rgba(99, 102, 241, 0.4),
        0 12px 32px rgba(0, 0, 0, 0.15),
        0 6px 16px rgba(0, 0, 0, 0.1),
        0 2px 8px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 1);
}

/* Toolbar button press effect */
.toolbar-btn:active {
    transform: translateY(-2px) scale(1.02);
    transition: all 0.1s ease;
}

.toolbar-btn:active i {
    transform: scale(0.95);
}

/* Enhanced toolbar glow effect */
.canvas-toolbar::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    background: linear-gradient(135deg, 
        rgba(99, 102, 241, 0.1) 0%, 
        rgba(139, 92, 246, 0.1) 50%, 
        rgba(59, 130, 246, 0.1) 100%);
    border-radius: 21px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.canvas-toolbar:hover::before {
    opacity: 1;
}

/* Toolbar Show/Hide Animations */
@keyframes toolbarShow {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }
}

@keyframes toolbarHide {
    from {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px) scale(0.8);
    }
}

.canvas-toolbar.show {
    display: flex !important;
    animation: toolbarShow 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.canvas-toolbar.hide {
    animation: toolbarHide 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* Custom styling for scale (zoom) controls in toolbar */
.toolbar-scale-group {
    gap: 8px;
    align-items: center;
    background: rgba(255,255,255,0.18);
    border-radius: 8px;
    padding: 4px 10px 4px 8px;
    box-shadow: 0 1px 4px rgba(99,102,241,0.07);
    transition: background 0.2s;
}
.toolbar-scale-group:hover {
    background: rgba(255,255,255,0.28);
}
.toolbar-scale-group .toolbar-btn {
    width: 32px;
    height: 32px;
    font-size: 1.1rem;
    background: rgba(255,255,255,0.35);
    border-radius: 7px;
    margin: 0 2px;
    transition: background 0.2s, box-shadow 0.2s;
}
.toolbar-scale-group .toolbar-btn:hover {
    background: rgba(99,102,241,0.12);
    color: #6366f1;
    box-shadow: 0 2px 8px rgba(99,102,241,0.08);
}
.toolbar-scale-group input[type="range"] {
    accent-color: #6366f1;
    height: 4px;
    border-radius: 2px;
    background: linear-gradient(90deg, #6366f1 0%, #a5b4fc 100%);
    box-shadow: 0 1px 2px rgba(99,102,241,0.08);
    margin: 0 6px;
}
.toolbar-scale-group #canvasScaleValueToolbar {
    font-weight: 500;
    color: #6366f1;
    letter-spacing: 0.5px;
    background: rgba(99,102,241,0.07);
    border-radius: 5px;
    padding: 2px 8px;
    min-width: 38px;
    text-align: right;
    font-size: 13px;
    margin-left: 6px;
    transition: background 0.2s, color 0.2s;
}

/* Theme Settings Panel */
#themeSettingsProps .form-section {
    background: hsl(var(--surface));
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-lg);
    border: 1px solid hsl(var(--border));
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

#themeSettingsProps .form-section:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-1px);
}

#themeSettingsProps .form-section h4 {
    background: linear-gradient(135deg, hsl(var(--primary) / 0.15) 0%, hsl(var(--primary) / 0.05) 100%);
    color: hsl(var(--primary));
    padding: var(--space-lg);
    margin: 0;
    border-bottom: 1px solid hsl(var(--border));
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#themeSettingsProps .form-group {
    padding: var(--space-lg);
}

/* User Creation Success Modal */
.user-success-modal {
    max-width: 1000px;
    width: 95%;
    min-height: 600px;
}

.user-success-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .user-success-content {
        display: grid;
        grid-template-columns: 2fr 1fr;
        grid-template-rows: auto auto;
        gap: 2rem;
        grid-template-areas: 
            "user qr"
            "storage storage";
    }
    
    .user-info-section {
        grid-area: user;
    }
    
    .qr-code-section {
        grid-area: qr;
    }
    
    .storage-progress-section {
        grid-area: storage;
        margin: 0;
    }
}

@media (min-width: 1024px) {
    .user-success-content {
        grid-template-columns: 3fr 2fr;
        grid-template-rows: auto auto;
        gap: 2.5rem;
    }
}

.user-info-section {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    padding: 1rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.user-avatar {
    flex-shrink: 0;
}

.user-avatar i {
    font-size: 5rem;
    color: #667eea;
    opacity: 0.8;
}

.user-details {
    flex: 1;
}

.user-details h4 {
    margin: 0 0 1rem 0;
    color: #2d3748;
    font-size: 1.75rem;
    font-weight: 700;
}

.user-details p {
    margin: 0.5rem 0;
    color: #4a5568;
    font-size: 1rem;
    font-weight: 500;
}

.user-url {
    margin-top: 1.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
    border-radius: 10px;
    border: 1px solid #667eea30;
}

.user-url i {
    color: #667eea;
    margin-right: 0.5rem;
}

.user-url a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.user-url a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.qr-code-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.qr-code-container {
    background: white;
    padding: 1rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 2px solid #667eea15;
    margin-bottom: 0.75rem;
    position: relative;
    overflow: hidden;
    max-width: 200px;
    width: 100%;
}

.qr-code-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea05 0%, #764ba205 100%);
    pointer-events: none;
}

.qr-code-image {
    max-width: 160px;
    width: 100%;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    position: relative;
    z-index: 1;
    margin-bottom: 0.5rem;
}

.qr-code-info {
    margin-top: 0;
    position: relative;
    z-index: 1;
    padding: 0.5rem 0 0;
    border-top: 1px solid #f0f0f0;
}

.qr-code-info p {
    margin: 0.5rem 0;
    font-weight: 600;
    line-height: 1.2;
}

.qr-code-info p:first-child {
    color: #667eea;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.qr-username {
    color: #666;
    font-size: 0.85rem;
    font-weight: 500;
    margin-top: 0.25rem;
}

.qr-description {
    color: #666;
    font-size: 0.75rem;
    margin: 0.5rem 0 0;
    font-style: italic;
    text-align: center;
}

/* Storage Progress Section */
.storage-progress-section {
    margin: 2rem 0;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.storage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.storage-header h5 {
    margin: 0;
    color: #2d3748;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.storage-header i {
    color: #667eea;
}

.subscription-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.subscription-badge span#subscriptionPlan[data-plan="bronze"], 
.subscription-badge:has(span:contains("bronze")) {
    background: linear-gradient(135deg, #cd7f32 0%, #b8691a 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(205, 127, 50, 0.3);
}

.subscription-badge span#subscriptionPlan[data-plan="silver"],
.subscription-badge:has(span:contains("silver")) {
    background: linear-gradient(135deg, #c0c0c0 0%, #a8a8a8 100%);
    color: #2d3748;
    box-shadow: 0 2px 4px rgba(192, 192, 192, 0.3);
}

.subscription-badge span#subscriptionPlan[data-plan="gold"],
.subscription-badge:has(span:contains("gold")) {
    background: linear-gradient(135deg, #ffd700 0%, #ffcc00 100%);
    color: #2d3748;
    box-shadow: 0 2px 4px rgba(255, 215, 0, 0.3);
}

.progress-container {
    margin-bottom: 1rem;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.progress-text {
    color: #4a5568;
    font-size: 0.9rem;
    font-weight: 500;
}

.progress-percentage {
    color: #2d3748;
    font-size: 0.9rem;
    font-weight: 600;
}

.progress-bar-wrapper {
    margin-bottom: 1rem;
}

.progress-bar {
    width: 100%;
    height: 16px;
    background: rgba(226, 232, 240, 0.6);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #48bb78 0%, #38a169 50%, #2f855a 100%);
    border-radius: 20px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Progress fill colors based on usage */
.progress-fill.warning {
    background: linear-gradient(90deg, #ed8936 0%, #dd6b20 50%, #c05621 100%);
}

.progress-fill.critical {
    background: linear-gradient(90deg, #f56565 0%, #e53e3e 50%, #c53030 100%);
}

.storage-details {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.storage-stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #4a5568;
    font-size: 0.85rem;
}

.storage-stat i {
    color: #667eea;
    font-size: 0.9rem;
}

.storage-status {
    margin-top: 1rem;
}

.storage-status > div {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
}

.status-good {
    background: rgba(72, 187, 120, 0.1);
    color: #2f855a;
    border: 1px solid rgba(72, 187, 120, 0.2);
}

.status-warning {
    background: rgba(237, 137, 54, 0.1);
    color: #c05621;
    border: 1px solid rgba(237, 137, 54, 0.2);
}

.status-critical {
    background: rgba(245, 101, 101, 0.1);
    color: #c53030;
    border: 1px solid rgba(245, 101, 101, 0.2);
}

.status-good i {
    color: #48bb78;
}

.status-warning i {
    color: #ed8936;
}

.status-critical i {
    color: #f56565;
}

/* File Size Limit Error Modal */
.file-size-limit-modal {
    max-width: 700px;
    width: 95%;
}

.limit-error-content {
    margin-bottom: 2rem;
}

.error-message {
    background: rgba(245, 101, 101, 0.1);
    border: 1px solid rgba(245, 101, 101, 0.2);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 2rem;
    text-align: center;
}

.error-message p {
    margin: 0;
    color: #c53030;
    font-weight: 500;
    font-size: 1rem;
}

.storage-breakdown {
    background: #f8fafc;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.storage-breakdown h4 {
    margin: 0 0 1rem 0;
    color: #2d3748;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.breakdown-item:last-child {
    border-bottom: none;
}

.breakdown-item.total {
    font-weight: 600;
    background: rgba(237, 137, 54, 0.1);
    margin: 0.5rem -1.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
}

.breakdown-item.limit {
    font-weight: 600;
    color: #2d3748;
}

.breakdown-item.excess {
    color: #c53030;
    font-weight: 600;
    background: rgba(245, 101, 101, 0.1);
    margin: 0.5rem -1.5rem 0;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
}

.breakdown-item .label {
    color: #4a5568;
}

.breakdown-item .value {
    font-weight: 600;
    color: #2d3748;
}

.breakdown-item.excess .value {
    color: #c53030;
}

.limit-progress-visualization {
    background: #f8fafc;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.limit-progress-visualization h4 {
    margin: 0 0 1.5rem 0;
    color: #2d3748;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.limit-progress-container {
    margin-bottom: 1rem;
}

.limit-progress-bar {
    width: 100%;
    height: 20px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    margin-bottom: 0.5rem;
}

.limit-current-fill,
.limit-new-fill,
.limit-excess-fill {
    height: 100%;
    float: left;
    transition: width 0.6s ease;
}

.limit-current-fill {
    background: linear-gradient(90deg, #48bb78 0%, #38a169 100%);
}

.limit-new-fill {
    background: linear-gradient(90deg, #ed8936 0%, #dd6b20 100%);
}

.limit-excess-fill {
    background: linear-gradient(90deg, #f56565 0%, #e53e3e 100%);
}

.limit-progress-labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #4a5568;
}

.limit-marker {
    position: relative;
    font-weight: 600;
    color: #2d3748;
}

.limit-marker::before {
    content: '';
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 15px;
    background: #2d3748;
}

.limit-legend {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-top: 1rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #4a5568;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

.legend-color.current {
    background: linear-gradient(90deg, #48bb78 0%, #38a169 100%);
}

.legend-color.new {
    background: linear-gradient(90deg, #ed8936 0%, #dd6b20 100%);
}

.legend-color.excess {
    background: linear-gradient(90deg, #f56565 0%, #e53e3e 100%);
}

.upgrade-suggestion {
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
    border: 1px solid #667eea30;
    border-radius: 8px;
    padding: 1.5rem;
}

.upgrade-suggestion h4 {
    margin: 0 0 0.5rem 0;
    color: #2d3748;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.upgrade-suggestion p {
    margin: 0 0 1rem 0;
    color: #4a5568;
}

.plan-comparison {
    display: flex;
    gap: 1rem;
}

.plan-comparison .plan-option {
    flex: 1;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.plan-comparison .plan-option:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.plan-comparison .plan-icon {
    font-size: 1.5rem;
    display: block;
    margin-bottom: 0.5rem;
}

.plan-comparison .plan-name {
    display: block;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.25rem;
}

.plan-comparison .plan-storage {
    display: block;
    color: #667eea;
    font-weight: 500;
    font-size: 0.9rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

.modal-actions .btn {
    min-width: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.modal-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.modal-actions .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
}

.modal-actions .btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

.modal-actions .btn-secondary {
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    color: #4a5568;
}

.modal-actions .btn-secondary:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
}

/* Responsive Design for User Success Modal */
@media (max-width: 768px) {
    .user-success-modal {
        width: 98%;
        margin: 0.5rem;
        max-width: none;
    }
    
    .user-success-content {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .user-info-section {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .user-avatar i {
        font-size: 3rem;
    }
    
    .qr-code-container {
        padding: 1.5rem;
        min-width: auto;
    }
    
    .qr-code-image {
        max-width: 200px;
    }
    
    .qr-code-info p:first-child {
        font-size: 1.2rem;
    }
    
    .qr-username {
        font-size: 1rem;
    }
    
    .modal-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .modal-actions .btn {
        width: 100%;
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .user-success-modal {
        width: 99%;
        margin: 0.25rem;
        max-width: none;
    }
    
    .user-details h4 {
        font-size: 1.25rem;
    }
    
    .qr-code-image {
        max-width: 180px;
    }
    
    .qr-code-container {
        padding: 1rem;
        min-width: auto;
    }
    
    .qr-code-info p:first-child {
        font-size: 1.1rem;
    }
    
    .qr-username {
        font-size: 0.95rem;
    }
}

/* User Creation Modal Enhancements */
.user-creation-modal {
    max-height: 90vh;
    overflow-y: auto;
}

.user-creation-modal .modal-body {
    max-height: calc(90vh - 120px);
    overflow-y: auto;
}

/* Subscription Plans Styling */
.subscription-plans {
    margin: 2rem 0;
}

.subscription-plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

/* Compact Subscription Plans Styling */
.subscription-plans-compact {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 1rem 0;
}

.plan-option-compact {
    position: relative;
}

.plan-option-compact input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.plan-card-compact {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
    user-select: none;
}

.plan-card-compact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, transparent);
    transition: all 0.3s ease;
}

.plan-card-compact::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 1rem;
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 50%;
    transform: translateY(-50%);
    transition: all 0.3s ease;
    background: #ffffff;
}

.plan-card-compact:hover {
    border-color: #a5b4fc;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    transform: translateY(-3px);
    background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
}

.plan-card-compact:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.plan-option-compact input[type="radio"]:checked + .plan-card-compact {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.25);
    transform: translateY(-2px);
}

.plan-option-compact input[type="radio"]:checked + .plan-card-compact::after {
    background: #22c55e;
    border-color: #22c55e;
    box-shadow: inset 0 0 0 3px #ffffff;
}

.plan-option-compact input[type="radio"]:checked + .plan-card-compact .plan-info .plan-name,
.plan-option-compact input[type="radio"]:checked + .plan-card-compact .plan-info .plan-storage {
    color: #ffffff;
}

.plan-option-compact input[type="radio"]:checked + .plan-card-compact .plan-badge {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.plan-option-compact input[type="radio"]:checked + .plan-card-compact .feature-tag {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.plan-header-compact {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.plan-header-compact .plan-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.plan-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.plan-info .plan-name {
    font-size: 1rem;
    font-weight: 600;
    color: #2d3748;
    line-height: 1.2;
}

.plan-info .plan-storage {
    font-size: 0.875rem;
    color: #718096;
    font-weight: 500;
}

.plan-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.plan-badge:not(.popular):not(.premium) {
    background: rgba(107, 114, 128, 0.1);
    color: #6b7280;
}

.plan-badge.popular {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.15), rgba(168, 85, 247, 0.1));
    color: #a855f7;
}

.plan-badge.premium {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.15), rgba(251, 191, 36, 0.1));
    color: #f59e0b;
}

.plan-features-compact {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.feature-tag {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    border-radius: 6px;
    font-weight: 500;
}

/* Plan-specific compact styling */
.plan-card-compact.plan-bronze::before {
    background: linear-gradient(90deg, #cd7f32, #e49b52);
}

.plan-card-compact.plan-silver::before {
    background: linear-gradient(90deg, #9ca3af, #c0c7d0);
}

.plan-card-compact.plan-gold::before {
    background: linear-gradient(90deg, #fbbf24, #fcd34d);
}

.plan-option-compact input[type="radio"]:checked + .plan-card-compact.plan-bronze {
    background: linear-gradient(135deg, #cd7f32 0%, #a0622a 100%);
}

.plan-option-compact input[type="radio"]:checked + .plan-card-compact.plan-silver {
    background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
}

.plan-option-compact input[type="radio"]:checked + .plan-card-compact.plan-gold {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
}

.plan-option-compact input[type="radio"]:checked + .plan-card-compact.plan-bronze::before,
.plan-option-compact input[type="radio"]:checked + .plan-card-compact.plan-silver::before,
.plan-option-compact input[type="radio"]:checked + .plan-card-compact.plan-gold::before {
    opacity: 1;
}

.plan-option {
    position: relative;
}

.plan-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.plan-card {
    display: block;
    padding: 1.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    height: 100%;
    min-height: 200px;
}

.plan-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(255,255,255,0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.plan-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.plan-card:hover::before {
    opacity: 1;
}

.plan-option input[type="radio"]:checked + .plan-card {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea05 0%, #764ba205 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.2);
}

.plan-option input[type="radio"]:checked + .plan-card::after {
    content: '✓';
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 24px;
    height: 24px;
    background: #667eea;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
}

.plan-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.plan-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.plan-icon {
    font-size: 2.5rem;
    line-height: 1;
}

.plan-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2d3748;
}

.plan-price {
    font-size: 0.8rem;
    font-weight: 600;
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.plan-features {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.feature {
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s ease;
}

.feature-included {
    color: #22c55e;
}

.feature-included i {
    color: #22c55e;
    font-weight: bold;
}

.feature-excluded {
    color: #ef4444;
    opacity: 0.7;
}

.feature-excluded i {
    color: #ef4444;
    font-weight: bold;
}

.feature span {
    color: #4a5568;
    font-weight: 500;
}

/* Plan-specific styling */
.plan-bronze {
    border-color: #cd7f32;
}

.plan-bronze .plan-price {
    background: rgba(205, 127, 50, 0.1);
    color: #cd7f32;
}

.plan-option input[type="radio"]:checked + .plan-bronze {
    border-color: #cd7f32;
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.08) 0%, rgba(205, 127, 50, 0.03) 100%);
    box-shadow: 0 12px 30px rgba(205, 127, 50, 0.25);
}

.plan-silver {
    border-color: #9ca3af;
}

.plan-silver .plan-price {
    background: rgba(156, 163, 175, 0.1);
    color: #6b7280;
}

.plan-option input[type="radio"]:checked + .plan-silver {
    border-color: #9ca3af;
    background: linear-gradient(135deg, rgba(156, 163, 175, 0.08) 0%, rgba(156, 163, 175, 0.03) 100%);
    box-shadow: 0 12px 30px rgba(156, 163, 175, 0.25);
}

.plan-gold {
    border-color: #fbbf24;
}

.plan-gold .plan-price {
    background: rgba(251, 191, 36, 0.1);
    color: #f59e0b;
}

.plan-option input[type="radio"]:checked + .plan-gold {
    border-color: #fbbf24;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.08) 0%, rgba(251, 191, 36, 0.03) 100%);
    box-shadow: 0 12px 30px rgba(251, 191, 36, 0.25);
}

/* Compact Duration Options Styling */
.duration-options-compact {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.duration-option-compact {
    position: relative;
    flex: 1;
    min-width: 120px;
}

.duration-option-compact input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.duration-card-compact {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    text-align: left;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
    user-select: none;
    position: relative;
    overflow: hidden;
}

.duration-card-compact::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 0.75rem;
    width: 16px;
    height: 16px;
    border: 2px solid #d1d5db;
    border-radius: 50%;
    transform: translateY(-50%);
    transition: all 0.3s ease;
    background: #ffffff;
}

.duration-card-compact:hover {
    border-color: #a5b4fc;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
}

.duration-card-compact:active {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.duration-option-compact input[type="radio"]:checked + .duration-card-compact {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.25);
    transform: translateY(-1px);
}

.duration-option-compact input[type="radio"]:checked + .duration-card-compact::after {
    background: #22c55e;
    border-color: #22c55e;
    box-shadow: inset 0 0 0 2px #ffffff;
}

.duration-option-compact input[type="radio"]:checked + .duration-card-compact .duration-info .duration-time,
.duration-option-compact input[type="radio"]:checked + .duration-card-compact .duration-info .duration-desc {
    color: #ffffff;
}

.duration-card-compact .duration-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.duration-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.duration-info .duration-time {
    font-size: 0.9rem;
    font-weight: 600;
    color: #2d3748;
    line-height: 1.2;
}

.duration-info .duration-desc {
    font-size: 0.75rem;
    color: #718096;
    font-weight: 500;
}

/* Duration-specific compact styling */
.duration-card-compact.test {
    border-color: rgba(239, 68, 68, 0.3);
}

.duration-card-compact.standard {
    border-color: rgba(107, 114, 128, 0.3);
}

.duration-card-compact.extended {
    border-color: rgba(34, 197, 94, 0.3);
}

.duration-card-compact.popular {
    border-color: rgba(168, 85, 247, 0.3);
}

.duration-card-compact.premium {
    border-color: rgba(251, 191, 36, 0.3);
}

.duration-option-compact input[type="radio"]:checked + .duration-card-compact.test {
    border-color: #ef4444;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.duration-option-compact input[type="radio"]:checked + .duration-card-compact.standard {
    border-color: #6b7280;
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
}

.duration-option-compact input[type="radio"]:checked + .duration-card-compact.extended {
    border-color: #22c55e;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

.duration-option-compact input[type="radio"]:checked + .duration-card-compact.popular {
    border-color: #a855f7;
    background: linear-gradient(135deg, #a855f7 0%, #9333ea 100%);
}

.duration-option-compact input[type="radio"]:checked + .duration-card-compact.premium {
    border-color: #f59e0b;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

/* Duration Options Styling */
.duration-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin: 1.5rem 0;
}

.duration-option {
    position: relative;
}

.duration-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.duration-card {
    display: block;
    padding: 1.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    height: 100%;
    min-height: 140px;
}

.duration-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e0;
}

.duration-option input[type="radio"]:checked + .duration-card {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea08 0%, #764ba208 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.15);
}

.duration-option input[type="radio"]:checked + .duration-card::after {
    content: '✓';
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 20px;
    height: 20px;
    background: #667eea;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
}

.duration-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.duration-icon {
    font-size: 1.8rem;
    line-height: 1;
}

.duration-time {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2d3748;
}

.duration-desc {
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 1rem;
}

.duration-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.duration-test {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.duration-standard {
    background: rgba(107, 114, 128, 0.1);
    color: #6b7280;
}

.duration-extended {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.duration-popular {
    background: rgba(168, 85, 247, 0.1);
    color: #a855f7;
}

.duration-premium {
    background: rgba(251, 191, 36, 0.1);
    color: #f59e0b;
}

/* Subscription Summary Styling */
.subscription-summary {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1rem 0;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e9ecef;
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-label {
    font-weight: 500;
    color: #495057;
}

.summary-value {
    font-weight: 600;
    color: #667eea;
}

/* Responsive Design for New User Creation */
@media (max-width: 768px) {
    .user-creation-modal {
        width: 98%;
        margin: 1rem;
        max-width: none;
    }
    
    .subscription-plans-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .duration-options-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    /* Compact responsive adjustments */
    .duration-options-compact {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .duration-option-compact {
        min-width: auto;
    }
    
    .plan-header-compact {
        gap: 0.75rem;
    }
    
    .plan-header-compact .plan-icon {
        font-size: 1.25rem;
    }
    
    .plan-info .plan-name {
        font-size: 0.9rem;
    }
    
    .plan-info .plan-storage {
        font-size: 0.8rem;
    }
    
    .plan-badge {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
    }
    
    .feature-tag {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
    }
    
    .plan-card-compact::after {
        width: 18px;
        height: 18px;
        right: 0.75rem;
    }
    
    .duration-card-compact::after {
        width: 14px;
        height: 14px;
        right: 0.5rem;
    }
    
    .plan-card-compact {
        padding: 0.875rem 1rem;
    }
    
    .duration-card-compact {
        padding: 0.625rem 0.875rem;
    }
    
    .plan-card {
        padding: 1.25rem;
        min-height: 180px;
    }
    
    .duration-card {
        padding: 1.25rem;
        min-height: 120px;
    }
    
    .plan-header {
        margin-bottom: 1rem;
    }
    
    .plan-icon {
        font-size: 2rem;
    }
    
    .duration-icon {
        font-size: 1.5rem;
    }
}

/* Canvas Shadow Animations */
.canvas-shadow-pulse {
    animation: canvasShadowPulse 2s ease-in-out infinite;
}

.canvas-shadow-glow {
    animation: canvasShadowGlow 3s ease-in-out infinite;
}

.canvas-shadow-float {
    animation: canvasShadowFloat 4s ease-in-out infinite;
}

.canvas-shadow-rainbow {
    animation: canvasShadowRainbow 5s linear infinite;
    position: relative;
}

@keyframes canvasShadowPulse {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    }
    50% {
        box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
    }
}

@keyframes canvasShadowGlow {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
    }
    50% {
        box-shadow: 0 8px 40px rgba(59, 130, 246, 0.6);
    }
}

@keyframes canvasShadowFloat {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
        transform: translateY(0px);
    }
    50% {
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
        transform: translateY(-2px);
    }
}

@keyframes canvasShadowRainbow {
    0% {
        box-shadow: 0 4px 20px rgba(255, 0, 0, 0.5);
    }
    16.66% {
        box-shadow: 0 4px 20px rgba(255, 165, 0, 0.5);
    }
    33.33% {
        box-shadow: 0 4px 20px rgba(255, 255, 0, 0.5);
    }
    50% {
        box-shadow: 0 4px 20px rgba(0, 255, 0, 0.5);
    }
    66.66% {
        box-shadow: 0 4px 20px rgba(0, 0, 255, 0.5);
    }
    83.33% {
        box-shadow: 0 4px 20px rgba(75, 0, 130, 0.5);
    }
    100% {
        box-shadow: 0 4px 20px rgba(238, 130, 238, 0.5);
    }
}

@media (max-width: 480px) {
    .duration-options-grid {
        grid-template-columns: 1fr;
    }
    
    .plan-card {
        padding: 1rem;
        min-height: 160px;
    }
    
    .duration-card {
        padding: 1rem;
        min-height: 100px;
    }
    
    .duration-header {
        gap: 0.5rem;
        margin-bottom: 0.75rem;
    }
    
    .duration-icon {
        font-size: 1.25rem;
    }
    
    .duration-time {
        font-size: 1rem;
    }
    
    .summary-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}

/* Field info styling for messenger inputs */
.field-info {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    color: #666;
    font-style: italic;
}

/* Success Button Style */
.btn-success {
    background: #22c55e;
    color: white;
}

.btn-success:hover {
    background: #16a34a;
}

/* Element Delete Animation */
@keyframes deleteElementFadeOut {
    0% {
        transform: scale(1) rotateX(0deg);
        opacity: 1;
    }
    50% {
        transform: scale(0.8) rotateX(45deg);
        opacity: 0.5;
    }
    100% {
        transform: scale(0) rotateX(90deg);
        opacity: 0;
    }
}

@keyframes deleteElementSlideOut {
    0% {
        transform: translateX(0) rotateY(0deg);
        opacity: 1;
    }
    100% {
        transform: translateX(-100%) rotateY(-90deg);
        opacity: 0;
    }
}

@keyframes deleteElementBounceOut {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    20% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(0);
        opacity: 0;
    }
}

.element-deleting {
    animation: deleteElementBounceOut 0.4s ease-in-out forwards;
    pointer-events: none;
}

.element-deleting-fade {
    animation: deleteElementFadeOut 0.5s ease-in-out forwards;
    pointer-events: none;
}

.element-deleting-slide {
    animation: deleteElementSlideOut 0.4s ease-in-out forwards;
    pointer-events: none;
}

/* Edit User Information Modal Styles */
.edit-user-modal {
    max-width: 900px;
    max-height: 85vh;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.edit-user-modal .modal-body {
    max-height: calc(85vh - 140px);
    overflow-y: auto;
    padding: 2rem;
}

.edit-user-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.user-info-header {
    text-align: center;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid hsl(var(--border));
    margin-bottom: 1rem;
}

.user-info-header h4 {
    font-size: 1.5rem;
    font-weight: 700;
    color: hsl(var(--text-primary));
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--accent)));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.user-info-header p {
    color: hsl(var(--text-muted));
    font-size: 1rem;
    font-weight: 500;
}

/* User Basic Information */
.user-basic-info {
    background: linear-gradient(135deg, hsl(var(--surface)) 0%, hsl(var(--surface-secondary)) 100%);
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid hsl(var(--border));
    position: relative;
    overflow: hidden;
}

.user-basic-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, hsl(var(--primary)), hsl(var(--accent)));
}

.user-basic-info h5 {
    font-size: 1.25rem;
    font-weight: 700;
    color: hsl(var(--text-primary));
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-align: center;
    justify-content: center;
}

.user-basic-info h5 i {
    color: hsl(var(--primary));
    font-size: 1.5rem;
    background: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--accent)));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
}

.form-group {
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: hsl(var(--text-primary));
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.edit-user-modal .form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid hsl(var(--border));
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: hsl(var(--surface));
    color: hsl(var(--text-primary));
    position: relative;
}

.edit-user-modal .form-control:hover {
    border-color: hsl(var(--primary) / 0.5);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.edit-user-modal .form-control:focus {
    outline: none;
    border-color: hsl(var(--primary));
    box-shadow: 0 0 0 4px hsl(var(--primary) / 0.1), 0 4px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.edit-user-modal .form-control::placeholder {
    color: hsl(var(--text-muted));
    opacity: 0.7;
}

/* Subscription Plans */
.subscription-plans {
    background: linear-gradient(135deg, hsl(var(--surface)) 0%, hsl(var(--surface-secondary)) 100%);
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid hsl(var(--border));
    position: relative;
    overflow: hidden;
}

.subscription-plans::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #cd7f32, #c0c0c0, #ffd700);
}

.subscription-plans h5 {
    font-size: 1.25rem;
    font-weight: 700;
    color: hsl(var(--text-primary));
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-align: center;
    justify-content: center;
}

.subscription-plans h5 i {
    color: hsl(var(--primary));
    font-size: 1.5rem;
    background: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--accent)));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.plan-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.plan-card {
    border: 3px solid transparent;
    border-radius: 16px;
    background: linear-gradient(hsl(var(--surface)), hsl(var(--surface))) padding-box,
                linear-gradient(135deg, hsl(var(--border)), hsl(var(--border-light))) border-box;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    overflow: hidden;
    position: relative;
    transform-style: preserve-3d;
}

.plan-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 0%, hsl(var(--primary) / 0.03) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.plan-card:hover {
    transform: translateY(-4px) rotateX(2deg);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12), 0 4px 16px rgba(0, 0, 0, 0.08);
    border-image: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--accent))) 1;
}

.plan-card:hover::before {
    opacity: 1;
}

.plan-card.selected {
    border-image: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--accent))) 1;
    transform: translateY(-6px) rotateX(3deg);
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.15), 0 6px 20px rgba(0, 0, 0, 0.1);
}

.plan-card.selected::before {
    opacity: 1;
}

.plan-card.selected::after {
    content: '✓';
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--accent)));
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: bold;
    z-index: 2;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    animation: checkmarkPop 0.3s ease-out;
}

@keyframes checkmarkPop {
    0% {
        transform: scale(0) rotate(180deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(90deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.plan-header {
    padding: 1.5rem 1rem 1rem;
    text-align: center;
    color: white;
    position: relative;
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
}

.plan-header.bronze {
    background: linear-gradient(135deg, #cd7f32 0%, #daa520 50%, #b8860b 100%);
}

.plan-header.silver {
    background: linear-gradient(135deg, #c0c0c0 0%, #e6e6fa 50%, #a8a8a8 100%);
}

.plan-header.gold {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 50%, #ffb300 100%);
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.plan-header h6 {
    font-size: 1.125rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.plan-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.plan-features {
    padding: 1.5rem;
    background: hsl(var(--surface));
}

.plan-features p {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    color: hsl(var(--text-secondary));
    font-weight: 500;
    transition: color 0.2s ease;
}

.plan-features p:last-child {
    margin-bottom: 0;
}

.plan-features i {
    color: hsl(var(--primary));
    width: 18px;
    font-size: 1rem;
    flex-shrink: 0;
    background: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--accent)));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Subscription Duration */
.subscription-duration {
    background: linear-gradient(135deg, hsl(var(--surface)) 0%, hsl(var(--surface-secondary)) 100%);
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid hsl(var(--border));
    position: relative;
    overflow: hidden;
}

.subscription-duration::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, hsl(var(--primary)), hsl(var(--accent)));
}

.subscription-duration h5 {
    font-size: 1.25rem;
    font-weight: 700;
    color: hsl(var(--text-primary));
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-align: center;
    justify-content: center;
}

.subscription-duration h5 i {
    color: hsl(var(--primary));
    font-size: 1.5rem;
    background: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--accent)));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.duration-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
}

.duration-option {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 1.25rem;
    border: 2px solid hsl(var(--border));
    border-radius: 12px;
    background: hsl(var(--surface));
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.duration-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, hsl(var(--primary) / 0.05), hsl(var(--accent) / 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.duration-option:hover {
    border-color: hsl(var(--primary));
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.duration-option:hover::before {
    opacity: 1;
}

.duration-option input[type="radio"] {
    margin-right: 0.75rem;
    accent-color: hsl(var(--primary));
    transform: scale(1.2);
    position: relative;
    z-index: 1;
}

.duration-option input[type="radio"]:checked {
    animation: radioCheck 0.3s ease-out;
}

@keyframes radioCheck {
    0% {
        transform: scale(1.2);
    }
    50% {
        transform: scale(1.4);
    }
    100% {
        transform: scale(1.2);
    }
}

.duration-option input[type="radio"]:checked + .duration-label {
    color: hsl(var(--primary));
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.duration-option:has(input[type="radio"]:checked) {
    border-color: hsl(var(--primary));
    background: linear-gradient(135deg, hsl(var(--primary) / 0.1), hsl(var(--accent) / 0.1));
    box-shadow: 0 4px 16px hsl(var(--primary) / 0.2);
    transform: translateY(-2px);
}

.duration-option:has(input[type="radio"]:checked)::before {
    opacity: 1;
}

.duration-label {
    font-size: 0.875rem;
    color: hsl(var(--text-secondary));
    transition: all 0.3s ease;
    font-weight: 500;
    position: relative;
    z-index: 1;
    text-align: center;
}

/* Modal Actions */
.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding-top: 1.5rem;
    border-top: 1px solid hsl(var(--border));
    margin-top: 1rem;
}

.modal-actions .btn {
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
    min-width: 140px;
}

.modal-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .edit-user-modal {
        max-width: 95vw;
        max-height: 95vh;
        margin: 1rem;
    }
    
    .edit-user-modal .modal-body {
        padding: 1.5rem;
    }
    
    .plan-grid {
        grid-template-columns: 1fr;
    }
    
    .duration-options {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .modal-actions .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .duration-options {
        grid-template-columns: 1fr;
    }
}

/* ====================================== */
/* AUTHENTICATION MODAL                   */
/* ====================================== */

.auth-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.5s ease-out;
}

.auth-modal {
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 25px 50px rgba(102, 126, 234, 0.25);
    width: 100%;
    max-width: 420px;
    margin: 20px;
    overflow: hidden;
    animation: slideInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-header {
    text-align: center;
    padding: 48px 32px 32px 32px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-bottom: 1px solid #e2e8f0;
}

.auth-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.auth-logo i {
    font-size: 3rem;
    color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-logo h2 {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: -0.025em;
}

.auth-header p {
    margin: 0;
    color: #64748b;
    font-size: 0.95rem;
    font-weight: 400;
}

.auth-form {
    padding: 32px;
}

.auth-field {
    margin-bottom: 24px;
}

.auth-field label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.auth-field label i {
    font-size: 0.9rem;
    color: #667eea;
    width: 16px;
}

.auth-field input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff;
    color: #1e293b;
    box-sizing: border-box;
}

.auth-field input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.auth-field input:hover {
    border-color: #cbd5e1;
}

.auth-actions {
    margin-top: 32px;
}

.auth-submit-btn {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(102, 126, 234, 0.25);
}

.auth-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.35);
}

.auth-submit-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 14px rgba(102, 126, 234, 0.25);
}

.auth-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 4px 14px rgba(102, 126, 234, 0.15);
}

.auth-submit-btn i {
    font-size: 0.9rem;
}

.auth-error {
    margin-top: 16px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border: 1px solid #fca5a5;
    border-radius: 8px;
    color: #dc2626;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: shake 0.5s ease-in-out;
}

.auth-error i {
    font-size: 0.9rem;
}

.auth-footer {
    text-align: center;
    padding: 24px 32px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.auth-footer p {
    margin: 0;
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.auth-footer i {
    color: #10b981;
    font-size: 0.8rem;
}

/* Authentication Modal Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    75% {
        transform: translateX(5px);
    }
}

/* Authentication Modal Responsive */
@media (max-width: 768px) {
    .auth-modal {
        margin: 16px;
        max-width: none;
    }
    
    .auth-header {
        padding: 40px 24px 24px 24px;
    }
    
    .auth-form {
        padding: 24px;
    }
    
    .auth-footer {
        padding: 20px 24px;
    }
    
    .auth-logo h2 {
        font-size: 1.5rem;
    }
    
    .auth-logo i {
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    .auth-modal {
        margin: 12px;
        border-radius: 20px;
    }
    
    .auth-header {
        padding: 32px 20px 20px 20px;
    }
    
    .auth-form {
        padding: 20px;
    }
    
    .auth-field input {
        padding: 12px 14px;
    }
    
    .auth-submit-btn {
        padding: 14px 20px;
    }
}
