/* ============================================================
   HOME.CSS - Home Page Styles
   ============================================================ */

/* ============================================================
   HERO SECTION
   ============================================================ */

.hero {
    min-height: calc(100vh - var(--navbar-height));
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    background:
        radial-gradient(circle at 30% 40%, rgba(180, 30, 30, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 70% 60%, rgba(200, 0, 0, 0.1) 0%, transparent 50%),
        var(--bg-dark);
    padding: 2rem;
    overflow: hidden;
}

/* ----- Animated Background Cubes ----- */
.hero-bg-cubes {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.cube {
    position: absolute;
    background: rgba(231, 76, 60, 0.06);
    border: 1px solid rgba(231, 76, 60, 0.15);
    border-radius: 8px;
    animation: floatCube 14s infinite ease-in-out;
    will-change: transform, opacity;
}

.cube:nth-child(1) {
    width: 70px;
    height: 70px;
    top: 12%;
    left: 8%;
    animation-delay: 0s;
    animation-duration: 16s;
}

.cube:nth-child(2) {
    width: 45px;
    height: 45px;
    top: 20%;
    right: 12%;
    animation-delay: -3.5s;
    animation-duration: 13s;
}

.cube:nth-child(3) {
    width: 90px;
    height: 90px;
    bottom: 18%;
    left: 15%;
    animation-delay: -7s;
    animation-duration: 18s;
}

.cube:nth-child(4) {
    width: 55px;
    height: 55px;
    bottom: 25%;
    right: 8%;
    animation-delay: -10s;
    animation-duration: 14s;
}

.cube:nth-child(5) {
    width: 40px;
    height: 40px;
    top: 55%;
    left: 55%;
    animation-delay: -4.5s;
    animation-duration: 12s;
}

.cube:nth-child(6) {
    width: 80px;
    height: 80px;
    top: 8%;
    right: 30%;
    animation-delay: -6.5s;
    animation-duration: 17s;
}

@keyframes floatCube {
    0%, 100% {
        transform: translateY(0) rotate(0deg) scale(1);
        opacity: 0.4;
    }
    25% {
        transform: translateY(-35px) rotate(6deg) scale(1.05);
        opacity: 0.8;
    }
    50% {
        transform: translateY(-15px) rotate(-4deg) scale(0.95);
        opacity: 0.3;
    }
    75% {
        transform: translateY(-45px) rotate(3deg) scale(1.02);
        opacity: 0.7;
    }
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 850px;
}

/* ----- Status Badge ----- */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(231, 76, 60, 0.12);
    border: 1px solid rgba(231, 76, 60, 0.25);
    color: #ff6b6b;
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 2rem;
    direction: rtl;
    backdrop-filter: blur(10px);
    transition: all var(--transition-smooth);
}

.hero-badge:hover {
    border-color: rgba(231, 76, 60, 0.5);
    box-shadow: 0 0 30px rgba(231, 76, 60, 0.1);
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #2ecc71;
    display: inline-block;
    animation: pulse-dot 2s infinite;
    box-shadow: 0 0 12px rgba(46, 204, 113, 0.4);
}

.status-dot.offline {
    background: #e74c3c;
    animation: none;
    box-shadow: 0 0 12px rgba(231, 76, 60, 0.4);
}

.status-dot.starting {
    background: #f39c12;
    animation: pulse-dot 1s infinite;
    box-shadow: 0 0 12px rgba(243, 156, 18, 0.4);
}

@keyframes pulse-dot {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.6);
    }
    50% {
        box-shadow: 0 0 0 12px rgba(46, 204, 113, 0);
    }
}

/* ----- Hero Title ----- */
.hero-title {
    font-family: var(--font-fa);
    font-size: clamp(2.8rem, 8vw, 5.5rem);
    font-weight: 900;
    line-height: 1.3;
    margin-bottom: 1.5rem;
}

body.ltr .hero-title {
    font-family: var(--font-en-display);
    letter-spacing: -2px;
}

.hero-title .red {
    background: linear-gradient(135deg, #ff3838, #c0392b, #a93226);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: gradient-shift 4s ease-in-out infinite;
}

@keyframes gradient-shift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.hero-title .white {
    color: var(--text-primary);
}

/* ----- Hero Subtitle ----- */
.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 620px;
    margin-inline: auto;
    line-height: 2;
}

/* ----- Hero Buttons ----- */
.hero-buttons {
    display: flex;
    gap: 1.2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.95rem 2.4rem;
    border-radius: var(--radius-btn);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all var(--transition-smooth);
}

body.ltr .btn {
    font-family: var(--font-en);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    box-shadow: 0 8px 35px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 14px 45px rgba(231, 76, 60, 0.7);
}

.btn-primary:active {
    transform: translateY(0) scale(0.98);
}

