/* Custom CSS for Zedge Clone */

/* Base Styles */
:root {
    --primary-color: #8b5cf6;
    --secondary-color: #ec4899;
    --accent-color: #06b6d4;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --dark-color: #1f2937;
    --light-color: #f9fafb;
}

* {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes wave {
    0%, 100% { height: 10px; }
    50% { height: 30px; }
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.animate-fade-in {
    animation: fadeIn 1s ease-out;
}

.animate-slide-in {
    animation: slideIn 0.5s ease-out;
}

.animate-bounce {
    animation: bounce 2s infinite;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.animated-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><radialGradient id="a" cx="50%" cy="50%"><stop offset="0%" stop-color="%23ffffff" stop-opacity="0.1"/><stop offset="100%" stop-color="%23ffffff" stop-opacity="0"/></radialGradient></defs><circle cx="200" cy="200" r="100" fill="url(%23a)"><animate attributeName="r" values="100;150;100" dur="4s" repeatCount="indefinite"/></circle><circle cx="800" cy="300" r="80" fill="url(%23a)"><animate attributeName="r" values="80;120;80" dur="3s" repeatCount="indefinite"/></circle><circle cx="400" cy="700" r="120" fill="url(%23a)"><animate attributeName="r" values="120;180;120" dur="5s" repeatCount="indefinite"/></circle></svg>');
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

/* Buttons */
.btn-primary {
    @apply bg-gradient-to-r from-purple-600 to-pink-600 text-white px-6 py-3 rounded-full font-semibold hover:from-purple-700 hover:to-pink-700 transition-all duration-300 transform hover:scale-105 shadow-lg hover:shadow-xl;
}

.btn-secondary {
    @apply border-2 border-white text-white px-6 py-3 rounded-full font-semibold hover:bg-white hover:text-purple-600 transition-all duration-300 transform hover:scale-105;
}

.btn-accent {
    @apply bg-white text-purple-600 px-6 py-3 rounded-full font-semibold hover:bg-gray-100 transition-all duration-300 transform hover:scale-105 shadow-lg;
}

.btn-white {
    @apply bg-white text-purple-600 px-6 py-3 rounded-full font-semibold hover:bg-gray-100 transition-all duration-300 transform hover:scale-105 shadow-lg;
}

.btn-outline-white {
    @apply border-2 border-white text-white px-6 py-3 rounded-full font-semibold hover:bg-white hover:text-purple-600 transition-all duration-300 transform hover:scale-105;
}

/* Navigation */
.nav-link {
    @apply text-gray-600 hover:text-purple-600 font-medium transition-colors duration-300 relative;
}

.nav-link:hover::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    border-radius: 1px;
}

.mobile-nav-link {
    @apply block px-4 py-2 text-gray-600 hover:text-purple-600 hover:bg-purple-50 rounded-lg transition-all duration-300;
}

/* Dropdowns */
.user-dropdown {
    position: relative;
}

.dropdown-menu {
    @apply absolute right-0 top-full mt-2 w-48 bg-white rounded-xl shadow-xl border border-gray-200 py-2 opacity-0 invisible transform scale-95 transition-all duration-200;
    z-index: 1000;
}

.user-dropdown:hover .dropdown-menu {
    @apply opacity-100 visible transform scale-100;
}

.dropdown-item {
    @apply block px-4 py-2 text-gray-700 hover:bg-purple-50 hover:text-purple-600 transition-colors duration-200;
}

/* Cards */
.content-card {
    @apply bg-white rounded-xl shadow-lg overflow-hidden transition-all duration-300 hover:shadow-2xl hover:transform hover:scale-105;
}

.category-card {
    @apply bg-white rounded-xl p-6 text-center shadow-lg transition-all duration-300 hover:shadow-2xl hover:transform hover:scale-105;
}

.category-icon {
    @apply w-16 h-16 rounded-full flex items-center justify-center text-white mx-auto mb-4;
}

/* Overlays and Play Buttons */
.overlay {
    @apply absolute inset-0 bg-black bg-opacity-0 hover:bg-opacity-50 transition-all duration-300 flex items-center justify-center;
}

.overlay-info {
    @apply absolute bottom-4 left-4 right-4;
}

.play-button {
    @apply w-16 h-16 bg-white bg-opacity-90 rounded-full flex items-center justify-center text-2xl opacity-0 hover:opacity-100 transition-all duration-300 transform hover:scale-110 cursor-pointer;
    backdrop-filter: blur(10px);
}

.wallpaper-play {
    @apply text-purple-600;
}

.ringtone-play {
    @apply text-pink-600;
    animation: pulse 2s infinite;
}

.ringtone-play:hover {
    animation: bounce 0.6s ease-in-out;
}

/* Music Waves Animation */
.music-waves {
    @apply absolute inset-0 flex items-center justify-center space-x-1 opacity-30;
}

.wave {
    @apply w-1 bg-white rounded-full;
    height: 10px;
    animation: wave 1.5s ease-in-out infinite;
}

.wave:nth-child(2) { animation-delay: 0.2s; }
.wave:nth-child(3) { animation-delay: 0.4s; }
.wave:nth-child(4) { animation-delay: 0.6s; }

/* Badges */
.category-badge {
    @apply px-3 py-1 rounded-full text-white text-xs font-semibold;
}

.type-badge {
    @apply px-3 py-1 rounded-full text-white text-xs font-semibold;
}

.wallpaper-badge {
    @apply bg-blue-500;
}

.ringtone-badge {
    @apply bg-pink-500;
}

.trending-badge {
    @apply bg-gradient-to-r from-orange-500 to-red-500 text-white px-3 py-1 rounded-full text-xs font-semibold;
    animation: pulse 2s infinite;
}

.featured-badge {
    @apply bg-gradient-to-r from-yellow-500 to-orange-500 text-white px-3 py-1 rounded-full text-xs font-semibold;
}

/* Stats Counter */
.stat-card {
    @apply text-center;
}

.counter {
    @apply text-white;
}

/* Download Button */
.download-btn {
    @apply w-10 h-10 bg-purple-600 text-white rounded-full flex items-center justify-center hover:bg-purple-700 transition-all duration-300 transform hover:scale-110;
}

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

/* Mobile Menu */
.mobile-menu {
    @apply border-t border-gray-200;
}

.mobile-menu-toggle {
    @apply text-gray-600 hover:text-purple-600 transition-colors duration-300;
}

/* Loading Animations */
.loading-spinner {
    @apply inline-block w-6 h-6 border-2 border-purple-600 border-t-transparent rounded-full;
    animation: rotate 1s linear infinite;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        padding: 60px 0;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .hero-section h1 span {
        font-size: 1.8rem;
    }
    
    .content-card {
        margin-bottom: 1rem;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .content-card {
        @apply bg-gray-800 text-white;
    }
    
    .category-card {
        @apply bg-gray-800 text-white;
    }
}

/* Print Styles */
@media print {
    .hero-section,
    .nav-link,
    .btn-primary,
    .btn-secondary {
        background: none !important;
        color: black !important;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus States */
button:focus,
a:focus,
input:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .content-card {
        border: 2px solid black;
    }
    
    .btn-primary {
        border: 2px solid black;
    }
}

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