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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.upload-section {
    margin-bottom: 25px;
}

.upload-area {
    border: 2px dashed #ffffff60;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover {
    border-color: #ffffff80;
    background: rgba(255,255,255,0.15);
    transform: translateY(-2px);
}

.upload-area.dragover {
    border-color: #4CAF50;
    background: rgba(76,175,80,0.1);
}

.upload-content {
    color: white;
}

.upload-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.upload-content p {
    font-size: 0.95rem;
    margin-bottom: 15px;
    opacity: 0.9;
}

.upload-btn {
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(76,175,80,0.3);
}

.upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76,175,80,0.4);
}

.upload-progress {
    margin-top: 20px;
    background: rgba(255,255,255,0.1);
    padding: 20px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255,255,255,0.2);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(45deg, #4CAF50, #45a049);
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    color: white;
    font-size: 0.9rem;
}

.sticker-grid {
    column-count: 6;
    column-gap: 15px;
    padding: 15px;
    background: rgba(255,255,255,0.1);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    min-height: 150px;
}

.sticker-item {
    position: relative;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: grab;
    user-select: none;
    display: inline-block;
    width: 100%;
    margin-bottom: 15px;
    break-inside: avoid;
    overflow: hidden;
}

.sticker-item:hover {
    transform: translateY(-2px) scale(1.02);
    filter: brightness(1.1);
}

.sticker-item:active {
    cursor: grabbing;
    transform: scale(0.95);
}

.sticker-item img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.sticker-actions {
    position: absolute;
    top: 5px;
    right: 5px;
    display: flex;
    gap: 5px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sticker-item:hover .sticker-actions {
    opacity: 1;
}

.action-btn {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s ease;
}

.copy-btn {
    background: #2196F3;
    color: white;
}

.copy-btn:hover {
    background: #1976D2;
    transform: scale(1.1);
}

.delete-btn {
    background: #f44336;
    color: white;
}

.delete-btn:hover {
    background: #d32f2f;
    transform: scale(1.1);
}

.loading {
    grid-column: 1 / -1;
    text-align: center;
    color: white;
    padding: 40px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255,255,255,0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* PWA Install Button */
.install-btn {
    background: linear-gradient(135deg, #4c9aff, #2684ff);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 15px;
    box-shadow: 0 4px 15px rgba(76, 154, 255, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.install-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 154, 255, 0.4);
    background: linear-gradient(135deg, #2684ff, #4c9aff);
}

.install-btn:active {
    transform: translateY(0);
}

/* PWA Indicators */
.pwa-indicator {
    position: fixed;
    top: 10px;
    right: 10px;
    background: rgba(76, 154, 255, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 1000;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Offline mode styling */
.offline-mode {
    filter: grayscale(0.3);
    opacity: 0.8;
}

.offline-mode::before {
    content: "📴 Offline Mode";
    position: fixed;
    top: 50px;
    right: 10px;
    background: rgba(255, 152, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

/* PWA Splash Screen Styling */
@media (display-mode: standalone) {
    body {
        -webkit-user-select: none;
        -webkit-touch-callout: none;
        -webkit-tap-highlight-color: transparent;
    }
    
    .container {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* PWA Status Bar */
.pwa-status-bar {
    height: env(safe-area-inset-top);
    background: #1a1a1a;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: white;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.empty-state p {
    opacity: 0.8;
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 10px;
    color: white;
    font-weight: 500;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    z-index: 1000;
    max-width: 300px;
}

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

.notification.success {
    background: linear-gradient(45deg, #4CAF50, #45a049);
}

.notification.error {
    background: linear-gradient(45deg, #f44336, #d32f2f);
}

.notification.info {
    background: linear-gradient(45deg, #2196F3, #1976D2);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .sticker-grid {
        column-count: 5;
        column-gap: 12px;
    }
    
    .sticker-item {
        margin-bottom: 12px;
    }
}

@media (max-width: 900px) {
    .sticker-grid {
        column-count: 4;
        column-gap: 10px;
        padding: 12px;
    }
    
    .sticker-item {
        margin-bottom: 10px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 8px;
    }
    
    .upload-area {
        padding: 12px 8px;
    }
    
    .upload-icon {
        font-size: 2rem;
    }
    
    .upload-content p {
        font-size: 0.85rem;
    }
    
    .sticker-grid {
        column-count: 4;
        column-gap: 8px;
        padding: 10px;
    }
    
    .sticker-item {
        margin-bottom: 8px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 6px;
    }
    
    .sticker-grid {
        column-count: 4;
        column-gap: 6px;
        padding: 8px;
    }
    
    .sticker-item {
        margin-bottom: 6px;
    }
}

/* Drag and Drop Styles */
.dragging {
    opacity: 0.7;
    transform: rotate(5deg);
    z-index: 1000;
    pointer-events: none;
}

.drop-zone {
    border: 2px dashed #4CAF50;
    background: rgba(76,175,80,0.1);
}

/* Copy to clipboard animation */
@keyframes copySuccess {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.copy-success {
    animation: copySuccess 0.3s ease;
}