/* تنظیمات کلی */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Vazir', sans-serif;
}

:root {
    --primary-color: #1a73e8;
    --secondary-color: #34a853;
    --accent-color: #fbbc04;
    --text-color: #202124;
    --light-bg: #f8f9fa;
    --card-bg: #ffffff;
    --shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

body {
    background-color: var(--light-bg);
    color: var(--text-color);
    overflow-x: hidden;
    line-height: 1.6;
}

/* انیمیشن‌های کلیدی */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

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

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

@keyframes waterFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes gradientShift {
    0%, 100% { background-size: 200% 200%; background-position: left center; }
    50% { background-size: 200% 200%; background-position: right center; }
}

/* استایل هدر و ناوبری */
header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    background-size: 200% 200%;
    animation: gradientShift 8s ease infinite;
    color: white;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow);
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%23ffffff' fill-opacity='0.1' d='M0,128L48,117.3C96,107,192,85,288,112C384,139,480,213,576,218.7C672,224,768,160,864,138.7C960,117,1056,139,1152,149.3C1248,160,1344,160,1392,160L1440,160L1440,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'%3E%3C/path%3E%3C/svg%3E");
    background-size: cover;
    background-position: center;
    animation: waterFlow 15s ease infinite;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 2;
}

.logo {
    display: flex;
    align-items: center;
    animation: fadeIn 1.5s ease-out;
}

.logo i {
    font-size: 2.5rem;
    margin-left: 10px;
    color: var(--accent-color);
    animation: pulse 2s infinite;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
}

nav ul {
    display: flex;
    list-style: none;
}

nav li {
    margin-left: 2rem;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}

/* بخش اصلی قوانین */
.terms-section {
    max-width: 1200px;
    margin: 4rem auto;
    padding: 0 2rem;
}

.terms-header {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeIn 1s ease-out;
}

.terms-header h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.terms-header p {
    font-size: 1.1rem;
    color: #555;
    max-width: 800px;
    margin: 0 auto;
}

.terms-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
}

.term-category {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--shadow);
    flex: 1 1 350px;
    max-width: 380px;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    animation: fadeIn 1s ease-out;
}

.term-category:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.term-category::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
}

.category-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.category-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 1rem;
    flex-shrink: 0;
    animation: pulse 2s infinite;
}

.category-icon i {
    color: white;
    font-size: 1.5rem;
}

.category-header h3 {
    font-size: 1.6rem;
    color: var(--primary-color);
}

.terms-list {
    list-style: none;
}

.term-item {
    margin-bottom: 1.2rem;
    padding: 1rem;
    background: var(--light-bg);
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.term-item:hover {
    background: rgba(26, 115, 232, 0.05);
    transform: translateX(5px);
}

.term-item::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.term-item:hover::before {
    opacity: 1;
}

.term-item strong {
    color: var(--primary-color);
    display: block;
    margin-bottom: 0.3rem;
    font-size: 1.1rem;
}

.term-item p {
    color: #444;
    font-size: 0.95rem;
}

/* بخش تأکید مهم */
.important-note {
    background: linear-gradient(135deg, #fff5e6, #ffefd5);
    border: 2px solid var(--accent-color);
    border-radius: 15px;
    padding: 2rem;
    margin: 3rem auto;
    max-width: 1000px;
    text-align: center;
    animation: pulse 3s infinite;
    position: relative;
    overflow: hidden;
}

.important-note::before {
    content: '\f071';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: -20px;
    left: 20px;
    font-size: 6rem;
    color: rgba(251, 188, 4, 0.1);
    z-index: 0;
}

.important-note h3 {
    color: #e67e22;
    font-size: 1.8rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.important-note p {
    color: #d35400;
    font-size: 1.1rem;
    position: relative;
    z-index: 1;
}

/* بخش فوتر */
footer {
    background: linear-gradient(135deg, var(--primary-color), #1557b3);
    color: white;
    padding: 3rem 2rem;
    margin-top: 5rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 2rem;
}

.footer-section {
    flex: 1 1 300px;
}

.footer-section h3 {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    right: 0;
    width: 50%;
    height: 3px;
    background-color: var(--accent-color);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
}

.footer-links a i {
    margin-left: 8px;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: white;
    transform: translateX(-5px);
}

.copyright {
    text-align: center;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

/* انیمیشن‌های اسکرول */
.scroll-animation {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
}

.scroll-animation.animated {
    opacity: 1;
    transform: translateY(0);
}

/* دکمه اسکرول به بالا */
.scroll-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

.scroll-top.active {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* رسپانسیو */
@media (max-width: 992px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }

    nav ul {
        margin-top: 1.5rem;
        justify-content: center;
    }

    nav li {
        margin: 0 1rem;
    }

    .term-category {
        flex: 1 1 100%;
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .terms-header h2 {
        font-size: 2rem;
    }

    .category-header {
        flex-direction: column;
        text-align: center;
    }

    .category-icon {
        margin: 0 0 1rem 0;
    }

    .footer-section {
        flex: 1 1 100%;
    }
}

@media (max-width: 576px) {
    nav ul {
        flex-direction: column;
        align-items: center;
    }

    nav li {
        margin: 0.5rem 0;
    }

    .term-category {
        padding: 1.5rem;
    }

    .category-header h3 {
        font-size: 1.4rem;
    }
}

/* افکت‌های پیشرفته */
.particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.particle {
    position: absolute;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    opacity: 0.3;
    animation: float 15s infinite linear;
}

.water-drop {
    position: absolute;
    width: 8px;
    height: 8px;
    background: rgba(26, 115, 232, 0.6);
    border-radius: 50%;
    animation: drop 8s infinite linear;
    z-index: -1;
}

@keyframes drop {
    0% {
        top: -10%;
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    95% {
        opacity: 0.8;
    }
    100% {
        top: 100%;
        opacity: 0;
    }
}