/* ========== متغیرهای اصلی ========== */
:root {
    --primary-bg: #091020;
    --secondary-bg: #040e1d;
    --white: #ffffff;
    --gold-light: #ffb347;
    --gold: #efa143;
    --gold-dark: #d5550a;
    --blue-primary: #005fbe;
    --blue-light: #2790e5;
    --blue-medium: #0168b9;
    --blue-gradient: linear-gradient(135deg, #2790e5, #0168b9);
    --glass-bg: rgba(4, 14, 29, 0.6);
    --glass-border: rgba(255, 255, 255, 0.15);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    --transition: all 0.3s ease;
    --online-bg: #0a1428;
    --error-red: #ff3333;
    --error-bg: rgba(255, 51, 51, 0.1);
}

/* ========== استایل پایه ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Vazirmatn', sans-serif;
    background: var(--primary-bg);
    color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 15px;
    color: var(--white);
}

.section-subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
}

.highlight-red {
    color: #ff4444;
    font-weight: 700;
}

.glass-effect {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
}

/* ========== پیام خطای دسترسی ========== */
.access-error {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--error-bg);
    border: 2px solid var(--error-red);
    border-radius: 50px;
    padding: 15px 30px;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    box-shadow: 0 0 30px rgba(255, 51, 51, 0.3);
    min-width: 300px;
    overflow: hidden;
}

.access-error.show {
    display: flex;
    animation: slideDown 0.3s ease;
}

.error-content {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--error-red);
    font-weight: 700;
    font-size: 1.1rem;
    position: relative;
    z-index: 2;
}

.error-content i {
    font-size: 1.3rem;
    animation: shake 0.5s ease;
}

.error-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--error-red);
    animation: progressShrink 3s linear forwards;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes shake {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(10deg); }
    75% { transform: rotate(-10deg); }
}

@keyframes progressShrink {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

/* ========== لودینگ ========== */
.loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--secondary-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s;
}

.loader-wrapper.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loader {
    position: relative;
    width: 80px;
    height: 80px;
}

.loader-circle {
    width: 100%;
    height: 100%;
    border: 3px solid transparent;
    border-top-color: var(--blue-light);
    border-right-color: var(--gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loader-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
}

.loader-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

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

/* ========== ناوبری ========== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(4, 14, 29, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    padding: 15px 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo img {
    height: 55px;
    transition: var(--transition);
}

.nav-logo img:hover {
    transform: scale(1.05);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 40px;
}

.nav-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    padding: 5px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--blue-gradient);
    transition: all 0.3s ease;
    transform: translateX(-50%);
    border-radius: 3px;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover,
.nav-link.active {
    color: var(--white);
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
}

.hamburger span {
    width: 30px;
    height: 3px;
    background: var(--gold);
    border-radius: 3px;
    transition: var(--transition);
}

/* ========== هدر ========== */
.header {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.header-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

.header-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 95, 190, 0.2), rgba(4, 14, 29, 0.7));
    z-index: -1;
}

.header-content {
    max-width: 800px;
    padding: 40px;
    animation: fadeInUp 1s ease;
    border-radius: 30px;
}

.glass-header {
    background: rgba(4, 14, 29, 0.3);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.header-title {
    font-size: 4rem;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 25px;
    color: var(--white);
    text-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

.header-text {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 35px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.header-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 50px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 35px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: 2px solid transparent;
    cursor: pointer;
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border-color: var(--gold);
}

.btn-outline:hover {
    background: rgba(239, 161, 67, 0.1);
    transform: translateY(-3px);
}

.header-stats {
    display: flex;
    justify-content: center;
    gap: 50px;
}

.stat {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--gold);
}

.stat-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.scroll-down {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    z-index: 10;
}

.scroll-down span {
    display: block;
    width: 20px;
    height: 20px;
    border-bottom: 2px solid var(--gold);
    border-right: 2px solid var(--gold);
    transform: rotate(45deg);
    animation: scrollDown 2s infinite;
}

.scroll-down span:nth-child(2) {
    animation-delay: -0.2s;
}

.scroll-down span:nth-child(3) {
    animation-delay: -0.4s;
}

@keyframes scrollDown {
    0% {
        opacity: 0;
        transform: rotate(45deg) translate(-10px, -10px);
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: rotate(45deg) translate(10px, 10px);
    }
}

/* ========== بخش اتصال ========== */
.connect-section {
    background: var(--secondary-bg);
    position: relative;
    overflow: hidden;
}

.connect-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), var(--blue-light), transparent);
}

