/* =========================
   RESET
========================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-height: 100vh;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.65)),
        url("../images/gta-v3.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: white;
    overflow-x: hidden;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* =========================
   WRAPPER (محتوای اصلی)
========================= */
.wrapper {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
}

/* =========================
   HEADER
========================= */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 2000;
}

.logo {
    position: relative;
    display: flex;
    align-items: center;
    color: white;
    text-decoration: none;
    font-size: 32px;
    font-weight: 800;
    letter-spacing: 1px;
    text-shadow:
        0 0 5px rgba(255, 0, 170, 0.8),
        0 0 12px rgba(255, 0, 170, 0.8),
        0 0 25px rgba(255, 0, 170, 0.7),
        0 0 45px rgba(180, 0, 255, 0.5);
    animation: logoGlow 2.2s ease-in-out infinite alternate;
    transition: transform 0.3s ease;
    z-index: 2001;
    filter: none !important;
}

.logo:hover {
    transform: scale(1.05);
}

.logo img {
    filter: none !important;
}

.logo .spark {
    filter: none !important;
}

@keyframes logoGlow {
    0% {
        text-shadow: 0 0 4px rgba(255, 0, 170, 0.5), 0 0 10px rgba(255, 0, 170, 0.4), 0 0 20px rgba(180, 0, 255, 0.3);
    }
    50% {
        text-shadow: 0 0 7px rgba(255, 0, 170, 0.9), 0 0 18px rgba(255, 0, 170, 0.8), 0 0 35px rgba(180, 0, 255, 0.7), 0 0 55px rgba(255, 0, 170, 0.35);
    }
    100% {
        text-shadow: 0 0 4px rgba(255, 0, 170, 0.6), 0 0 12px rgba(180, 0, 255, 0.7), 0 0 28px rgba(255, 0, 170, 0.5);
    }
}

/* Sparks */
.spark {
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #ff5ac8;
    box-shadow: 0 0 4px #ff00aa, 0 0 8px #ff00aa, 0 0 14px #b000ff;
    opacity: 0;
    pointer-events: none;
    animation: sparkle 1.8s ease-in-out infinite;
}

.spark-1 { top: 2px; left: 8px; animation-delay: 0.1s; }
.spark-2 { top: -6px; left: 65px; animation-delay: 0.8s; }
.spark-3 { top: 20px; left: -8px; animation-delay: 1.2s; }
.spark-4 { top: 42px; left: 35px; animation-delay: 0.4s; }
.spark-5 { top: 8px; right: 70px; animation-delay: 1.5s; }
.spark-6 { top: 48px; right: 25px; animation-delay: 0.65s; }

@keyframes sparkle {
    0% { opacity: 0; transform: scale(0.2) translate(0, 0); }
    20% { opacity: 1; transform: scale(1.3) translate(0, -2px); }
    40% { opacity: 0.8; transform: scale(0.8) translate(2px, -4px); }
    60% { opacity: 0.4; transform: scale(0.5) translate(-2px, -7px); }
    100% { opacity: 0; transform: scale(0.1) translate(1px, -10px); }
}

/* =========================
   MAIN / HERO
========================= */
main {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 20px 30px;
    position: relative;
    z-index: 1000;
}

.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 25px;
    text-align: center;
    max-width: 800px;
    width: 100%;
}

/* Title */
.hero-title {
    font-size: 42px;
    font-weight: 900;
    text-shadow: 0 0 20px rgba(255, 0, 170, 0.5), 0 0 40px rgba(176, 0, 255, 0.3);
    margin: 0;
    line-height: 1.3;
}

.typewriter {
    display: inline-block;
    overflow: hidden;
    border-left: 3px solid #ff00aa;
    white-space: nowrap;
    animation: typing 2s steps(30) 1s forwards, blink 0.8s step-end infinite;
    max-width: 0;
}

@keyframes typing {
    from { max-width: 0; }
    to { max-width: 100%; }
}

@keyframes blink {
    50% { border-color: transparent; }
}

/* Description */
.hero-description {
    font-size: 18px;
    opacity: 0.9;
    color: rgba(255, 255, 255, 0.85);
    max-width: 500px;
    line-height: 1.8;
}

/* Stats */
.stats {
    display: flex;
    gap: 40px;
    margin: 5px 0;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: 32px;
    font-weight: 800;
    background: linear-gradient(135deg, #ff00aa, #b000ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(255, 0, 170, 0.3);
}

.stat-label {
    font-size: 13px;
    opacity: 0.7;
    margin-top: 4px;
}

/* Action Buttons */
.hero-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 5px;
}

.action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 100px;
    height: 45px;
    padding: 0 25px;
    background: rgba(15, 5, 25, 0.6);
    backdrop-filter: blur(12px);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    color: white;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.action-button:hover {
    transform: translateY(-3px);
    border-color: #ff00aa;
    box-shadow: 0 0 20px rgba(255, 0, 170, 0.2);
    background: rgba(255, 0, 170, 0.1);
}

