/* Tùy chỉnh styles bổ sung cho website */

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Line clamp utilities */
.line-clamp-1 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    line-clamp: 1;
}

.line-clamp-2 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: #4a5568;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #718096;
}

/* Loading spinner */
.spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Notification animations */
.notification {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* File input styles */
.file-input-label {
    cursor: pointer;
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: #374151;
    color: white;
    border-radius: 0.375rem;
    transition: all 0.2s;
    border: 2px dashed transparent;
}

.file-input-label:hover {
    background-color: #4b5563;
    border-color: #0ea5e9;
}

.file-input {
    display: none;
}

/* File upload styles */
.file-upload-area {
    border: 2px dashed #4b5563;
    border-radius: 0.5rem;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.2s;
    cursor: pointer;
}

.file-upload-area:hover {
    border-color: #0ea5e9;
    background-color: rgba(14, 165, 233, 0.05);
}

.file-upload-area.drag-over {
    border-color: #0ea5e9;
    background-color: rgba(14, 165, 233, 0.1);
}

/* Avatar preview styles */
.avatar-preview {
    position: relative;
}

.avatar-preview img {
    transition: all 0.3s;
}

.avatar-preview:hover img {
    transform: scale(1.05);
}

/* Upload progress bar */
.upload-progress-bar {
    transition: width 0.3s ease;
}

/* Token input security */
#github-token {
    font-family: 'Courier New', monospace;
}

/* Preview buttons */
.preview-buttons {
    opacity: 0;
    transition: opacity 0.3s;
}

.avatar-preview:hover .preview-buttons {
    opacity: 1;
}

/* Hover effects */
.hover-lift {
    transition: transform 0.2s;
}

.hover-lift:hover {
    transform: translateY(-4px);
}

/* Gradient text */
.text-gradient {
    background: linear-gradient(90deg, #38bdf8, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Focus styles */
button:focus, input:focus, textarea:focus {
    outline: 2px solid #0ea5e9;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .bg-gray-800 {
        border: 1px solid #fff;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Modal styles */
.modal {
    backdrop-filter: blur(8px);
}

/* Profile tabs */
.profile-tab-btn.active {
    color: #38bdf8;
    border-bottom-color: #38bdf8;
}

.profile-tab-btn:hover {
    color: white;
}

/* Member cards hover effect */
.member-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.member-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
}

/* Publication type badges */
.publication-type-badge {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Project level badges */
.project-level-badge {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Scrollbar for modal */
.max-h-\[90vh\]::-webkit-scrollbar {
    width: 6px;
}

.max-h-\[90vh\]::-webkit-scrollbar-track {
    background: #374151;
}

.max-h-\[90vh\]::-webkit-scrollbar-thumb {
    background: #6B7280;
    border-radius: 3px;
}

.max-h-\[90vh\]::-webkit-scrollbar-thumb:hover {
    background: #9CA3AF;
}

/* Animation for profile cards */
@keyframes slideInFromBottom {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.profile-content {
    animation: slideInFromBottom 0.3s ease-out;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .member-profile-modal .bg-gray-800 {
        margin: 1rem;
        max-height: calc(100vh - 2rem);
    }
    
    .member-card:hover {
        transform: none;
    }
}
