* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.header-gradient {
    background: linear-gradient(135deg, #FF6B6B 0%, #FF69B4 50%, #9B59B6 100%);
    position: relative;
}

.header-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { left: -100%; }
    100% { left: 100%; }
}

.card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.prompt-preview {
    background: linear-gradient(135deg, #fdf2f8 0%, #faf5ff 100%);
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 13px;
    line-height: 1.6;
    color: #6B7280;
    word-wrap: break-word;
}

.generate-btn {
    background: linear-gradient(135deg, #FF6B6B 0%, #FF69B4 50%, #9B59B6 100%);
    background-size: 200% 200%;
    animation: gradient-shift 3s ease infinite;
    box-shadow: 0 4px 15px rgba(255, 105, 180, 0.4);
}

.generate-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 105, 180, 0.5);
}

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

.image-preview {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    min-height: 300px;
}

.loading-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.confetti-piece {
    position: absolute;
    top: -10px;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    animation: confetti-fall linear forwards;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

.berry-mode {
    background: linear-gradient(135deg, #ff0066 0%, #ff6699 25%, #ff99cc 50%, #ffccff 75%, #ffffff 100%) !important;
    animation: berry-pulse 2s ease-in-out infinite;
}

@keyframes berry-pulse {
    0%, 100% { filter: hue-rotate(0deg); }
    50% { filter: hue-rotate(20deg); }
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #FF6B6B, #FF69B4);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #FF69B4, #9B59B6);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .header-gradient {
        padding: 1.5rem 1rem;
    }
    
    .header-gradient h1 {
        font-size: 1.5rem;
    }
    
    .card {
        padding: 1rem;
    }
}

/* Button hover effects */
button {
    cursor: pointer;
}

select:focus, textarea:focus {
    outline: none;
}

/* Smooth transitions for all interactive elements */
button, select, textarea, input {
    transition: all 0.2s ease;
}