/* متغیرهای CSS */
:root {
    --primary-color: #00b894;
    --secondary-color: #0984e3;
    --bg-dark: #121212;
    --bg-light: #f8f9fa;
    --text-light: #f1f1f1;
    --text-dark: #222;
    --card-bg-dark: #1e1e1e;
    --card-bg-light: #ffffff;
    --border-radius: 16px;
    --transition: all 0.4s ease;
    --success-color: #4CAF50;
    --warning-color: #FF9800;
    --info-color: #2196F3;
    --danger-color: #f44336;
}

/* ریست و استایل اصلی */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Vazir, Tahoma, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-light);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: var(--transition);
    line-height: 1.6;
    padding: 0 15px;
}

body.light {
    background-color: var(--bg-light);
    color: var(--text-dark);
}

/* ناوبری */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

nav .logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    text-decoration: none;
}

nav img {
    width: 45px;
    height: 45px;
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

nav h1 {
    font-size: 22px;
    margin: 0;
    font-weight: 700;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

nav ul {
    list-style: none;
    display: flex;
    gap: 25px;
    margin: 0;
    padding: 0;
}

nav ul li a {
    text-decoration: none;
    color: white;
    font-weight: 600;
    font-size: 15px;
    padding: 8px 15px;
    border-radius: 8px;
    transition: var(--transition);
}

nav ul li a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

#theme-toggle {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 10px 18px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

#theme-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.menu-toggle {
    display: none;
    font-size: 28px;
    color: white;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

/* بخش هدر */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 120px 20px 50px;
    gap: 50px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.header-content {
    flex: 1;
    text-align: center;
    animation: fadeInUp 1s ease;
}

.header h2 {
    font-size: 32px;
    margin-bottom: 20px;
    line-height: 1.4;
}

.header p {
    color: #ccc;
    font-size: 18px;
    margin-bottom: 15px;
}

body.light .header p {
    color: #555;
}

.time {
    font-size: 17px;
    margin: 20px 0;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    display: inline-block;
}

body.light .time {
    background: rgba(0, 0, 0, 0.05);
}

#math-label {
    color: var(--primary-color);
    font-size: 18px;
    font-weight: bold;
}

/* دکمه‌های عمل سریع */
.quick-actions {
    margin-top: 30px;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.quick-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 12px 25px;
    border-radius: 12px;
    text-decoration: none;
    transition: var(--transition);
    font-weight: 600;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(0, 184, 148, 0.3);
}

.quick-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 184, 148, 0.5);
}

/* نماد اینماد */
.enamad-container {
    flex-shrink: 0;
    animation: fadeInRight 1s ease;
}

.enamad-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: linear-gradient(135deg, #ff6b6b, #ffa726);
    padding: 18px 15px 12px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
    border: 3px solid #ffa726;
    animation: pulse 2s infinite;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.enamad-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: translateX(-100%);
    animation: shimmer 3s infinite;
}

.enamad-badge:hover {
    transform: scale(1.05) rotate(2deg);
    box-shadow: 0 12px 30px rgba(255, 107, 107, 0.6);
}

.enamad-label {
    color: white;
    font-weight: bold;
    font-size: 15px;
    margin-bottom: 10px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);
}

.enamad-badge img {
    width: 90px;
    height: auto;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    transition: var(--transition);
}

.enamad-badge:hover img {
    transform: scale(1.05);
}

.enamad-verify {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 8px;
    font-weight: 500;
}

.enamad-info {
    margin-top: 15px;
    text-align: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.enamad-info p {
    margin: 8px 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

body.light .enamad-info p {
    color: rgba(0, 0, 0, 0.8);
}

/* بخش محتوا */
.content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 35px;
    padding: 50px 20px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* کارت‌ها */
.card {
    background: var(--card-bg-dark);
    border-radius: var(--border-radius);
    padding: 35px 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    text-align: center;
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.7s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    z-index: 1;
}

.card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.02), transparent);
    z-index: 0;
}

.card.visible {
    opacity: 1;
    transform: translateY(0);
}

.card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

