/* ===== MAKE MEMES GREAT AGAIN - PROFESSIONAL REDESIGN ===== */

/* === ROOT VARIABLES === */
:root {
    /* MAGA Patriotic Color Palette */
    --maga-red: #C8102E;
    --maga-red-dark: #9B0A23;
    --maga-blue: #0A3161;
    --maga-blue-dark: #051A38;
    --maga-white: #FFFFFF;
    --maga-gold: #F2C94C;
    --maga-silver: #C0C0C0;
    
    /* UI Colors */
    --bg-primary: #0F1419;
    --bg-secondary: #1A2332;
    --bg-elevated: #233044;
    --text-primary: #FFFFFF;
    --text-secondary: #CBD5E1;
    --text-muted: #94A3B8;
    
    /* Shadows & Effects */
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.3);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --glow-red: 0 0 30px rgba(200, 16, 46, 0.6);
    --glow-blue: 0 0 30px rgba(10, 49, 97, 0.6);
    --glow-gold: 0 0 30px rgba(242, 201, 76, 0.6);
    
    /* Typography */
    --font-display: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
    
    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 48px;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--maga-blue-dark) 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* === HEADER === */
.main-header {
    background: linear-gradient(135deg, var(--maga-blue) 0%, var(--maga-blue-dark) 100%);
    border-bottom: 3px solid var(--maga-red);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--spacing-md) var(--spacing-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-lg);
}

.logo-section {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.logo-hat {
    width: 60px;
    height: auto;
    filter: drop-shadow(var(--shadow-sm));
    transition: transform 0.3s ease;
}

.logo-hat:hover {
    transform: rotate(-10deg) scale(1.1);
}

.logo-text h1 {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 1.5rem;
    line-height: 1.2;
    color: var(--maga-white);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 1px;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.copy-token-btn {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--maga-gold);
    color: var(--maga-blue-dark);
    border: none;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.8rem;
    font-family: 'Courier New', monospace;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    min-width: 120px;
}

.copy-token-btn:hover {
    background: var(--maga-white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.copy-icon {
    flex-shrink: 0;
}

.token-text {
    letter-spacing: 0.5px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-md);
    color: var(--maga-white);
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--maga-white);
    color: var(--maga-blue);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.social-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

/* === FULLSCREEN LANDING HERO === */
.landing-hero {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

.hero-image-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.4) 100%);
    pointer-events: none;
}

/* === HAT RAIN EFFECT === */
.hat-rain {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
    overflow: hidden;
}

.hat {
    position: absolute;
    width: 40px;
    height: 40px;
    background-image: url('img/branding/maga-hat.png');
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.8;
    animation: fall linear infinite;
}

@keyframes fall {
    0% {
        top: -50px;
        opacity: 0.8;
    }
    80% {
        opacity: 0.8;
    }
    100% {
        top: 100vh;
        opacity: 0;
    }
}

/* === FLOATING ACTIONS === */
.floating-actions {
    position: absolute;
    bottom: 130px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
    z-index: 100;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.floating-social {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: var(--maga-white);
    transition: all 0.3s ease;
}

.floating-social:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.floating-social .social-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.floating-token {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.15);
    color: var(--maga-white);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
    font-family: 'Courier New', monospace;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: none;
}

.floating-token:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.token-address {
    letter-spacing: 0.5px;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


/* === SECTION TITLES (for generator) === */
.section-title {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 2.5rem;
    color: var(--maga-white);
    text-align: center;
    margin-bottom: var(--spacing-2xl);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.section-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: var(--spacing-2xl);
    font-weight: 600;
}

/* === EDITOR MAIN === */
.editor-main {
    padding: 80px var(--spacing-lg);
    max-width: 1600px;
    margin: 0 auto;
    scroll-margin-top: 80px;
}

.editor-container {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: var(--spacing-xl);
    align-items: start;
    max-width: 100%;
}

/* === CANVAS SECTION === */
.canvas-section {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-lg);
    border: 2px solid var(--maga-red);
}

.upload-section {
    display: flex;
    justify-content: center;
    margin-bottom: var(--spacing-md);
}

