/* ============================================
   xpgen - STYLE GLOBAL (جميع الصفحات)
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Poppins:wght@700;800;900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(to bottom, #0f172a, #1a1f35, #0f172a);
    color: #ffffff;
    overflow-x: hidden;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
}

html {
    scroll-behavior: smooth;
}

/* --- Navigation --- */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #1e293b;
    z-index: 50;
    padding: 1rem 0;
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo img {
    height: 45px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #06b6d4;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1.75rem;
    cursor: pointer;
    z-index: 1001;
}

.menu-toggle .icon-close {
    display: none;
}

/* --- Search --- */
.search-wrapper {
    position: relative;
}

.search-container {
    display: flex;
    align-items: center;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid #334155;
    border-radius: 0.5rem;
    overflow: hidden;
}

.search-container input {
    background: transparent;
    border: none;
    outline: none;
    color: #ffffff;
    padding: 0.5rem 0.75rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
}

.search-container input::placeholder {
    color: #94a3b8;
}

.search-container .search-btn {
    background: #334155;
    border: none;
    padding: 0.5rem 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #ffffff;
    transition: background 0.3s;
}

.search-container .search-btn:hover {
    background: #06b6d4;
}

.search-results-container {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    min-width: 250px;
    background: #1e293b;
    border: 1px solid #334155;
    border-top: none;
    border-radius: 0 0 0.5rem 0.5rem;
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    text-decoration: none;
    color: #cbd5e1;
    transition: background 0.3s;
}

.search-result-item:hover {
    background: rgba(6, 182, 212, 0.2);
    color: #ffffff;
}

.search-result-img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 0.25rem;
    margin-right: 0.75rem;
}

.search-result-name {
    font-size: 0.9rem;
}

/* --- Buttons --- */
.btn {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(to right, #06b6d4, #0891b2);
    color: #ffffff;
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.5);
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(6, 182, 212, 0.7);
}

.btn-secondary {
    border: 2px solid #a855f7;
    color: #c084fc;
    background: transparent;
}

.btn-secondary:hover {
    background: rgba(168, 85, 247, 0.1);
    transform: scale(1.05);
}

.btn-large {
    padding: 1rem 3rem;
    font-size: 1.25rem;
}

/* --- Hero Section --- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 5rem;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.glow-circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.2;
    animation: pulse 3s ease-in-out infinite;
}

.glow-circle:nth-child(1) { width: 400px; height: 400px; top: 0; left: 25%; background: #06b6d4; }
.glow-circle:nth-child(2) { width: 400px; height: 400px; bottom: 0; right: 25%; background: #a855f7; animation-delay: 0.5s; }
.glow-circle:nth-child(3) { width: 400px; height: 400px; top: 50%; right: 0; background: #ec4899; animation-delay: 1s; }

@keyframes pulse {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 0.3; }
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 900px;
    padding: 0 1rem;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.gradient {
    background: linear-gradient(to right, #06b6d4, #a855f7, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.25rem;
    color: #cbd5e1;
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Trending Circles */
.hero-trending-section {
    margin: 2.5rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.trending-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    max-width: 420px;
}

.trending-divider-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, #06b6d4, #a855f7, transparent);
}

