/* Global Styles for Sound Effects Factory */

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

/* Global Body Styles */
body {
    background: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 100%);
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

/* Navigation Styles */
.navbar {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Dropdown Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Improved Dropdown Hover Behavior */
.group:hover .group-hover\:block {
    display: block !important;
    animation: fadeIn 0.15s ease-out;
}

/* Add a slight delay before hiding to prevent accidental closes */
.group .group-hover\:block {
    transition: opacity 0.1s ease-in-out;
}

/* Cross-browser Select Styling - Fix for Firefox/Edge color inversion */
select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    /* Add custom dropdown arrow */
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

/* Force option styling for all browsers */
select option {
    background-color: #1a1a1a !important;
    color: white !important;
    padding: 8px !important;
}

/* Firefox-specific fixes */
@-moz-document url-prefix() {
    select {
        background-color: rgba(255, 255, 255, 0.1) !important;
        color: white !important;
    }
    select option {
        background-color: #1a1a1a !important;
        color: white !important;
    }
}

/* Edge/Webkit specific fixes */
select::-webkit-scrollbar {
    width: 8px;
}

select::-webkit-scrollbar-track {
    background: #1a1a1a;
}

select::-webkit-scrollbar-thumb {
    background: #f8f615;
    border-radius: 4px;
}

/* Ensure consistent styling across all browsers */
select[class*="bg-white/10"] {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: white !important;
}

select[class*="bg-white/10"] option {
    background-color: #1a1a1a !important;
    color: white !important;
}

/* Button Styles */
.btn-primary {
    background: linear-gradient(135deg, #f8f615 0%, #e6e014 100%);
    color: #0f0f0f !important;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.5;
    user-select: none;
    white-space: nowrap;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(248, 246, 21, 0.3);
    color: #0f0f0f !important;
    text-decoration: none !important;
}

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

.btn-primary:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(248, 246, 21, 0.3);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff !important;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.5;
    user-select: none;
    white-space: nowrap;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    color: #ffffff !important;
    text-decoration: none !important;
}

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

.btn-outline:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff !important;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.5;
    user-select: none;
    white-space: nowrap;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
    color: #ffffff !important;
    text-decoration: none !important;
}

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

.btn-secondary:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

/* Glass Effect Components */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.glass-form {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem;
    transition: all 0.3s ease;
}

.card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Form Styles */
.form-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    transition: all 0.3s ease;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-family: 'Inter', sans-serif;
}

.form-input:focus {
    outline: none;
    border-color: #f8f615;
    box-shadow: 0 0 0 3px rgba(248, 246, 21, 0.1);
    background: rgba(255, 255, 255, 0.08);
}

.form-input::placeholder {
    color: #9ca3af;
}

