/* Modern Custom CSS for Mobile App Download Website */

/* Modern CSS Variables */
:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --success-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --warning-gradient: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --danger-gradient: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --shadow-light: 0 8px 32px rgba(0,0,0,0.1);
    --shadow-medium: 0 12px 40px rgba(0,0,0,0.15);
    --shadow-heavy: 0 20px 60px rgba(0,0,0,0.2);
}

/* Modern Body Styles */
body {
    font-family: 'Vazir', 'Inter', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    direction: rtl;
    text-align: right;
}

/* Navbar Styles */
.navbar-modern {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
}

.navbar-modern.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-medium);
}

.navbar-brand-modern {
    font-weight: 700;
    font-size: 1.5rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Hero Banner Section */
.hero-banner {
    background: linear-gradient(rgba(102, 126, 234, 0.5), rgba(118, 75, 162, 0.5)), url('../images/back.jpg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center center;
    background-attachment: scroll;
    height:auto;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    width: 100%;
    margin: 0;
    padding: 0;
}

.hero-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><pattern id="a" patternUnits="userSpaceOnUse" width="100" height="100"><circle cx="50" cy="50" r="2" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100%" height="100%" fill="url(%23a)"/></svg>');
    animation: float 20s ease-in-out infinite;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Container Fluid for Hero */
.container-fluid.px-0 {
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin: 0;
}

/* Stats Section */
.stats-modern {
    background: white;
    padding: 4rem 0;
    margin-top: 0;
    margin-bottom: 0;
    border-radius: 0;
    box-shadow: var(--shadow-medium);
    position: relative;
    z-index: 3;
}

.stat-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
}

.stat-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-heavy);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
    color: white;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #666;
    font-weight: 500;
}

/* Features Section */
.features-modern {
    padding: 5rem 0;
    background: linear-gradient(135deg, #f8f9ff 0%, #e8f2ff 100%);
}

.feature-card {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    text-align: center;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
    height: 100%;
    border: 1px solid rgba(255,255,255,0.8);
}

.feature-card:hover {
    transform: translateY(-15px);
    box-shadow: var(--shadow-heavy);
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
}

.feature-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: white;
}

/* Categories Section */
.categories-modern {
    padding: 5rem 0;
    background: white;
}

.category-card-modern {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
    height: 100%;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.category-card-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.category-card-modern:hover::before {
    transform: scaleX(1);
}

.category-card-modern:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-medium);
    border-color: rgba(102, 126, 234, 0.2);
}

.category-icon-modern {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 1.8rem;
    color: white;
    transition: all 0.3s ease;
}

.category-card-modern:hover .category-icon-modern {
    transform: scale(1.1);
}

/* Featured Files Section */
.featured-modern {
    padding: 5rem 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.featured-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.featured-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-heavy);
    background: rgba(255, 255, 255, 0.15);
}

.featured-image {
    height: 200px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
}

/* Modern Buttons */
.btn-modern {
    border-radius: 25px;
    padding: 12px 30px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-modern:hover::before {
    left: 100%;
}

.btn-primary-modern {
    background: var(--primary-gradient);
    color: white;
}

.btn-primary-modern:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-on-scroll {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

/* Loading Animation */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeOut 1s ease-out 2s forwards;
}

.loading.hidden {
    display: none;
}

@keyframes fadeOut {
    to { opacity: 0; }
}

/* Responsive Design */
@media (max-width: 768px) {
    .stat-card {
        margin-bottom: 1rem;
    }
    
    /* Hide banner on mobile */
    .hero-banner {
        display: none !important;
    }
    
    .container-fluid.px-0 {
        display: none !important;
    }
}

/* Legacy Support for Admin Panel */
.admin-sidebar {
    background: #2c3e50;
    min-height: 100vh;
    color: white;
}

.admin-sidebar .nav-link {
    color: #ecf0f1;
    padding: 12px 20px;
    border-radius: 5px;
    margin: 2px 0;
    transition: all 0.3s ease;
}

.admin-sidebar .nav-link:hover {
    background: #34495e;
    color: white;
}

.admin-sidebar .nav-link.active {
    background: #3498db;
    color: white;
}

.admin-content {
    background: #f8f9fa;
    min-height: 100vh;
    padding: 20px;
}

/* Tables */
.table {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.table thead th {
    background: #667eea;
    color: white;
    border: none;
    font-weight: 600;
}

/* Forms */
.form-control {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    padding: 12px 15px;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #764ba2;
}

/* Print Styles */
@media print {
    .navbar, .footer, .btn {
        display: none !important;
    }
    
    .container {
        width: 100% !important;
        max-width: none !important;
    }
}