* {
    box-sizing: border-box;
}

body {
    scrollbar-width: thin;
    scrollbar-color: #3a3a3a #0a0a0a;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #0a0a0a;
}

::-webkit-scrollbar-thumb {
    background: #3a3a3a;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4a4a4a;
}

.header-gradient {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0a0a0a 100%);
}

.glass-card {
    background: rgba(26, 26, 26, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(58, 58, 58, 0.5);
    transition: all 0.3s ease;
}

.glass-card:hover {
    border-color: rgba(58, 58, 58, 0.8);
}

.metallic-text {
    background: linear-gradient(135deg, #ffffff 0%, #c0c0c0 50%, #ffffff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shimmer-text {
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.prompt-preview {
    background: #0d0d0d;
}

.prompt-text {
    word-break: break-word;
}

.prompt-text::selection {
    background: #FF2800;
    color: white;
}

.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    height: 8px;
    background: #2a2a2a;
    border-radius: 4px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #FF2800, #DDB321);
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.15s;
    box-shadow: 0 0 10px rgba(255, 40, 0, 0.5);
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #FF2800, #DDB321);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

input[type="color"] {
    -webkit-appearance: none;
    appearance: none;
    background: none;
    cursor: pointer;
}

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

input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 8px;
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23888' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 24px;
    padding-right: 40px;
}

button {
    cursor: pointer;
    user-select: none;
}

button:active {
    transform: scale(0.98);
}

.btn-glow {
    box-shadow: 0 0 20px rgba(255, 40, 0, 0.3);
}

.btn-glow:hover {
    box-shadow: 0 0 30px rgba(255, 40, 0, 0.5);
}

.btn-glow-blue {
    box-shadow: 0 0 20px rgba(0, 150, 255, 0.3);
}

.btn-glow-blue:hover {
    box-shadow: 0 0 30px rgba(0, 150, 255, 0.5);
}

.glow-lambo {
    box-shadow: 0 0 15px rgba(221, 179, 33, 0.3);
}

.glow-bugatti {
    box-shadow: 0 0 15px rgba(0, 150, 255, 0.3);
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes slide-up {
    from {
        opacity: 0;
        transform: translate(-50%, 20px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

.animate-slide-up {
    animation: slide-up 0.3s ease-out;
}

@keyframes slide-in {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

.animate-slide-in {
    animation: slide-in 0.3s ease-out;
}

.car-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #2a2a2a;
    border-top-color: #FF2800;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.hover\:scale-102:hover {
    transform: scale(1.02);
}

/* Mobile responsiveness */
@media (max-width: 640px) {
    .glass-card {
        padding: 12px;
    }
    
    select, input[type="text"] {
        font-size: 16px;
    }
}

/* Hover effects for desktop */
@media (hover: hover) {
    .glass-card:hover {
        border-color: rgba(58, 58, 58, 0.8);
    }
}

/* Responsive grid adjustments */
@media (max-width: 1024px) {
    .lg\:grid-cols-3 {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .lg\:grid-cols-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}