/* Custom Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* Base Styles */
:root {
    --primary-color: #4F46E5;
    --primary-light: #EEF2FF;
    --primary-dark: #4338CA;
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;
}

/* Custom Components */
.qr-preview {
    position: relative;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.qr-preview:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.color-picker {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: transparent;
    width: 38px;
    height: 38px;
    border: none;
    cursor: pointer;
    padding: 0;
}

.color-picker::-webkit-color-swatch {
    border-radius: 8px;
    border: 2px solid var(--gray-200);
}

.color-picker::-moz-color-swatch {
    border-radius: 8px;
    border: 2px solid var(--gray-200);
}

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

.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

/* Custom Form Elements */
.custom-input {
    @apply w-full p-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500;
    transition: all 0.2s ease;
}

.custom-input:focus {
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Custom Buttons */
.btn-primary {
    @apply bg-indigo-600 hover:bg-indigo-700 text-white px-6 py-2 rounded-md font-medium shadow;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.btn-secondary {
    @apply bg-white border border-gray-300 text-gray-700 px-6 py-2 rounded-md font-medium;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    @apply bg-gray-50;
    transform: translateY(-1px);
}

/* Template Cards */
.template-card {
    @apply border-2 border-gray-200 rounded-lg p-2 bg-white;
    transition: all 0.3s ease;
}

.template-card:hover {
    @apply border-indigo-500;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Responsive Adjustments */
@media (max-width: 640px) {
    .qr-preview {
        margin: 1rem 0;
    }
    
    .template-card {
        margin-bottom: 1rem;
    }
}

/* Loading States */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: loading 1.5s infinite;
}

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

/* Error States */
.error-message {
    @apply text-red-600 text-sm mt-1;
    animation: shake 0.5s ease-in-out;
}

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

/* Success States */
.success-message {
    @apply text-green-600 text-sm mt-1;
    animation: fadeIn 0.3s ease-in-out;
}

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

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

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

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

.qr-code-preview img {
    transition: all 0.3s ease;
    max-width: 100%;
    height: auto;
} 