/* Custom styles - Enhanced for Export Feature */

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

/* Smooth scrolling for category filters */
.overflow-x-auto {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.overflow-x-auto::-webkit-scrollbar {
    display: none;
}

/* Custom focus styles */
input:focus {
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5);
}

/* Hover animations */
.hover\:scale-105:hover {
    transform: scale(1.02);
}

/* Loading skeleton animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

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

/* Spinner animation for export button */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Custom transition timing */
.transition-all {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Modal animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-overlay {
    animation: fadeIn 200ms ease-out;
}

.modal-content {
    animation: slideUp 300ms ease-out;
}

/* YouTube play button styling */
.youtube-play-button {
    width: 0;
    height: 0;
    border-left: 8px solid white;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    margin-left: 2px;
}

/* Berrry accent color highlights */
.text-berrry {
    color: #FF3366;
}

.bg-berrry {
    background-color: #FF3366;
}

.border-berrry {
    border-color: #FF3366;
}

/* Code preview styling */
pre {
    white-space: pre-wrap;
    word-wrap: break-word;
}

code {
    font-family: 'Courier New', Courier, monospace;
}

/* Responsive grid adjustments */
@media (max-width: 640px) {
    .grid-cols-1 {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }
}

@media (min-width: 640px) {
    .sm\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

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

@media (min-width: 1280px) {
    .xl\:grid-cols-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* Dark mode specific adjustments */
.dark .bg-white {
    background-color: #1f2937;
}

.dark .text-black {
    color: #f9fafb;
}

.dark .border-border-gray {
    border-color: #374151;
}

/* Sidebar transition */
.translate-x-0 {
    transform: translateX(0);
}

.-translate-x-full {
    transform: translateX(-100%);
}

/* Video card hover effects */
.video-card:hover .thumbnail {
    transform: scale(1.05);
}

.video-card:hover .more-options {
    opacity: 1;
}

.more-options {
    opacity: 0;
    transition: opacity 0.2s ease;
}

/* Search suggestions styling */
.search-suggestions {
    max-height: 200px;
    overflow-y: auto;
}

.search-suggestions::-webkit-scrollbar {
    width: 4px;
}

.search-suggestions::-webkit-scrollbar-thumb {
    background-color: #d1d5db;
    border-radius: 2px;
}

.search-suggestions::-webkit-scrollbar-thumb:hover {
    background-color: #9ca3af;
}

/* Category filter pills */
.category-pill {
    transition: all 0.2s ease;
}

.category-pill:hover {
    transform: translateY(-1px);
}

/* 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%;
}

/* Export button special styling */
button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

/* Success animation */
@keyframes checkmark {
    0% {
        transform: scale(0) rotate(45deg);
    }
    50% {
        transform: scale(1.2) rotate(45deg);
    }
    100% {
        transform: scale(1) rotate(45deg);
    }
}

.success-check {
    animation: checkmark 0.3s ease-in-out;
}

/* Scrollbar styling for code preview */
.overflow-auto::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.overflow-auto::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.dark .overflow-auto::-webkit-scrollbar-track {
    background: #374151;
}

.overflow-auto::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.overflow-auto::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Footer link styling */
a {
    transition: all 0.2s ease;
}

a:hover {
    opacity: 0.8;
}