body.light .card {
    background: var(--card-bg-light);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

body.light .card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.card-icon {
    font-size: 56px;
    margin-bottom: 25px;
    display: block;
    transition: transform 0.5s ease;
    z-index: 2;
    position: relative;
}

.card:hover .card-icon {
    transform: scale(1.2) rotate(10deg);
}

.card h3 {
    color: var(--primary-color);
    font-size: 24px;
    margin-bottom: 20px;
    font-weight: 800;
    z-index: 2;
    position: relative;
}

.card p {
    color: #bbb;
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 25px;
    z-index: 2;
    position: relative;
    flex-grow: 1;
}

body.light .card p {
    color: #666;
}

/* اطلاعات اپ */
.app-info {
    display: flex;
    justify-content: space-between;
    margin: 20px 0;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    font-size: 14px;
    z-index: 2;
    position: relative;
}

body.light .app-info {
    background: rgba(0, 0, 0, 0.05);
}

.version, .size {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

/* ویژگی‌های اپ */
.features {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
    justify-content: center;
    z-index: 2;
    position: relative;
}

.features span {
    background: rgba(0, 184, 148, 0.15);
    color: var(--primary-color);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid rgba(0, 184, 148, 0.3);
}

/* زبان‌ها */
.languages, .programming-langs {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 20px 0;
    justify-content: center;
    z-index: 2;
    position: relative;
}

.languages span, .programming-langs span {
    background: rgba(155, 89, 182, 0.15);
    color: #9b59b6;
    padding: 10px 15px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid rgba(155, 89, 182, 0.3);
}

/* بخش "به زودی" */
.coming-soon-info {
    background: rgba(155, 89, 182, 0.15);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
    z-index: 2;
    position: relative;
    border: 1px solid rgba(155, 89, 182, 0.3);
}

.coming-soon-info p {
    margin: 10px 0;
    color: #9b59b6;
    font-size: 15px;
    font-weight: 500;
}

/* دکمه‌ها */
.card-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 15px 35px;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s ease;
    text-decoration: none;
    display: inline-block;
    min-width: 200px;
    margin: 10px 5px;
    z-index: 2;
    position: relative;
    box-shadow: 0 6px 20px rgba(0, 184, 148, 0.3);
    text-align: center;
}

.card-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 184, 148, 0.5);
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
}

