/**
 * AnhdepHD Animations & Effects
 * Add smooth animations and hover effects
 */

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Fade in animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Card animations - DISABLED for immediate visibility */
.anhdephd-post-card,
.anhdephd-wallpaper-card,
.anhdephd-trending-item {
    /* animation: fadeInUp 0.6s ease-out forwards; */
    opacity: 1 !important;
}

/* Animation delays - DISABLED
.anhdephd-post-card:nth-child(1) { animation-delay: 0.1s; }
.anhdephd-post-card:nth-child(2) { animation-delay: 0.2s; }
.anhdephd-post-card:nth-child(3) { animation-delay: 0.3s; }
.anhdephd-post-card:nth-child(4) { animation-delay: 0.4s; }
.anhdephd-post-card:nth-child(5) { animation-delay: 0.5s; }
.anhdephd-post-card:nth-child(6) { animation-delay: 0.6s; }
*/

/* Hover lift effect */
.anhdephd-post-card,
.anhdephd-wallpaper-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.anhdephd-post-card:hover,
.anhdephd-wallpaper-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

/* Image loading skeleton - DISABLED for immediate visibility */
.anhdephd-img {
    /* background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%); */
    /* background-size: 200% 100%; */
    /* animation: shimmer 1.5s infinite; */
    display: block !important;
    opacity: 1 !important;
}

.anhdephd-img[src] {
    background: none;
    animation: none;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Badge pulse effect */
.anhdephd-badge {
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Button ripple effect */
.anhdephd-button,
.anhdephd-read-more {
    position: relative;
    overflow: hidden;
}

.anhdephd-button::before,
.anhdephd-read-more::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.anhdephd-button:hover::before,
.anhdephd-read-more:hover::before {
    width: 300px;
    height: 300px;
}

/* Parallax effect for hero */
.anhdephd-hero {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Smooth transitions */
* {
    transition: color 0.3s ease, background-color 0.3s ease;
}

a, button, input, select, textarea {
    transition: all 0.3s ease;
}

/* Focus states */
a:focus,
button:focus,
input:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Loading spinner */
.anhdephd-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 115, 170, 0.3);
    border-radius: 50%;
    border-top-color: #0073aa;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Scroll to top button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.4);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background: #005a87;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 115, 170, 0.5);
}

/* Text selection */
::selection {
    background: #0073aa;
    color: #fff;
}

::-moz-selection {
    background: #0073aa;
    color: #fff;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #0073aa;
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: #005a87;
}

/* Accessibility improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Print styles */
@media print {
    .anhdephd-header,
    .anhdephd-sidebar,
    .anhdephd-footer,
    .scroll-to-top,
    .anhdephd-button,
    .anhdephd-read-more {
        display: none !important;
    }
    
    .anhdephd-main-content {
        width: 100% !important;
    }
}