.connect-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.connect-card {
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.connect-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 179, 71, 0.1), transparent);
    transform: rotate(45deg);
    animation: shine 6s infinite;
}

@keyframes shine {
    0% { transform: rotate(45deg) translateY(-100%); }
    100% { transform: rotate(45deg) translateY(100%); }
}

.connect-card:hover {
    transform: translateY(-10px);
    border-color: var(--gold);
    box-shadow: 0 0 30px rgba(239, 161, 67, 0.2);
}

.connect-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 25px;
}

.connect-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.connect-card h3 {
    margin-bottom: 20px;
    color: var(--white);
}

.connect-code {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid var(--glass-border);
}

.connect-code code {
    color: var(--gold);
    font-family: 'Courier New', monospace;
    font-size: 1rem;
}

.copy-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition);
}

.copy-btn:hover {
    color: var(--gold);
    transform: scale(1.1);
}

/* ========== بخش قوانین ========== */
.rules-section {
    background: var(--primary-bg);
}

.rules-panel {
    border-radius: 30px;
    padding: 40px;
    margin-bottom: 50px;
    box-shadow: var(--shadow);
}

.rule-item {
    position: relative;
    padding: 20px 30px 20px 60px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.rule-item:last-child {
    border-bottom: none;
}

.rule-item:hover {
    background: rgba(255, 255, 255, 0.02);
    transform: translateX(10px);
}

.rule-marker {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 30px;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    border-radius: 2px;
}

.rule-item p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    margin-bottom: 8px;
}

.rule-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 5px;
}

.rule-badge.red {
    background: rgba(255, 68, 68, 0.2);
    color: #ff8888;
    border: 1px solid #ff4444;
}

.rule-badge.orange {
    background: rgba(255, 165, 0, 0.2);
    color: #ffaa33;
    border: 1px solid #ffa500;
}

.rules-footer {
    text-align: center;
    padding: 40px;
    border-radius: 30px;
}

.rules-footer p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.rules-footer h3 {
    font-size: 1.8rem;
    color: var(--gold);
}

/* ========== بخش مشخصات ========== */
.specs-section {
    background: var(--secondary-bg);
    position: relative;
}

.specs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.spec-card {
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.spec-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--blue-gradient);
    transform: scaleX(0);
    transition: transform 0.3s;
}

.spec-card:hover::after {
    transform: scaleX(1);
}

.spec-card:hover {
    transform: translateY(-10px);
    border-color: var(--gold);
    box-shadow: 0 0 30px rgba(239, 161, 67, 0.2);
}

.spec-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
}

.spec-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.spec-card h4 {
    margin-bottom: 10px;
    color: var(--white);
    font-size: 1.2rem;
}

.spec-card p {
    color: var(--gold);
    font-weight: 600;
}

.spec-note {
    display: block;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    margin-top: 5px;
}

/* ========== بخش تیم ========== */
.team-section {
    background: var(--primary-bg);
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.team-card {
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    transition: var(--transition);
}

.team-card:hover {
    transform: translateY(-10px);
    border-color: var(--gold);
    box-shadow: 0 0 30px rgba(239, 161, 67, 0.2);
}

.owner-card {
    border: 2px solid #ff3333;
}

.team-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 15px;
    border: 3px solid transparent;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark)) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    padding: 3px;
}