/* دکمه دانلود */
.download-btn {
    background: linear-gradient(135deg, var(--success-color), #2E7D32);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.3);
}

.download-btn:hover {
    background: linear-gradient(135deg, #2E7D32, var(--success-color));
    box-shadow: 0 10px 25px rgba(76, 175, 80, 0.5);
}

/* دکمه "به زودی" */
.coming-soon-btn {
    background: linear-gradient(135deg, #9C27B0, #7B1FA2);
    box-shadow: 0 6px 20px rgba(156, 39, 176, 0.3);
}

.coming-soon-btn:hover {
    background: linear-gradient(135deg, #7B1FA2, #9C27B0);
    box-shadow: 0 10px 25px rgba(156, 39, 176, 0.5);
}

/* اطلاعات دانلود */
.download-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
    z-index: 2;
    position: relative;
}

.download-count {
    background: rgba(255, 255, 255, 0.1);
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 15px;
    color: #ffd700;
    font-weight: 700;
    border: 2px solid rgba(255, 215, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 10px;
}

body.light .download-count {
    background: rgba(0, 0, 0, 0.1);
    color: #d4af37;
}

/* رنگ‌های مختلف برای کارت‌ها */
.card:nth-child(1)::before {
    background: linear-gradient(135deg, #ff6b6b, #ffa726);
}

.card:nth-child(2)::before {
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
}

.card:nth-child(3)::before {
    background: linear-gradient(135deg, #ff9a9e, #fecfef);
}

.card:nth-child(4)::before {
    background: linear-gradient(135deg, #a8edea, #fed6e3);
}

/* بخش تماس */
.contact-section {
    background: var(--card-bg-dark);
    margin: 60px auto;
    border-radius: var(--border-radius);
    padding: 50px 30px;
    max-width: 1400px;
    width: 100%;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body.light .contact-section {
    background: var(--card-bg-light);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.contact-container {
    max-width: 1200px;
    margin: 0 auto;
}

.contact-container h3 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 40px;
    font-size: 28px;
    font-weight: 800;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.contact-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 30px 25px;
    text-align: center;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.contact-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    border-color: var(--primary-color);
}

body.light .contact-card {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.contact-icon {
    font-size: 48px;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.contact-card h4 {
    color: var(--secondary-color);
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 700;
}

.contact-card p {
    margin: 10px 0;
    color: #ccc;
    line-height: 1.6;
}

body.light .contact-card p {
    color: #666;
}

.contact-card a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 600;
    display: inline-block;
    margin: 5px 0;
}

.contact-card a:hover {
    color: var(--secondary-color);
    transform: translateX(5px);
}

/* فوتر */
footer {
    text-align: center;
    background-color: #0d0d0d;
    padding: 30px 20px;
    color: #aaa;
    font-size: 14px;
    margin-top: auto;
    border-top: 3px solid var(--primary-color);
}

body.light footer {
    background-color: #f0f0f0;
    color: #333;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* نماد اینماد در فوتر */
.footer-enamad {
    display: none;
    text-align: center;
    margin-bottom: 30px;
    animation: fadeInUp 1s ease;
}

.footer-enamad .enamad-badge {
    max-width: 200px;
    margin: 0 auto;
}

/* لینک‌های فوتر */
.footer-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
    margin: 40px 0;
    padding: 40px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

body.light .footer-links {
    border-top: 1px solid rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid rgba(0, 0, 0, 0.15);
}

.footer-column {
    text-align: right;
}

.footer-column h4 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 700;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(0, 184, 148, 0.3);
}

.footer-column a {
    display: block;
    color: #bbb;
    text-decoration: none;
    margin: 12px 0;
    padding: 8px 0;
    transition: var(--transition);
    font-size: 15px;
}

body.light .footer-column a {
    color: #555;
}

.footer-column a:hover {
    color: var(--primary-color);
    padding-right: 15px;
    background: rgba(0, 184, 148, 0.1);
    border-radius: 5px;
}

/* اطلاعات حقوقی */
.footer-bottom {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

body.light .footer-bottom {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.copyright {
    font-size: 15px;
    margin-bottom: 20px;
    color: #ccc;
}

body.light .copyright {
    color: #666;
}

.copyright strong {
    color: var(--primary-color);
}

.certificates {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    align-items: center;
}

.certificates span {
    background: rgba(0, 184, 148, 0.15);
    color: var(--primary-color);
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid rgba(0, 184, 148, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* انیمیشن‌ها */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
    }
    50% {
        box-shadow: 0 8px 30px rgba(255, 107, 107, 0.7);
    }
    100% {
        box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
    }
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* نوتفیکیشن‌ها */
.download-notification {
    position: fixed;
    top: 100px;
    right: 20px;
    background: var(--success-color);
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    z-index: 10000;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    animation: slideInRight 0.5s ease, fadeOut 0.5s ease 2.5s forwards;
    font-weight: 600;
    border-left: 5px solid #2E7D32;
}

.global-notification {
    position: fixed;
    top: 100px;
    left: 20px;
    background: var(--info-color);
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    z-index: 10000;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    animation: slideInLeft 0.5s ease, fadeOut 0.5s ease 2.5s forwards;
    font-weight: 600;
    border-right: 5px solid #0d47a1;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

/* اسکرول بار سفارشی */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
}

body.light ::-webkit-scrollbar-track {
    background: var(--bg-light);
}

/* انتخاب متن */
::selection {
    background: rgba(0, 184, 148, 0.3);
    color: white;
}

body.light ::selection {
    background: rgba(0, 184, 148, 0.5);
    color: var(--text-dark);
}

/* فوکوس */
:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 3px;
}

/* پشتیبانی از راست به چپ */
[dir="rtl"] {
    text-align: right;
}

/* کلاس‌های کمکی */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.p-20 {
    padding: 20px;
}

.hidden {
    display: none !important;
}

/* کلاس برای نمایش لودینگ */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    border-radius: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 20px;
    z-index: 100;
}

body.light .loading::after {
    background: rgba(0, 0, 0, 0.8);
    color: white;
}

/* استایل برای نمایش آمار */
.stats-badge {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: var(--card-bg-dark);
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    z-index: 999;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 12px;
    color: #ccc;
}

.stats-badge strong {
    color: var(--primary-color);
}

body.light .stats-badge {
    background: var(--card-bg-light);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #666;
}

/* افکت‌های هورور برای لینک‌ها */
a, button {
    transition: var(--transition);
}

/* استایل برای کد */
code {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
}

body.light code {
    background: rgba(0, 0, 0, 0.1);
}