/* ===== استایل مخصوص دکمه‌های قوانین ===== */
.action-button.rules-btn {
    background: rgba(255, 0, 170, 0.1);
    border-color: rgba(255, 0, 170, 0.25);
}

.action-button.rules-btn:hover {
    background: rgba(255, 0, 170, 0.2);
    border-color: #ff00aa;
    box-shadow: 0 0 25px rgba(255, 0, 170, 0.15);
}

/* Primary Buttons */
.hero-buttons.primary {
    gap: 15px;
    margin-top: 5px;
}

.login-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 180px;
    height: 55px;
    padding: 0 35px;
    background: rgba(15, 5, 25, 0.75);
    backdrop-filter: blur(12px);
    border: 2px solid transparent;
    border-radius: 14px;
    color: white;
    text-decoration: none;
    font-size: 19px;
    font-weight: 700;
    cursor: pointer;
    overflow: hidden;
    z-index: 2000;
    background-image: linear-gradient(rgba(15, 5, 25, 0.85), rgba(15, 5, 25, 0.85)),
                      linear-gradient(90deg, #ff00aa, #b000ff, #7a00ff, #ff00aa);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    box-shadow: 0 0 8px rgba(255, 0, 170, 0.25), 0 0 20px rgba(138, 43, 226, 0.25);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.login-button::before {
    content: "";
    position: absolute;
    inset: -3px;
    border-radius: 17px;
    background: conic-gradient(from 0deg, transparent 0deg, transparent 30deg, #ff00aa 60deg, #ff4fc3 90deg, #b000ff 120deg, transparent 150deg, transparent 210deg, #ff00aa 240deg, #b000ff 280deg, transparent 320deg, transparent 360deg);
    opacity: 0;
    z-index: -1;
    pointer-events: none;
    transition: opacity 0.3s ease;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    padding: 3px;
}

.login-button:hover {
    transform: translateY(-3px) scale(1.04);
    box-shadow: 0 0 10px rgba(255, 0, 170, 0.8), 0 0 25px rgba(176, 0, 255, 0.7), 0 0 50px rgba(122, 0, 255, 0.45);
}

.login-button:hover::before {
    opacity: 1;
    animation: neonRotate 1.5s linear infinite;
}

@keyframes neonRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.login-button:active {
    transform: scale(0.98);
}

/* =========================
   CONTACT SECTION
========================= */
.contact-section {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 20px 20px 40px;
    position: relative;
    z-index: 900;
}

.contact-card {
    background: rgba(15, 5, 25, 0.75);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 0, 170, 0.25);
    border-radius: 20px;
    padding: 30px 40px;
    max-width: 550px;
    width: 100%;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.6), 0 0 60px rgba(255, 0, 170, 0.05);
    transition: all 0.3s ease;
}

.contact-card:hover {
    border-color: rgba(255, 0, 170, 0.5);
    box-shadow: 0 0 60px rgba(255, 0, 170, 0.1);
}

