/* Enhanced Translators Page Styles */

/* Mobile-first responsive improvements */
@media (max-width: 768px) {
    /* Add bottom padding to avoid mobile navigation overlap */
    .translators-page-content {
        padding-bottom: 80px;
    }

    /* Improved mobile card layout */
    .translator-card {
        margin-bottom: 1rem;
        border-radius: 1rem;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    }

    /* Mobile search input improvements */
    .mobile-search-input:focus {
        box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
    }

    /* Mobile overlay animations */
    .mobile-overlay-enter {
        transform: translateY(100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .mobile-overlay-enter-active {
        transform: translateY(0);
    }

    .mobile-overlay-exit {
        transform: translateY(0);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .mobile-overlay-exit-active {
        transform: translateY(100%);
    }

    /* Mobile header adjustments */
    .mobile-header {
        padding: 0.75rem 1rem;
    }

    .mobile-header .logo {
        height: 2.5rem;
        width: 2.5rem;
    }

    .mobile-header .brand-text {
        font-size: 1.25rem;
    }

    /* Mobile navigation menu */
    .mobile-menu {
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-top: 1px solid rgba(229, 231, 235, 0.8);
    }

    .mobile-menu-item {
        padding: 0.875rem 1rem;
        border-radius: 0.5rem;
        margin: 0.25rem 0;
        transition: all 0.2s ease;
    }

    .mobile-menu-item:hover {
        background-color: rgba(79, 70, 229, 0.05);
        transform: translateX(4px);
    }

    .mobile-menu-item.active {
        background-color: rgba(79, 70, 229, 0.1);
        color: #4F46E5;
        font-weight: 600;
    }
}

/* Enhanced card hover effects */
.translator-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.translator-card:hover .avatar-container {
    transform: scale(1.05);
}

.translator-card:hover .action-buttons {
    opacity: 1;
    transform: translateX(0);
}

/* Translation card enhancements */
.translation-card {
    border-radius: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    background: linear-gradient(145deg, #ffffff 0%, #fafafa 100%);
    border: 1px solid rgba(229, 231, 235, 0.8);
}

.dark .translation-card {
    background: linear-gradient(145deg, #1f2937 0%, #111827 100%);
    border: 1px solid rgba(75, 85, 99, 0.3);
}

.translation-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.12);
    border-color: rgba(79, 70, 229, 0.3);
}

.dark .translation-card:hover {
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
}

/* Loading states */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.dark .skeleton {
    background: linear-gradient(90deg, #374151 25%, #4b5563 50%, #374151 75%);
    background-size: 200% 100%;
}

/* Enhanced filter animations */
.filter-tag {
    animation: fadeInScale 0.3s ease-out;
    border-radius: 9999px;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.filter-tag:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Advanced grid layout for larger screens */
@media (min-width: 1536px) {
    .translators-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
        gap: 2rem;
    }
}

/* Improved scrollbar for webkit browsers */
.translators-container::-webkit-scrollbar {
    width: 8px;
}

.translators-container::-webkit-scrollbar-track {
    background: rgba(243, 244, 246, 0.5);
    border-radius: 4px;
}

.translators-container::-webkit-scrollbar-thumb {
    background: rgba(156, 163, 175, 0.8);
    border-radius: 4px;
    transition: background 0.2s ease;
}

.translators-container::-webkit-scrollbar-thumb:hover {
    background: rgba(107, 114, 128, 0.9);
}

/* Dark mode scrollbar */
.dark .translators-container::-webkit-scrollbar-track {
    background: rgba(55, 65, 81, 0.5);
}

.dark .translators-container::-webkit-scrollbar-thumb {
    background: rgba(75, 85, 99, 0.8);
}

.dark .translators-container::-webkit-scrollbar-thumb:hover {
    background: rgba(107, 114, 128, 0.9);
}

/* Search input enhancements */
.search-input-container {
    position: relative;
    transition: all 0.3s ease;
}

.search-input-container:focus-within {
    transform: translateY(-2px);
    filter: drop-shadow(0 10px 25px rgba(79, 70, 229, 0.15));
}

.search-input {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
}

.search-input:focus {
    border-color: #4F46E5;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

/* Button enhancements */
.btn-primary {
    background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
    border: none;
    color: white;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(79, 70, 229, 0.3);
    background: linear-gradient(135deg, #4338CA 0%, #6D28D9 100%);
}

.btn-secondary {
    background: white;
    border: 2px solid #4F46E5;
    color: #4F46E5;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #4F46E5;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.25);
}

/* Card glow effect */
.card-glow {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
}

.card-glow::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #4F46E5, #7C3AED, #06B6D4, #10B981);
    border-radius: inherit;
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s;
    animation: rotate 4s linear infinite;
}

.card-glow:hover::before {
    opacity: 0.3;
}

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

/* Progress bar styles */
.progress-bar {
    background: linear-gradient(90deg, #4F46E5, #7C3AED);
    height: 4px;
    border-radius: 2px;
    transition: width 0.5s ease;
    position: relative;
    overflow: hidden;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background-image: linear-gradient(
        -45deg,
        rgba(255, 255, 255, .2) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, .2) 50%,
        rgba(255, 255, 255, .2) 75%,
        transparent 75%,
        transparent
    );
    background-size: 1rem 1rem;
    animation: move 1s linear infinite;
}

@keyframes move {
    0% { background-position: 0 0; }
    100% { background-position: 1rem 1rem; }
}

/* Status indicators */
.status-online {
    position: relative;
}

.status-online::before {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background: #10B981;
    border-radius: 50%;
    top: -2px;
    right: -2px;
    animation: pulse 2s infinite;
    border: 2px solid white;
}

.dark .status-online::before {
    border-color: #1f2937;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.3);
        opacity: 0.7;
    }
}

/* Custom select arrow */
.select-arrow {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    appearance: none;
    transition: all 0.2s ease;
}

.select-arrow:focus {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%234F46E5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
}

/* Typography enhancements */
.text-gradient {
    background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

/* Mobile-specific improvements */
@media (max-width: 640px) {
    .hero-title {
        font-size: 2rem;
        line-height: 2.25rem;
    }

    .hero-subtitle {
        font-size: 1rem;
        line-height: 1.5rem;
    }

    .search-container {
        padding: 1rem;
    }

    .search-input {
        height: 3rem;
        font-size: 1rem;
    }

    .search-button {
        height: 2.5rem;
        min-width: 2.5rem;
        padding: 0 0.75rem;
    }

    .card-grid {
        gap: 1rem;
    }

    .translation-card {
        padding: 1rem;
    }

    .filter-section {
        padding: 1rem;
        gap: 0.5rem;
    }

    .filter-tag {
        padding: 0.375rem 0.75rem;
        font-size: 0.8125rem;
    }
}

/* Tablet-specific improvements */
@media (min-width: 641px) and (max-width: 1024px) {
    .search-container {
        padding: 1.5rem;
    }

    .card-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .hero-section {
        padding: 2rem 1.5rem;
    }
}

/* Desktop enhancements */
@media (min-width: 1025px) {
    .search-container:hover {
        transform: translateY(-1px);
    }

    .card-grid {
        gap: 2rem;
    }

    .translation-card {
        padding: 1.5rem;
    }

    .hero-section {
        padding: 3rem 2rem;
    }
}
    width: 6px;
}

.translators-container::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.translators-container::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.translators-container::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Dark mode scrollbar */
.dark .translators-container::-webkit-scrollbar-track {
    background: #1e293b;
}

.dark .translators-container::-webkit-scrollbar-thumb {
    background: #475569;
}

/* Enhanced tooltip styles */
.tooltip {
    position: absolute;
    z-index: 9999;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
    color: white;
    background-color: #1f2937;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    opacity: 0;
    animation: tooltipFadeIn 0.2s ease-out forwards;
}

.tooltip::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #1f2937 transparent transparent transparent;
}

@keyframes tooltipFadeIn {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Enhanced button styles */
.btn-enhanced {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-enhanced::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-enhanced:hover::before {
    width: 300px;
    height: 300px;
}

/* Advanced search input styles */
.search-input-enhanced {
    position: relative;
    transition: all 0.3s ease;
}

.search-input-enhanced:focus {
    transform: scale(1.02);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1), 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Floating labels for form inputs */
.floating-label {
    position: relative;
}

.floating-label input {
    padding-top: 1.25rem;
}

.floating-label label {
    position: absolute;
    left: 0.75rem;
    top: 0.75rem;
    color: #6b7280;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    pointer-events: none;
    transform-origin: left top;
}

.floating-label input:focus + label,
.floating-label input:not(:placeholder-shown) + label {
    transform: translateY(-0.5rem) scale(0.8);
    color: #4f46e5;
}

/* Enhanced pagination styles */
.pagination-btn {
    transition: all 0.2s ease;
    position: relative;
}

.pagination-btn:hover {
    transform: translateY(-1px);
}

.pagination-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: linear-gradient(90deg, #4f46e5, #7c3aed);
    border-radius: 1.5px;
}

/* Improved accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for better accessibility */
.focus-visible:focus {
    outline: 2px solid #4f46e5;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .translator-card {
        border: 2px solid;
    }

    .btn-primary {
        border: 2px solid;
    }
}

/* Print styles */
@media print {
    .mobile-navigation,
    .loading-overlay,
    .filter-section {
        display: none !important;
    }

    .translator-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #000;
        margin-bottom: 1rem;
    }
}

/* Custom selection styles */
::selection {
    background-color: rgba(79, 70, 229, 0.2);
    color: inherit;
}

::-moz-selection {
    background-color: rgba(79, 70, 229, 0.2);
    color: inherit;
}
