: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, #fa709a 0%, #fee140 100%);
    --dark-gradient: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
    
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.8);
    --text-muted: rgba(255, 255, 255, 0.6);
    
    --card-bg: rgba(255, 255, 255, 0.95);
    --card-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --accent-color: #f093fb;
    --success-color: #4facfe;
    --warning-color: #fa709a;
    --danger-color: #f5576c;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazir', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-attachment: fixed;
    min-height: 100vh;
    color: var(--text-primary);
    overflow-x: hidden;
    position: relative;
}

/* انیمیشن پس‌زمینه متحرک */
body::before {
    content: '';
    position: fixed;
    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 1440 320"><path fill="%23ffffff" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,154.7C960,171,1056,181,1152,165.3C1248,149,1344,107,1392,85.3L1440,64L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
    z-index: -1;
    animation: wave 10s linear infinite;
}

@keyframes wave {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* هدر مدرن با افکت شیشه‌ای */
.header {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    padding: 60px 40px;
    margin-bottom: 40px;
    box-shadow: var(--glass-shadow);
    text-align: center;
    position: relative;
    overflow: hidden;
    animation: slideDown 0.8s ease-out;
}

.header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.header-content {
    position: relative;
    z-index: 2;
}

.header h1 {
    font-size: 56px;
    font-weight: 900;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 10px rgba(0,0,0,0.1);
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { filter: drop-shadow(0 0 20px rgba(255,255,255,0.5)); }
    to { filter: drop-shadow(0 0 30px rgba(255,255,255,0.8)); }
}

.header p {
    font-size: 22px;
    color: var(--text-secondary);
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.header .subtitle {
    font-size: 18px;
    color: var(--text-muted);
    margin-top: 20px;
    font-weight: 400;
    display: inline-block;
    padding: 10px 20px;
    background: var(--glass-bg);
    border-radius: 50px;
    border: 1px solid var(--glass-border);
}

/* وضعیت سیستم مدرن */
.system-status {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: var(--glass-shadow);
    text-align: center;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.status-badge {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 18px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.status-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.status-badge:hover::before {
    left: 100%;
}

.status-ok {
    background: var(--success-gradient);
    color: white;
    box-shadow: 0 10px 25px rgba(79, 172, 254, 0.3);
}

.status-error {
    background: var(--warning-gradient);
    color: white;
    box-shadow: 0 10px 25px rgba(250, 112, 154, 0.3);
}

/* آمار با کارت‌های سه‌بعدی */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 25px;
    padding: 30px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
    animation: fadeInUp 0.8s ease-out both;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%);
    transition: all 0.5s ease;
}

.stat-card:hover {
    transform: translateY(-10px) rotateX(5deg);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
}

.stat-card:hover::before {
    transform: rotate(180deg);
}

.stat-icon {
    font-size: 48px;
    margin-bottom: 15px;
    filter: drop-shadow(0 5px 10px rgba(0,0,0,0.2));
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

.stat-value {
    font-size: 36px;
    font-weight: 900;
    margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.stat-label {
    font-size: 16px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* بخش دسترسی سریع با افکت‌های پیشرفته */
.quick-test {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 25px;
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: var(--glass-shadow);
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.quick-test h2 {
    font-size: 32px;
    margin-bottom: 30px;
    text-align: center;
    position: relative;
    padding-bottom: 20px;
}

.quick-test h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: var(--accent-gradient);
    border-radius: 2px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; transform: translateX(-50%) scaleX(1); }
    50% { opacity: 0.7; transform: translateX(-50%) scaleX(1.2); }
    100% { opacity: 1; transform: translateX(-50%) scaleX(1); }
}

.quick-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.quick-link {
    display: block;
    padding: 25px 20px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    text-align: center;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.quick-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.quick-link:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    border-color: var(--accent-color);
}

.quick-link:hover::before {
    opacity: 0.9;
}

.quick-link span {
    display: block;
    font-size: 42px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.quick-link:hover span {
    transform: scale(1.2) rotate(10deg);
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.3));
}

/* کارت‌های اصلی با طراحی سه‌بعدی */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.card {
    background: var(--card-bg);
    border-radius: 25px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
    position: relative;
    animation: fadeInUp 0.8s ease-out both;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.card:hover {
    transform: translateY(-15px) rotateX(5deg);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2);
}

.card:hover::before {
    opacity: 1;
}

.card-header {
    padding: 40px 30px;
    background: var(--primary-gradient);
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.card-header::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 0;
    width: 100%;
    height: 40px;
    background: var(--card-bg);
    border-radius: 50% 50% 0 0;
}

.card-header.questions { background: var(--primary-gradient); }
.card-header.media { background: var(--success-gradient); }
.card-header.storage { background: var(--warning-gradient); }

.card-header h3 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.card-icon {
    font-size: 64px;
    margin-bottom: 20px;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.3));
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.card-body {
    padding: 30px;
}

.card-description {
    color: #666;
    margin-bottom: 25px;
    line-height: 1.8;
    font-size: 16px;
}

.card-features {
    list-style: none;
    margin-bottom: 25px;
}

.card-features li {
    padding: 12px 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.card-features li:hover {
    padding-right: 10px;
    color: var(--primary-color);
}

.card-features li:before {
    content: "✓";
    color: var(--success-color);
    font-weight: bold;
    margin-left: 15px;
    font-size: 18px;
}

.card-footer {
    padding: 0 30px 30px;
}

.btn {
    display: inline-block;
    padding: 16px 32px;
    background: var(--primary-gradient);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 16px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    width: 100%;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.4);
}

.btn:hover::before {
    left: 100%;
}

.btn:active {
    transform: translateY(-1px);
}

/* فوتر مدرن */
.footer {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 25px;
    padding: 40px;
    text-align: center;
    margin-top: 40px;
    box-shadow: var(--glass-shadow);
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

.footer p {
    color: var(--text-secondary);
    margin-bottom: 10px;
    font-size: 16px;
}

.footer .version {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 15px;
    opacity: 0.8;
}

/* انیمیشن‌های ورودی */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* تاخیر در انیمیشن‌ها */
.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.2s; }
.stat-card:nth-child(3) { animation-delay: 0.3s; }
.stat-card:nth-child(4) { animation-delay: 0.4s; }
.stat-card:nth-child(5) { animation-delay: 0.5s; }
.stat-card:nth-child(6) { animation-delay: 0.6s; }
.stat-card:nth-child(7) { animation-delay: 0.7s; }

.card:nth-child(1) { animation-delay: 0.2s; }
.card:nth-child(2) { animation-delay: 0.3s; }
.card:nth-child(3) { animation-delay: 0.4s; }

.quick-link:nth-child(1) { animation-delay: 0.3s; }
.quick-link:nth-child(2) { animation-delay: 0.4s; }
.quick-link:nth-child(3) { animation-delay: 0.5s; }
.quick-link:nth-child(4) { animation-delay: 0.6s; }
.quick-link:nth-child(5) { animation-delay: 0.7s; }
.quick-link:nth-child(6) { animation-delay: 0.8s; }

/* طراحی ریسپانسیو پیشرفته */
@media (max-width: 768px) {
    .header {
        padding: 40px 20px;
        border-radius: 20px;
    }
    
    .header h1 {
        font-size: 36px;
    }
    
    .header p {
        font-size: 18px;
    }
    
    .stat-card {
        padding: 25px 15px;
    }
    
    .stat-value {
        font-size: 28px;
    }
    
    .stat-icon {
        font-size: 36px;
    }
    
    .card-header, .card-body, .card-footer {
        padding: 25px 20px;
    }
    
    .card-icon {
        font-size: 48px;
    }
    
    .quick-link {
        padding: 20px 15px;
    }
    
    .quick-link span {
        font-size: 32px;
    }
    
    .quick-test h2 {
        font-size: 24px;
    }
    
    .cards {
        grid-template-columns: 1fr;
    }
    
    .stats-container {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }
}

/* افکت‌های بارگذاری */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* بهبود SweetAlert2 */
.swal2-popup {
    border-radius: 20px;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

.swal2-confirm {
    border-radius: 50px;
    padding: 12px 30px;
    font-weight: 700;
}

/* افکت‌های ویژه برای دسکتاپ */
@media (min-width: 769px) {
    .container::before {
        content: '';
        position: fixed;
        top: 10%;
        right: 5%;
        width: 300px;
        height: 300px;
        background: radial-gradient(circle, rgba(240,147,251,0.3) 0%, rgba(240,147,251,0) 70%);
        border-radius: 50%;
        animation: float 6s ease-in-out infinite;
        pointer-events: none;
        z-index: -1;
    }
    
    .container::after {
        content: '';
        position: fixed;
        bottom: 10%;
        left: 5%;
        width: 250px;
        height: 250px;
        background: radial-gradient(circle, rgba(79,172,254,0.3) 0%, rgba(79,172,254,0) 70%);
        border-radius: 50%;
        animation: float 8s ease-in-out infinite reverse;
        pointer-events: none;
        z-index: -1;
    }
}