.contact-card h2 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 26px;
    font-weight: 800;
    background: linear-gradient(135deg, #ff00aa, #b000ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.contact-items {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    text-decoration: none;
    color: white;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.contact-item:hover {
    background: rgba(255, 0, 170, 0.12);
    border-color: rgba(255, 0, 170, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(255, 0, 170, 0.08);
}

.contact-item .icon {
    font-size: 20px;
}

/* =========================
   FOOTER
========================= */
.footer {
    flex-shrink: 0;
    width: fit-content;
    min-width: 320px;
    max-width: 95%;
    padding: 12px 25px;
    margin: 0 auto 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    pointer-events: none;
    border: 1px solid rgba(255, 0, 170, 0.4);
    border-radius: 30px;
    background: rgba(15, 5, 25, 0.45);
    backdrop-filter: blur(10px);
    box-shadow: 0 0 10px rgba(255, 0, 170, 0.2), 0 0 25px rgba(176, 0, 255, 0.15);
    z-index: 100;
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.footer-text {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.8;
}

.footer-text span {
    color: #ff4fc3;
    font-weight: 700;
    text-shadow: 0 0 5px rgba(255, 0, 170, 0.8), 0 0 10px rgba(255, 0, 170, 0.6), 0 0 20px rgba(180, 0, 255, 0.5);
}

.copyright {
    margin-top: 3px;
    color: rgba(255, 255, 255, 0.55);
    font-size: 12px;
    letter-spacing: 0.5px;
}

/* =========================
   SCROLL ANIMATIONS
========================= */
.fade-up {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.hero.fade-up {
    transition-delay: 0.1s;
}

.contact-section.fade-up {
    transition-delay: 0.3s;
}

.footer.fade-up {
    transition-delay: 0.5s;
}

/* ===== موبایل: انیمیشن رو غیرفعال کن ===== */
@media (max-width: 768px) {
    .fade-up {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
    
    .fade-up.visible {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* =========================
   BACK TO TOP
========================= */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid rgba(255, 0, 170, 0.6);
    background: rgba(15, 5, 25, 0.8);
    backdrop-filter: blur(10px);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.8);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 0 20px rgba(255, 0, 170, 0.2), 0 0 40px rgba(176, 0, 255, 0.1);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.back-to-top:hover {
    transform: translateY(-3px) scale(1.1);
    border-color: #ff00aa;
    box-shadow: 0 0 30px rgba(255, 0, 170, 0.4), 0 0 60px rgba(176, 0, 255, 0.2);
    background: rgba(255, 0, 170, 0.15);
}

.back-to-top:active {
    transform: scale(0.9);
}

.back-to-top svg {
    stroke: #ff4fc3;
    filter: drop-shadow(0 0 5px rgba(255, 0, 170, 0.5));
    transition: all 0.3s ease;
}

.back-to-top:hover svg {
    stroke: white;
    filter: drop-shadow(0 0 10px rgba(255, 0, 170, 0.8));
}

/* =========================
   BLACK & WHITE HOVER
========================= */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 900;
    pointer-events: none;
    backdrop-filter: grayscale(1) contrast(1.05);
    -webkit-backdrop-filter: grayscale(1) contrast(1.05);
    opacity: 0;
    transition: opacity 0.35s ease;
}

/* ===== وقتی موس روی دکمه‌های action-button (قوانین، خرید، فروش) میره ===== */
body:has(.action-button:hover)::before {
    opacity: 1;
}

/* ===== وقتی موس روی دکمه‌های login-button (تماس با ما، پنل ادمین) میره ===== */
body:has(.login-button:hover)::before {
    opacity: 1;
}

/* =========================
   RESPONSIVE
========================= */

/* تبلت و موبایل بزرگ */
@media (max-width: 768px) {
    .hero-title {
        font-size: 28px;
    }
    
    .hero-description {
        font-size: 15px;
    }
    
    .stats {
        gap: 20px;
    }
    
    .stat-number {
        font-size: 24px;
    }
    
    .action-button {
        min-width: 80px;
        height: 40px;
        font-size: 14px;
        padding: 0 18px;
    }
    
    .login-button {
        min-width: 150px;
        height: 48px;
        font-size: 17px;
    }
    
    .contact-card {
        padding: 20px;
    }
    
    .contact-items {
        grid-template-columns: 1fr 1fr;
    }
    
    /* ===== تغییرات فوتر برای موبایل ===== */
    .footer {
        min-width: unset;
        width: 90%;
        max-width: 400px;
        padding: 10px 18px;
        margin: 0 auto 20px;
    }
    
    .footer-text {
        font-size: 12px;
    }
    
    .copyright {
        font-size: 11px;
    }
}

/* موبایل کوچک */
@media (max-width: 480px) {
    .hero-title {
        font-size: 22px;
    }
    
    .hero-description {
        font-size: 13px;
    }
    
    .stats {
        gap: 15px;
    }
    
    .stat-number {
        font-size: 20px;
    }
    
    .stat-label {
        font-size: 11px;
    }
    
    .action-button {
        min-width: 70px;
        height: 36px;
        font-size: 13px;
        padding: 0 14px;
    }
    
    .login-button {
        min-width: 130px;
        height: 44px;
        font-size: 15px;
        padding: 0 20px;
    }
    
    .contact-items {
        grid-template-columns: 1fr;
    }
    
    .contact-card {
        padding: 16px;
    }
    
    /* ===== تغییرات فوتر برای موبایل کوچک ===== */
    .footer {
        width: 92%;
        max-width: 320px;
        padding: 8px 14px;
        margin: 0 auto 15px;
        border-radius: 20px;
    }
    
    .footer-text {
        font-size: 10px;
        line-height: 1.6;
    }
    
    .copyright {
        font-size: 9px;
        margin-top: 2px;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 44px;
        height: 44px;
    }

    .back-to-top svg {
        width: 20px;
        height: 20px;
    }
}

/* =========================
   SAMANDEHI LOGO
========================= */
.samandehi-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 0 5px;
    margin-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.samandehi-footer a {
    display: inline-block;
    transition: all 0.3s ease;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid rgba(255, 0, 170, 0.1);
    padding: 5px;
    background: rgba(255, 255, 255, 0.02);
}

.samandehi-footer a:hover {
    transform: scale(1.05);
    border-color: rgba(255, 0, 170, 0.3);
    box-shadow: 0 0 25px rgba(255, 0, 170, 0.08);
}

.samandehi-footer img {
    display: block;
    width: 85px;
    height: 85px;
    object-fit: contain;
}

/* ===== موبایل ===== */
@media (max-width: 600px) {
    .samandehi-footer img {
        width: 65px;
        height: 65px;
    }
    
    .samandehi-footer {
        padding: 8px 0 4px;
    }
}