/* Custom Styles for AD2ER */

/* RTL Support */
[dir="rtl"] {
    text-align: right;
}

[dir="ltr"] {
    text-align: left;
}

/* Smooth transitions */
* {
    transition: color 0.2s ease, background-color 0.2s ease;
}

/* Card hover effects */
.group:hover img {
    transform: scale(1.1);
}

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

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

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #FF6B35;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #e55a28;
}

/* Responsive text */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
}

/* Button styles */
button:active {
    transform: scale(0.98);
}

/* Backdrop overlay */
.backdrop-overlay {
    background: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.9) 100%);
}

/* Cast member card */
.cast-card {
    width: 120px;
    flex-shrink: 0;
}

/* Season/Episode card */
.episode-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.episode-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

/* Trailer container */
.trailer-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

.trailer-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Platform button */
.platform-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #FF6B35;
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.platform-btn:hover {
    background: #e55a28;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

/* Search filter container */
.filter-container {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 24px;
}

/* Watchlist badge */
.watchlist-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 107, 53, 0.9);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    z-index: 10;
}

[dir="rtl"] .watchlist-badge {
    right: auto;
    left: 10px;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state svg {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    opacity: 0.3;
}

/* Genre tags */
.genre-tag {
    display: inline-block;
    background: #f3f4f6;
    color: #374151;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 14px;
    margin: 4px;
}

/* Rating badge */
.rating-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 184, 0, 0.2);
    color: #FFB800;
    padding: 4px 10px;
    border-radius: 8px;
    font-weight: 600;
}

/* Responsive grid improvements */
@media (max-width: 640px) {
    .grid-cols-2 {
        gap: 12px;
    }
}

/* Toast notification (for future use) */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #1A1A1A;
    color: white;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 1000;
    animation: slideIn 0.3s ease-out;
}

[dir="rtl"] .toast {
    right: auto;
    left: 20px;
}

@keyframes slideIn {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Accessibility improvements */
a:focus, button:focus {
    outline: 2px solid #FF6B35;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    nav, footer, .platform-btn {
        display: none;
    }
}