.btn-upload {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    background: linear-gradient(135deg, var(--maga-blue), var(--maga-blue-dark));
    color: var(--maga-white);
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.125rem;
    padding: var(--spacing-md) var(--spacing-xl);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-lg);
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.btn-upload svg {
    flex-shrink: 0;
}

.btn-upload:hover {
    background: linear-gradient(135deg, var(--maga-red), var(--maga-red-dark));
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg), var(--glow-red);
    border-color: rgba(255, 255, 255, 0.5);
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    align-items: center;
    padding: var(--spacing-md);
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.toolbar-group {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.toolbar-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}

.btn-tool {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--maga-blue);
    color: var(--maga-white);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-tool svg {
    flex-shrink: 0;
}

.btn-tool:hover {
    background: var(--maga-blue-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.btn-tool.btn-danger {
    background: var(--maga-red);
}

.btn-tool.btn-danger:hover {
    background: var(--maga-red-dark);
}

.range-slider {
    width: 120px;
    height: 6px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.2);
    outline: none;
    cursor: pointer;
}

.range-slider::-webkit-slider-thumb {
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--maga-red);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.range-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--maga-red);
    cursor: pointer;
    border: none;
    box-shadow: var(--shadow-sm);
}

.select-tool {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
}

.toolbar-spacer {
    flex: 1;
}

.btn-export {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    background: linear-gradient(135deg, var(--maga-red), var(--maga-red-dark));
    color: var(--maga-white);
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1rem;
    padding: var(--spacing-md) var(--spacing-lg);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-export svg {
    flex-shrink: 0;
}

.btn-export:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg), var(--glow-red);
}

/* === CANVAS === */
.canvas-wrapper {
    position: relative;
    background: #000000;
    border-radius: var(--radius-lg);
    overflow: hidden;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--maga-blue);
    box-shadow: inset 0 0 40px rgba(10, 49, 97, 0.5);
}

#editorCanvas {
    display: block;
    max-width: 100%;
    height: auto;
}

.canvas-instructions {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
    z-index: 5;
}

.canvas-instructions.hidden {
    display: none;
}

.instructions-icon {
    margin-bottom: var(--spacing-md);
    animation: bounce 2s ease-in-out infinite;
    opacity: 0.7;
}

.instructions-icon svg {
    filter: drop-shadow(0 2px 8px rgba(135, 206, 235, 0.5));
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.canvas-instructions p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    font-weight: 600;
}

/* === VIEW CONTROLS === */
.view-controls {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    align-items: center;
    margin-top: var(--spacing-md);
    padding: var(--spacing-md);
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-view {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-view svg {
    flex-shrink: 0;
}

.btn-view:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.control-spacer {
    flex: 1;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    background: var(--maga-red);
    color: var(--maga-white);
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-action:hover {
    background: var(--maga-red-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* === STICKER LIBRARY === */
.sticker-library {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-lg);
    border: 2px solid var(--maga-blue);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 20px;
    height: fit-content;
}

.library-header {
    margin-bottom: var(--spacing-md);
}

.library-header h3 {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--maga-white);
    margin-bottom: var(--spacing-md);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.search-input {
    width: 100%;
    background: var(--bg-elevated);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    outline: none;
    transition: all 0.2s ease;
}

.search-input:focus {
    border-color: var(--maga-red);
    box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.2);
}

.pack-tabs {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    overflow-x: auto;
    padding-bottom: var(--spacing-sm);
}

.pack-tabs button {
    background: var(--bg-elevated);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.pack-tabs button:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.pack-tabs button.active {
    background: var(--maga-red);
    color: var(--maga-white);
    border-color: var(--maga-red);
}

.sticker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: var(--spacing-md);
    overflow-y: auto;
    padding: var(--spacing-sm);
    max-height: 500px;
}

.sticker-grid::-webkit-scrollbar {
    width: 8px;
}

.sticker-grid::-webkit-scrollbar-track {
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
}

.sticker-grid::-webkit-scrollbar-thumb {
    background: var(--maga-red);
    border-radius: var(--radius-sm);
}

.sticker-grid::-webkit-scrollbar-thumb:hover {
    background: var(--maga-red-dark);
}

.trait-card {
    background: var(--bg-elevated);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: var(--spacing-sm);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
}

.trait-card:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--maga-red);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.trait-thumb {
    width: 100%;
    height: 80px;
    object-fit: contain;
    border-radius: var(--radius-sm);
}

.trait-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: center;
    word-break: break-word;
}

.library-footer {
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-hint {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-align: center;
}

/* === FOOTER === */
.main-footer {
    background: var(--maga-blue-dark);
    border-top: 3px solid var(--maga-red);
    margin-top: var(--spacing-2xl);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-2xl) var(--spacing-lg);
    text-align: center;
}

.legal {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.8;
    font-weight: 400;
    letter-spacing: 0.3px;
    opacity: 0.9;
}

/* === NOTIFICATION === */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--bg-elevated);
    color: var(--text-primary);
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border-left: 4px solid var(--maga-red);
    z-index: 10000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    max-width: 320px;
    font-weight: 600;
}

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

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    .editor-container {
        grid-template-columns: 1fr;
    }
    
    .sticker-library {
        max-height: 500px;
        position: relative;
        top: 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .toolbar {
        flex-wrap: wrap;
    }
    
    .scroll-to-generator {
        font-size: 1.125rem;
        padding: 18px 36px;
    }
    
    .token-address {
        max-width: 150px;
    }
    
    /* Make buttons touch-friendly on tablets */
    .btn-tool, .btn-view {
        min-height: 40px;
        padding: 10px 14px;
    }
}