/* Text Utilities */
.text-gradient {
    background: linear-gradient(135deg, #f8f615 0%, #e6e014 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Navigation Link Styles */
.nav-link {
    color: #d1d5db;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    font-weight: 500;
}

.nav-link:hover {
    color: #f8f615;
    background: rgba(255, 255, 255, 0.05);
    text-decoration: none;
}

.nav-link:active,
.nav-link:focus {
    color: #f8f615;
    text-decoration: none;
    outline: none;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    background: none;
    border: none;
    color: #d1d5db;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
    color: #f8f615;
    background: rgba(255, 255, 255, 0.05);
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-weight: 500;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

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

.notification.success {
    background: rgba(34, 197, 94, 0.9);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #ffffff;
}

.notification.error {
    background: rgba(239, 68, 68, 0.9);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ffffff;
}

/* Animation Utilities */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

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

/* Loading States */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading .btn-primary {
    background: #666;
    cursor: not-allowed;
}

/* Responsive Design */
@media (max-width: 768px) {
    .btn-primary,
    .btn-outline {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
        min-height: 44px; /* Ensure touch-friendly size */
        width: 100%; /* Full width on mobile */
        justify-content: center;
        text-align: center;
    }
    
    .card {
        padding: 1.5rem;
        margin: 0.5rem;
    }
    
    /* Navigation fixes */
    .navbar {
        padding: 0.5rem 1rem;
    }
    
    /* Form improvements */
    .form-input {
        padding: 1rem;
        font-size: 1rem; /* Prevent zoom on iOS */
        min-height: 44px;
    }
    
    /* Auth page mobile fixes */
    .glass-form {
        padding: 1.5rem !important;
        margin: 1rem;
        max-width: calc(100vw - 2rem);
    }
    
    /* Button spacing fixes */
    .space-y-4 > * + * {
        margin-top: 1rem;
    }
    
    .space-y-6 > * + * {
        margin-top: 1.5rem;
    }
    
    /* Prevent button overlap */
    .flex.gap-4 {
        gap: 0.75rem;
    }
    
    .flex.gap-3 {
        gap: 0.5rem;
    }
    
    .flex.gap-2 {
        gap: 0.375rem;
    }
    
    .flex.gap-1 {
        gap: 0.25rem;
    }
    
    /* Sound card mobile improvements */
    .sound-card .flex.items-center.gap-1 {
        flex-wrap: wrap;
        gap: 0.25rem;
    }
    
    .sound-card button {
        min-width: 44px;
        min-height: 44px;
        touch-action: manipulation;
    }
    
    /* Mobile action buttons */
    .mobile-actions {
        display: flex;
        gap: 0.5rem;
        align-items: center;
        justify-content: flex-end;
        flex-wrap: nowrap;
    }
    
    .mobile-actions button {
        flex-shrink: 0;
        min-width: 40px;
        min-height: 40px;
    }
    
    /* Mobile menu improvements */
    #mobile-menu {
        max-height: calc(100vh - 80px);
        overflow-y: auto;
    }
    
    /* Mobile navigation clean layout */
    @media (max-width: 1023px) {
        /* Hide desktop nav items on mobile/tablet */
        .lg\\:flex {
            display: none !important;
        }
        
        /* Ensure mobile menu button is always visible */
        .lg\\:hidden {
            display: flex !important;
        }
        
        /* Mobile navigation spacing */
        .navbar {
            padding: 0.75rem 1rem;
        }
        
        /* Mobile menu user section */
        .mobile-user-section {
            background: rgba(255, 255, 255, 0.05);
            border-radius: 12px;
            margin: 0 -4px;
        }
        
        /* Mobile menu button styling */
        #mobile-menu button {
            width: 100%;
            text-align: left;
            justify-content: flex-start;
        }
        
        /* Mobile menu spacing */
        #mobile-menu .space-y-2 > * + * {
            margin-top: 0.25rem;
        }
    }
    
    /* Text size adjustments */
    h1 {
        font-size: 1.875rem; /* 30px */
        line-height: 1.2;
    }
    
    h2 {
        font-size: 1.5rem; /* 24px */
        line-height: 1.3;
    }
    
    h3 {
        font-size: 1.25rem; /* 20px */
        line-height: 1.4;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .btn-primary,
    .btn-outline {
        padding: 0.875rem 0.75rem;
        font-size: 0.875rem;
        min-height: 48px;
    }
    
    .glass-form {
        padding: 1rem !important;
        margin: 0.5rem;
        border-radius: 1rem !important;
    }
    
    /* Smaller text on very small screens */
    h1 {
        font-size: 1.5rem; /* 24px */
    }
    
    .text-3xl {
        font-size: 1.5rem !important;
    }
    
    .text-2xl {
        font-size: 1.25rem !important;
    }
    
    .text-xl {
        font-size: 1.125rem !important;
    }
    
    /* Tighter spacing */
    .px-8 {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    .py-4 {
        padding-top: 0.75rem !important;
        padding-bottom: 0.75rem !important;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .btn-primary {
        border: 2px solid #000;
    }
    
    .btn-outline {
        border: 2px solid #fff;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Touch-friendly hover states */
    .hover\:bg-accent-500:hover,
    .hover\:bg-accent-600:hover {
        background-color: rgba(248, 246, 21, 0.1) !important;
    }
    
    /* Larger touch targets */
    button, 
    .btn-primary, 
    .btn-outline,
    a[role="button"] {
        min-height: 48px;
        min-width: 48px;
        padding: 0.875rem 1.25rem;
    }
    
    /* Remove hover effects on touch devices */
    .group:hover .group-hover\:opacity-100 {
        opacity: 1;
    }
    
    /* Always show action buttons on touch devices */
    .group .opacity-0 {
        opacity: 1 !important;
    }
}

/* iOS Safari specific fixes */
@supports (-webkit-touch-callout: none) {
    /* Fix iOS zoom on input focus */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    textarea,
    select {
        font-size: 16px !important;
    }
    
    /* Fix iOS button styling */
    button,
    .btn-primary,
    .btn-outline {
        -webkit-appearance: none;
        appearance: none;
        border-radius: 12px;
    }
} 