.trending-divider-label {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 3px;
    text-transform: uppercase;
    background: linear-gradient(to right, #06b6d4, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
}

.hero-apps-circular {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    flex-wrap: nowrap;            /* تعديل: منع النزول للسطر الثاني */
}

.hero-app-circle {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    position: relative;
    width: 80px;
    transition: transform 0.3s ease;
}

.hero-app-circle:hover {
    transform: translateY(-6px);
}

.hero-app-circle .circle-img-wrap {
    position: relative;
    width: 72px;
    height: 72px;
}

.hero-app-circle .circle-img-wrap::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: conic-gradient(#06b6d4, #a855f7, #ec4899, #06b6d4);
    animation: neon-spin 3s linear infinite;
    z-index: 0;
}

.hero-app-circle .circle-img-wrap::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    background: conic-gradient(#06b6d4, #a855f7, #ec4899, #06b6d4);
    filter: blur(8px);
    opacity: 0.5;
    animation: neon-spin 3s linear infinite;
    z-index: 0;
}

@keyframes neon-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.hero-app-circle img {
    position: relative;
    z-index: 1;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    background: #1e293b;
    border: 2px solid #0f172a;
}

.hero-app-circle span.app-name {
    font-size: 0.7rem;
    font-weight: 800;
    color: #cbd5e1;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
}

/* --- Game Cards --- */
.games-section {
    position: relative;
    padding: 5rem 1rem;
    max-width: 1280px;
    margin: 0 auto;
}

.section-title {
    font-size: 3rem;
    font-weight: 900;
    text-align: center;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #06b6d4, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    text-align: center;
    color: #94a3b8;
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.game-card {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid #334155;
    border-radius: 0.75rem;
    overflow: hidden;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
}

.game-card:hover {
    border-color: rgba(6, 182, 212, 0.5);
    transform: translateY(-5px);
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.2);
}

.game-image {
    width: 100%;
    height: 200px;
    position: relative;
    overflow: hidden;
    display: block;
}

.game-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.game-card:hover .game-image img {
    transform: scale(1.05);
}

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    width: 60px;
    height: 60px;
    background: rgba(6, 182, 212, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    font-size: 2.5rem;
    color: #fff;
    font-weight: bold;
    line-height: 1.1;
}

.game-card:hover .play-icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

.game-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.game-title {
    font-size: 1.25rem;
    font-weight: 700;
}

.game-category {
    background: rgba(168, 85, 247, 0.3);
    color: #d8b4fe;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
}

.game-description {
    color: #cbd5e1;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.game-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.stars {
    display: flex;
    gap: 0.25rem;
}

.star {
    color: #fbbf24;
}

.rating-value {
    color: #94a3b8;
    font-size: 0.9rem;
}

.game-card .btn {
    width: 100%;
    justify-content: center;
    background: linear-gradient(to right, #06b6d4, #a855f7);
    margin-top: auto;
}

/* --- Features / How it Works --- */
.features-section, .how-it-works-section, .testimonials-section {
    padding: 5rem 1rem;
    background: rgba(15, 23, 42, 0.5);
}

.features-container, .how-grid, .testimonials-grid {
    max-width: 1280px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    padding: 2rem;
    background: linear-gradient(to bottom right, rgba(30, 41, 59, 0.5), rgba(15, 23, 42, 0.5));
    border: 1px solid #334155;
    border-radius: 0.75rem;
    transition: all 0.3s;
}

.feature-card:hover {
    border-color: rgba(6, 182, 212, 0.5);
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.1);
}

.feature-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(to bottom right, rgba(6, 182, 212, 0.2), rgba(168, 85, 247, 0.2));
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.feature-description {
    color: #cbd5e1;
}

.how-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.how-card {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid #334155;
    border-radius: 0.75rem;
    padding: 2rem;
    text-align: center;
}

.how-card-icon {
    font-size: 2rem;
    font-weight: 900;
    color: #06b6d4;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid #06b6d4;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem auto;
}

.how-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.how-card-description {
    color: #cbd5e1;
    font-size: 0.9rem;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.testimonial-card {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid #334155;
    border-radius: 0.75rem;
    padding: 2rem;
}

.testimonial-text {
    color: #cbd5e1;
    font-style: italic;
    margin-bottom: 1.5rem;
    position: relative;
}

.testimonial-text::before {
    content: '“';
    font-family: 'Poppins', sans-serif;
    font-size: 4rem;
    color: #06b6d4;
    opacity: 0.2;
    position: absolute;
    top: -1rem;
    left: -1rem;
}

.testimonial-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.testimonial-user-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #334155;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
}

.testimonial-user-name {
    font-weight: 700;
}

/* --- Static Pages (Legal/Contact) --- */
.static-page-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 8rem 1rem 4rem 1rem;
}