.team-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.team-role {
    display: inline-block;
    padding: 6px 20px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.team-role.owner {
    background: linear-gradient(135deg, #ff4d4d, #cc0000);
    color: var(--white);
    box-shadow: 0 0 15px rgba(255, 68, 68, 0.5);
}

.team-role.developer {
    background: linear-gradient(135deg, #ff9933, #ff6600);
    color: var(--white);
    box-shadow: 0 0 15px rgba(255, 153, 51, 0.5);
}

.team-role.admin {
    background: linear-gradient(135deg, #3399ff, #0066cc);
    color: var(--white);
    box-shadow: 0 0 15px rgba(51, 153, 255, 0.5);
}

.team-role.editor {
    background: linear-gradient(135deg, #aa66ff, #6600cc);
    color: var(--white);
    box-shadow: 0 0 15px rgba(170, 102, 255, 0.5);
}

.team-role.supporter {
    background: linear-gradient(135deg, #ff66b2, #ff3399);
    color: var(--white);
    box-shadow: 0 0 15px rgba(255, 102, 178, 0.5);
}

.team-role.helper {
    background: linear-gradient(135deg, #66cc66, #339933);
    color: var(--white);
    box-shadow: 0 0 15px rgba(102, 204, 102, 0.5);
}

.team-bio {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ========== فوتر ========== */
.footer {
    background: var(--secondary-bg);
    padding: 70px 0 20px;
    border-top: 1px solid var(--glass-border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 50px;
    margin-bottom: 50px;
}

.footer-logo {
    height: 50px;
    margin-bottom: 20px;
}

.footer-description {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 25px;
    line-height: 1.8;
    font-size: 0.95rem;
    max-width: 280px;
}

.footer-social {
    display: flex;
    gap: 15px;
}

.footer-social a {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-decoration: none;
    transition: var(--transition);
    font-size: 1.2rem;
}

.footer-social a:hover {
    background: var(--gold);
    color: var(--secondary-bg);
    transform: translateY(-5px);
    border-color: var(--gold);
}

.footer-links h4,
.footer-contact h4 {
    color: var(--gold);
    margin-bottom: 25px;
    font-size: 1.2rem;
}

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

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--gold);
    padding-right: 5px;
}

.footer-contact p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-contact i {
    color: var(--gold);
    width: 20px;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
}

.designed-by {
    font-size: 0.75rem;
    opacity: 0.7;
}

.footer-bottom a {
    color: var(--gold);
    text-decoration: none;
    transition: var(--transition);
}

.footer-bottom a:hover {
    text-decoration: underline;
}

/* ========== Toast ========== */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--secondary-bg);
    color: var(--white);
    padding: 15px 30px;
    border-radius: 50px;
    box-shadow: 0 0 30px rgba(239, 161, 67, 0.3);
    border: 1px solid var(--gold);
    z-index: 9999;
    animation: slideIn 0.3s ease;
}

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

/* ========== رسپانسیو ========== */
@media (max-width: 1200px) {
    .connect-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .specs-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-description {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .hamburger {
        display: flex;
    }
    
    .header-title {
        font-size: 2.5rem;
    }
    
    .header-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .header-stats {
        flex-direction: column;
        gap: 20px;
    }
    
    .connect-grid {
        grid-template-columns: 1fr;
    }
    
    .specs-grid {
        grid-template-columns: 1fr;
    }
    
    .team-grid {
        grid-template-columns: 1fr;
    }
    
    .rules-panel {
        padding: 20px;
    }
    
    .rule-item {
        padding: 15px 15px 15px 40px;
    }
    
    .footer-bottom {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .section {
        padding: 60px 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .header-title {
        font-size: 2rem;
    }
    
    .connect-card {
        padding: 30px 20px;
    }
    
    .connect-code {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .rules-footer h3 {
        font-size: 1.4rem;
    }
    
    .footer-bottom {
        font-size: 0.8rem;
        display: flex;
        flex-direction: column;
        gap: 5px;
    }
}