@media (max-width: 768px) {
    /* Tablet and smaller optimizations */
    .landing-hero {
        min-height: 100vh;
    }
    
    .hero-image {
        object-position: center;
    }
    
    .section-title {
        font-size: 1.875rem;
        margin-bottom: var(--spacing-xl);
    }
    
    .section-subtitle {
        font-size: 1.125rem;
        margin-bottom: var(--spacing-xl);
    }
    
    .canvas-section {
        padding: var(--spacing-md);
    }
    
    .toolbar {
        gap: 6px;
        padding: var(--spacing-sm);
    }
    
    .toolbar-group {
        gap: 6px;
    }
    
    .btn-upload {
        font-size: 1rem;
        padding: 12px 24px;
    }
    
    .btn-export {
        font-size: 0.9rem;
        padding: 10px 16px;
    }
    
    /* Sticker library optimizations */
    .sticker-library {
        max-height: 400px;
    }
    
    .sticker-grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
        gap: var(--spacing-sm);
    }
    
    .trait-thumb {
        height: 70px;
    }
}

@media (max-width: 640px) {
    /* Mobile optimizations */
    .header-container {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-sm);
        padding: var(--spacing-sm) var(--spacing-md);
    }
    
    .header-nav {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .logo-hat {
        width: 50px;
    }
    
    .logo-text h1 {
        font-size: 1.125rem;
        line-height: 1.3;
    }
    
    .copy-token-btn {
        font-size: 0.7rem;
        padding: 6px 10px;
        min-width: 100px;
    }
    
    .social-link {
        width: 36px;
        height: 36px;
    }
    
    /* Hero section */
    .landing-hero {
        height: 100vh;
        min-height: 100vh;
    }
    
    .floating-actions {
        flex-direction: column;
        gap: var(--spacing-sm);
        padding: var(--spacing-sm) var(--spacing-md);
        bottom: 80px;
        max-width: 90%;
    }
    
    .floating-social {
        width: 40px;
        height: 40px;
    }
    
    .floating-token {
        padding: 8px 16px;
        font-size: 0.75rem;
        width: 100%;
        justify-content: center;
    }
    
    .token-address {
        max-width: 150px;
        font-size: 0.7rem;
    }
    
    /* Generator section */
    .section-title {
        font-size: 1.5rem;
        margin-bottom: var(--spacing-lg);
    }
    
    .section-subtitle {
        font-size: 0.9rem;
        margin-bottom: var(--spacing-lg);
    }
    
    .editor-main {
        padding: 40px var(--spacing-sm);
    }
    
    .canvas-section {
        padding: var(--spacing-sm);
        border-width: 1px;
    }
    
    /* Upload button mobile optimized */
    .upload-section {
        margin-bottom: var(--spacing-sm);
    }
    
    .btn-upload {
        font-size: 0.875rem;
        padding: 10px 20px;
        width: 100%;
    }
    
    .btn-upload svg {
        width: 18px;
        height: 18px;
    }
    
    /* Toolbar mobile optimized */
    .toolbar {
        padding: var(--spacing-sm);
        gap: 4px;
    }
    
    .toolbar-group {
        flex-wrap: wrap;
    }
    
    .toolbar-label {
        font-size: 0.75rem;
    }
    
    .btn-tool {
        font-size: 0.75rem;
        padding: 8px 10px;
        min-height: 44px;
    }
    
    .btn-tool svg {
        width: 14px;
        height: 14px;
    }
    
    .select-tool {
        font-size: 0.75rem;
        padding: 8px 10px;
    }
    
    .range-slider {
        width: 80px;
    }
    
    .btn-export {
        font-size: 0.875rem;
        padding: 10px 16px;
        width: 100%;
    }
    
    .btn-export svg {
        width: 18px;
        height: 18px;
    }
    
    /* Canvas mobile optimized */
    .canvas-wrapper {
        min-height: 300px;
        border-width: 2px;
    }
    
    #editorCanvas {
        max-width: 100%;
        height: auto;
    }
    
    .canvas-instructions p {
        font-size: 0.875rem;
    }
    
    .instructions-icon svg {
        width: 48px;
        height: 48px;
    }
    
    /* View controls mobile optimized */
    .view-controls {
        padding: var(--spacing-sm);
        gap: 4px;
    }
    
    .btn-view {
        font-size: 0.75rem;
        padding: 8px 12px;
        min-height: 44px;
    }
    
    .btn-view svg {
        width: 14px;
        height: 14px;
    }
    
    /* Sticker library mobile optimized */
    .sticker-library {
        padding: var(--spacing-md);
        max-height: 400px;
        border-width: 1px;
    }
    
    .library-header h3 {
        font-size: 1rem;
        margin-bottom: var(--spacing-sm);
    }
    
    .library-header h3 svg {
        width: 20px;
        height: 20px;
        margin-right: 6px;
    }
    
    .search-input {
        font-size: 0.875rem;
        padding: 8px 12px;
    }
    
    .pack-tabs {
        gap: 6px;
        margin-bottom: var(--spacing-sm);
    }
    
    .pack-tabs button {
        font-size: 0.75rem;
        padding: 6px 12px;
    }
    
    .sticker-grid {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
        gap: 8px;
        max-height: 350px;
        padding: var(--spacing-xs);
    }
    
    .trait-card {
        padding: 6px;
    }
    
    .trait-thumb {
        height: 60px;
    }
    
    .trait-name {
        font-size: 0.7rem;
    }
    
    .footer-hint {
        font-size: 0.75rem;
    }
    
    .footer-hint svg {
        width: 14px;
        height: 14px;
    }
    
    /* Footer mobile optimized */
    .main-footer {
        margin-top: var(--spacing-xl);
    }
    
    .footer-content {
        padding: var(--spacing-lg) var(--spacing-md);
    }
    
    .legal {
        font-size: 0.75rem;
    }
    
    /* Notification mobile optimized */
    .notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: calc(100% - 20px);
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: 0.875rem;
    }
    
    /* Hat rain effect - smaller on mobile */
    .hat {
        width: 25px;
        height: 25px;
    }
}

/* Extra small mobile devices */
@media (max-width: 375px) {
    .logo-text h1 {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.25rem;
    }
    
    .btn-upload {
        font-size: 0.8rem;
        padding: 8px 16px;
    }
    
    .toolbar {
        gap: 3px;
    }
    
    .btn-tool {
        font-size: 0.7rem;
        padding: 6px 8px;
    }
    
    .sticker-grid {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
        gap: 6px;
    }
    
    .trait-thumb {
        height: 50px;
    }
    
    .floating-actions {
        bottom: 60px;
    }
}