.static-page-container h1 {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #06b6d4, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.static-page-container .page-subtitle {
    font-size: 1.1rem;
    color: #cbd5e1;
    margin-bottom: 2.5rem;
}

.static-page-container p, .static-page-container li {
    color: #cbd5e1;
    margin-bottom: 1rem;
    line-height: 1.7;
}

.contact-form {
    width: 100%;
    max-width: 700px;
    margin-top: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #cbd5e1;
}

.form-group input, .form-group textarea {
    width: 100%;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid #334155;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: #ffffff;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: #06b6d4;
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.3);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

/* --- Game Page Specific --- */
.game-page-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8rem 1rem 4rem 1rem;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.game-page-image {
    width: 100%;
    max-width: 350px;
    border-radius: 0.75rem;
    margin-bottom: 2rem;
    border: 1px solid #334155;
}

.game-page-title {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 1rem;
}

.game-page-description {
    font-size: 1.1rem;
    color: #cbd5e1;
    margin-bottom: 2.5rem;
    max-width: 450px;
}

.seo-content {
    text-align: left;
    max-width: 100%;
    margin-bottom: 2.5rem;
}

.seo-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #06b6d4;
    margin-bottom: 1rem;
    margin-top: 1.5rem;
    text-align: center;
}

.seo-content p, .seo-content li {
    color: #cbd5e1;
    margin-bottom: 1rem;
    line-height: 1.7;
}

.seo-content ul {
    list-style-position: inside;
    padding-left: 1rem;
}

.share-section {
    margin-top: 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.share-title {
    font-size: 0.9rem;
    color: #94a3b8;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.share-buttons-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.share-row {
    display: flex;
    gap: 1rem;
}

#more-share-options {
    display: none;
}

#more-share-options.visible {
    display: flex;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.share-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid #334155;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cbd5e1;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.share-btn:hover, .share-btn.active {
    background: linear-gradient(to right, #06b6d4, #a855f7);
    color: white;
    border-color: transparent;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(6, 182, 212, 0.3);
}

/* --- Footer --- */
footer {
    border-top: 1px solid #334155;
    padding: 3rem 1rem;
    background: rgba(15, 23, 42, 0.5);
    text-align: center;
    color: #94a3b8;
}

.footer-content {
    max-width: 1280px;
    margin: 0 auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: #06b6d4;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #a855f7;
}

/* --- Mobile Responsive --- */
@media (max-width: 768px) {
    .nav-container {
        position: relative;
        justify-content: flex-end;
    }

    .logo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }

    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: #0f172a;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        z-index: 1000;
        opacity: 0;
        pointer-events: none;
        transform: translateY(-100%);
        transition: all 0.3s ease-in-out;
    }

    .nav-links.open {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }

    .nav-links a {
        font-size: 1.5rem;
    }

    .menu-toggle {
        display: block;
        z-index: 1001;
    }

    .menu-toggle.open .icon-open {
        display: none;
    }

    .menu-toggle.open .icon-close {
        display: block;
    }

    .search-wrapper {
        width: 80%;
        max-width: 300px;
        margin-top: 1rem;
    }

    .search-container {
        width: 100%;
    }

    .search-container input {
        width: 100%;
    }

    .search-results-container {
        min-width: 0;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    /* تعديلات الأيقونات الدائرية في الموبايل */
    .hero-apps-circular {
        gap: 1rem;
    }
    .hero-app-circle {
        width: 65px;
    }
    .hero-app-circle .circle-img-wrap {
        width: 56px;
        height: 56px;
    }
    .hero-app-circle img {
        width: 56px;
        height: 56px;
    }
    .hero-app-circle span.app-name {
        font-size: 0.6rem;
    }
}