.btn-outline {
    background: transparent;
    color: #e0e0e0;
    border: 2px solid rgba(255, 255, 255, 0.15);
}

.btn-outline:hover {
    border-color: var(--primary-light);
    color: var(--primary-light);
    background: rgba(231, 76, 60, 0.08);
    transform: translateY(-3px);
}

.btn i {
    font-size: 1.05rem;
}

/* ----- Hero Stats ----- */
.hero-stats {
    display: flex;
    gap: 4rem;
    justify-content: center;
    margin-top: 4rem;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
}

.stat-number {
    font-family: var(--font-en-display);
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary-light);
    display: block;
    text-shadow: 0 0 30px rgba(231, 76, 60, 0.2);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    letter-spacing: 1px;
    margin-top: 0.2rem;
}

/* ============================================================
   FEATURES SECTION
   ============================================================ */

.features {
    padding: 6rem 2rem;
    background: var(--bg-dark);
    position: relative;
}

.features::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(231, 76, 60, 0.3), transparent);
}

/* ----- Section Header ----- */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-label {
    display: inline-block;
    color: var(--primary-light);
    font-weight: 600;
    letter-spacing: 2px;
    font-size: 0.85rem;
    margin-bottom: 0.8rem;
    text-transform: uppercase;
}

.section-title {
    font-family: var(--font-fa);
    font-size: clamp(2rem, 5vw, 2.8rem);
    font-weight: 800;
    color: var(--text-primary);
}

body.ltr .section-title {
    font-family: var(--font-en-display);
}

/* ----- Features Grid ----- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-card);
    padding: 2.8rem 2rem;
    text-align: center;
    backdrop-filter: blur(10px);
    transition: all var(--transition-smooth);
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: rgba(231, 76, 60, 0.25);
    box-shadow: var(--shadow-card);
}

.feature-icon {
    font-size: 2.6rem;
    color: var(--primary-light);
    margin-bottom: 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(231, 76, 60, 0.08);
    transition: all var(--transition-smooth);
}

.feature-card:hover .feature-icon {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 0 40px rgba(192, 57, 43, 0.4);
    transform: scale(1.05) rotate(-5deg);
}

.feature-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.8rem;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.9;
}

/* ============================================================
   PLAYER COUNT SECTION
   ============================================================ */

.player-count {
    padding: 5rem 2rem;
    background: linear-gradient(180deg, var(--bg-secondary), var(--bg-dark));
    text-align: center;
}

.player-count-bar {
    max-width: 600px;
    margin: 2rem auto;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50px;
    padding: 0.4rem 0.6rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    direction: ltr;
}

.progress-fill {
    flex: 1;
    height: 10px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50px;
    overflow: hidden;
}

.progress-fill-inner {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light), #ff6b6b);
    border-radius: 50px;
    transition: width 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    width: 0%;
    position: relative;
}

.progress-fill-inner::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.player-count-number {
    font-family: var(--font-en-display);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary-light);
    white-space: nowrap;
    min-width: 70px;
}

/* ----- Server IP ----- */
.server-ip {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(20, 20, 20, 0.9);
    border: 1px solid rgba(231, 76, 60, 0.25);
    padding: 0.85rem 2.2rem;
    border-radius: var(--radius-btn);
    font-family: var(--font-en-display);
    font-size: 1.1rem;
    color: #ff6b6b;
    margin-top: 1.5rem;
    cursor: pointer;
    direction: ltr;
    user-select: none;
    backdrop-filter: blur(10px);
    transition: all var(--transition-smooth);
}

.server-ip:hover {
    background: rgba(192, 57, 43, 0.15);
    border-color: var(--primary-light);
    box-shadow: 0 0 30px rgba(231, 76, 60, 0.15);
    transform: scale(1.02);
}

.server-ip:active {
    transform: scale(0.97);
}

/* ============================================================
   RESPONSIVE DESIGN
   ============================================================ */

/* ----- Tablet ----- */
@media (max-width: 768px) {
    .hero {
        min-height: 90vh;
        padding: 1.2rem;
    }

    .hero-title {
        font-size: 2.3rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .hero-stats {
        gap: 1.8rem;
        margin-top: 3rem;
    }

    .stat-number {
        font-size: 1.8rem;
    }

    .features {
        padding: 4rem 1.2rem;
    }

    .feature-card {
        padding: 2rem 1.5rem;
    }

    .player-count {
        padding: 3rem 1.2rem;
    }

    .player-count-bar {
        padding: 0.3rem 0.5rem;
    }
}

/* ----- Mobile ----- */
@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 1.2rem;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   ACCESSIBILITY
   ============================================================ */

/* ----- Reduced Motion ----- */
@media (prefers-reduced-motion: reduce) {
    .cube,
    .hero-title .red,
    .status-dot,
    .progress-fill-inner::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}