@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;900&display=swap');

:root {
    --bg-color: #000000;
    --main-accent: #6e44ff;
    --second-accent: #00f2ff;
    --text-color: #ffffff;
    --card-bg: rgba(255, 255, 255, 0.03);
    --gradient-1: linear-gradient(45deg, #6e44ff, #00f2ff);
    --gradient-2: linear-gradient(135deg, #ff00c3, #6e44ff);
    --glow-color: rgba(110, 68, 255, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cairo', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
    scroll-behavior: smooth;
    position: relative;
}

/* ===== خلفية النجوم المتحركة ===== */
.stars-container {
    position: fixed;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, #111 0%, #000 100%);
    z-index: -2;
}

.stars-container div {
    animation: twinkle var(--duration) infinite;
    box-shadow: 0 0 10px #fff;
}

@keyframes twinkle {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.3; transform: scale(0.8); }
}

/* ===== الشهب ===== */
.shooting-stars {
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.shooting-stars::before {
    content: '';
    position: absolute;
    width: 200px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #fff, transparent);
    animation: shoot 4s linear infinite;
    opacity: 0;
}

@keyframes shoot {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); opacity: 1; }
    100% { transform: translateX(1000%) translateY(1000%) rotate(45deg); opacity: 0; }
}

/* ===== الثقب الأسود المحسن ===== */
.black-hole-bg {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 800px;
    z-index: -1;
    pointer-events: none;
}

.event-horizon {
    position: absolute;
    width: 300px;
    height: 300px;
    background: #000;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 50px 10px #000,
                0 0 100px 30px var(--main-accent),
                0 0 200px 60px rgba(110, 68, 255, 0.5),
                0 0 300px 80px rgba(0, 242, 255, 0.3);
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.05); }
}

.accretion-disk {
    position: absolute;
    width: 600px;
    height: 200px;
    background: radial-gradient(ellipse at center, 
                rgba(110, 68, 255, 0.8) 0%,
                rgba(0, 242, 255, 0.6) 30%,
                transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotateX(75deg);
    border-radius: 50%;
    animation: rotate 20s linear infinite, glow 3s ease-in-out infinite;
    filter: blur(10px);
}

@keyframes rotate {
    from { transform: translate(-50%, -50%) rotateX(75deg) rotateZ(0deg); }
    to { transform: translate(-50%, -50%) rotateX(75deg) rotateZ(360deg); }
}

.gravity-lens {
    position: absolute;
    width: 400px;
    height: 400px;
    border: 2px solid rgba(110, 68, 255, 0.2);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 50px rgba(110, 68, 255, 0.3);
    animation: lens 4s ease-in-out infinite;
}

@keyframes lens {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.3; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.1; }
}

.plasma-jet {
    position: absolute;
    width: 300px;
    height: 100px;
    background: linear-gradient(90deg, transparent, var(--main-accent), transparent);
    top: 50%;
    left: 50%;
    transform-origin: left center;
    animation: jet 3s ease-in-out infinite;
    filter: blur(20px);
}

.plasma-jet.second {
    transform: rotate(180deg) translateX(-50%);
    animation: jet 3s ease-in-out infinite reverse;
}

@keyframes jet {
    0%, 100% { width: 300px; opacity: 0.5; }
    50% { width: 500px; opacity: 1; }
}

/* ===== شريط التنقل ===== */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 10%;
    backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(110, 68, 255, 0.2);
    animation: slideDown 1s ease;
}

@keyframes slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

.logo {
    font-size: 28px;
    font-weight: 900;
    letter-spacing: 2px;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links li a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    position: relative;
    padding: 5px 0;
}

.nav-links li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-1);
    transition: width 0.3s ease;
}

.nav-links li a:hover::after {
    width: 100%;
}

.btn-add {
    background: var(--gradient-1);
    color: #fff;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: 0.3s;
    position: relative;
    overflow: hidden;
}

.pulse {
    animation: pulseBtn 2s infinite;
}

@keyframes pulseBtn {
    0% { box-shadow: 0 0 0 0 rgba(110, 68, 255, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(110, 68, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(110, 68, 255, 0); }
}

.btn-add:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(110, 68, 255, 0.5);
}

/* ===== الهيدر الرئيسي ===== */
header {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
}

.hero-content {
    max-width: 800px;
    padding: 0 20px;
    animation: fadeInUp 1.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-badge {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(110, 68, 255, 0.1);
    border: 1px solid rgba(110, 68, 255, 0.3);
    border-radius: 50px;
    color: var(--second-accent);
    font-size: 14px;
    margin-bottom: 30px;
}

.hero-content h1 {
    font-size: 5rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-content h1 span {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* تأثير Glitch */
.glitch {
    position: relative;
    animation: glitch 3s infinite;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    animation: glitchTop 3s infinite;
    color: #ff00c3;
    z-index: -1;
}

.glitch::after {
    animation: glitchBottom 3s infinite;
    color: #00f2ff;
    z-index: -2;
}

@keyframes glitch {
    2%, 64% { transform: skew(0deg, 0deg); }
    4%, 60% { transform: skew(2deg, 1deg); }
    62% { transform: skew(-2deg, -1deg); }
}

@keyframes glitchTop {
    2%, 64% { transform: translate(2px, -2px); }
    4%, 60% { transform: translate(-2px, 2px); }
    62% { transform: translate(4px, -2px); }
}

@keyframes glitchBottom {
    2%, 64% { transform: translate(-2px, 2px); }
    4%, 60% { transform: translate(2px, -2px); }
    62% { transform: translate(-4px, 2px); }
}

.typing-text {
    font-size: 1.3rem;
    color: #ccc;
    margin-bottom: 40px;
    border-left: 3px solid var(--main-accent);
    padding-right: 20px;
    text-align: right;
}

/* الأزرار */
.hero-btns {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 50px;
}

.main-btn, .sec-btn {
    padding: 15px 40px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 900;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: 0.3s;
}

.main-btn {
    background: var(--gradient-1);
    color: #000;
}

.sec-btn {
    border: 2px solid var(--main-accent);
    color: #fff;
}

.main-btn:hover, .sec-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(110, 68, 255, 0.5);
}

.glow {
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 20px rgba(110, 68, 255, 0.5); }
    50% { box-shadow: 0 0 50px rgba(110, 68, 255, 0.8); }
}

/* الإحصائيات */
.stats-container {
    display: flex;
    justify-content: center;
    gap: 50px;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 900;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    color: #888;
    font-size: 0.9rem;
}

/* مؤشر التمرير */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    animation: bounce 2s infinite;
}

.mouse {
    width: 30px;
    height: 50px;
    border: 2px solid #fff;
    border-radius: 20px;
    position: relative;
}

.mouse::before {
    content: '';
    position: absolute;
    width: 4px;
    height: 10px;
    background: #fff;
    left: 50%;
    transform: translateX(-50%);
    top: 8px;
    border-radius: 2px;
    animation: scroll 2s infinite;
}

@keyframes scroll {
    0% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(20px); }
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(10px); }
}

/* ===== قسم المميزات ===== */
.features, .pricing {
    padding: 100px 10%;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-badge {
    display: inline-block;
    padding: 5px 15px;
    background: rgba(110, 68, 255, 0.1);
    border-radius: 50px;
    color: var(--second-accent);
    font-size: 14px;
    margin-bottom: 15px;
}

.section-title {
    font-size: 3rem;
    margin-bottom: 15px;
}

.gradient-text {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-subtitle {
    color: #888;
    font-size: 1.1rem;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.card {
    background: var(--card-bg);
    padding: 40px 30px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: 0.5s;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
    animation-delay: var(--delay, 0s);
}

.card:nth-child(1) { --delay: 0.1s; }
.card:nth-child(2) { --delay: 0.2s; }
.card:nth-child(3) { --delay: 0.3s; }
.card:nth-child(4) { --delay: 0.4s; }

.card:hover {
    transform: translateY(-10px);
    border-color: var(--main-accent);
    box-shadow: 0 20px 40px rgba(110, 68, 255, 0.2);
}

.card-icon {
    width: 80px;
    height: 80px;
    background: rgba(110, 68, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    position: relative;
    z-index: 1;
}

.card-icon i {
    font-size: 35px;
    color: var(--second-accent);
    animation: iconFloat 3s ease-in-out infinite;
}

@keyframes iconFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

.card p {
    color: #aaa;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

.card-hover-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(110, 68, 255, 0.2), transparent);
    opacity: 0;
    transition: 0.5s;
}

.card:hover .card-hover-effect {
    opacity: 1;
}

/* ===== قسم الخطط ===== */
.plans-grid {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.plan {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 30px;
    width: 350px;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: 0.5s;
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
    animation-delay: var(--delay, 0s);
}

.plan:nth-child(1) { --delay: 0.1s; }
.plan:nth-child(2) { --delay: 0.2s; }
.plan:nth-child(3) { --delay: 0.3s; }

.plan:hover {
    transform: translateY(-10px);
    border-color: var(--main-accent);
}

.plan.featured {
    border: 2px solid var(--main-accent);
    transform: scale(1.05);
    background: rgba(110, 68, 255, 0.05);
    box-shadow: 0 20px 60px rgba(110, 68, 255, 0.3);
}

.plan.featured:hover {
    transform: scale(1.05) translateY(-10px);
}

.badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gradient-1);
    padding: 8px 25px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: bold;
    white-space: nowrap;
}

.plan-header {
    text-align: center;
    margin-bottom: 30px;
}

.plan-header h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.price {
    font-size: 3rem;
    font-weight: 900;
    color: var(--second-accent);
}

.price span {
    font-size: 1rem;
    color: #888;
    font-weight: normal;
}

.plan-features {
    list-style: none;
    margin-bottom: 30px;
}

.plan-features li {
    margin: 15px 0;
    color: #ccc;
    display: flex;
    align-items: center;
    gap: 10px;
}

.plan-features li i {
    color: var(--second-accent);
}

.plan-features li i.fa-times {
    color: #ff4444;
}

.plan-btn {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1.1rem;
    cursor: pointer;
    transition: 0.3s;
    background: transparent;
    border: 2px solid var(--main-accent);
    color: #fff;
}

.plan-btn.highlight {
    background: var(--gradient-1);
    border: none;
    color: #000;
}

.plan-btn.disabled {
    border-color: #444;
    color: #666;
    cursor: not-allowed;
}

.plan-btn:not(.disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(110, 68, 255, 0.4);
}

/* ===== Modal محسن ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: #111;
    padding: 40px;
    border-radius: 30px;
    width: 90%;
    max-width: 500px;
    text-align: center;
    border: 1px solid var(--main-accent);
    position: relative;
    animation: slideUp 0.5s ease;
    box-shadow: 0 30px 60px rgba(110, 68, 255, 0.3);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 30px;
    cursor: pointer;
    color: #888;
    transition: 0.3s;
}

.close:hover {
    color: var(--second-accent);
    transform: rotate(90deg);
}

.modal-subtitle {
    color: var(--second-accent);
    margin: 10px 0 30px;
    font-size: 1.1rem;
}

.input-group {
    text-align: right;
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: #aaa;
    font-size: 0.9rem;
}

.input-group input, .row input {
    width: 100%;
    padding: 15px;
    background: #1a1a1a;
    border: 1px solid #333;
    color: #fff;
    border-radius: 15px;
    font-size: 1rem;
    transition: 0.3s;
}

.input-group input:focus, .row input:focus {
    outline: none;
    border-color: var(--main-accent);
    box-shadow: 0 0 20px rgba(110, 68, 255, 0.3);
}

.card-input-wrapper {
    position: relative;
}

.card-input-wrapper input {
    padding-left: 100px;
}

.card-input-wrapper i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    color: #666;
}

.card-input-wrapper i:first-of-type {
    left: 45px;
}

.row {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.row input {
    flex: 1;
}

.pay-btn {
    width: 100%;
    padding: 18px;
    background: var(--gradient-1);
    border: none;
    border-radius: 15px;
    font-weight: bold;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: 0.3s;
    color: #000;
}

.pay-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(110, 68, 255, 0.4);
}

.error-msg {
    margin-top: 20px;
    color: #ff4d4d;
    background: rgba(255, 77, 77, 0.1);
    padding: 15px;
    border-radius: 15px;
    display: none;
    border: 1px solid rgba(255, 77, 77, 0.3);
}

.secure-badge {
    margin-top: 20px;
    color: #666;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.secure-badge i {
    color: var(--second-accent);
}

/* ===== الفوتر ===== */
footer {
    padding: 50px;
    text-align: center;
    border-top: 1px solid rgba(110, 68, 255, 0.2);
}

.footer-logo {
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 15px;
}

.footer-logo span {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.social-links a {
    color: #666;
    font-size: 1.5rem;
    transition: 0.3s;
}

.social-links a:hover {
    color: var(--second-accent);
    transform: translateY(-3px);
}

/* ===== تحسينات للموبايل ===== */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .hero-content h1 {
        font-size: 3rem;
    }
    
    .hero-btns {
        flex-direction: column;
    }
    
    .stats-container {
        flex-direction: column;
        gap: 20px;
    }
    
    .plan.featured {
        transform: scale(1);
    }
    
    .plan.featured:hover {
        transform: translateY(-10px);
    }
    
    .black-hole-bg {
        width: 400px;
        height: 400px;
    }
    
    .event-horizon {
        width: 150px;
        height: 150px;
    }
    
    .accretion-disk {
        width: 300px;
        height: 100px;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

/* ===== تأثيرات إضافية ===== */
.floating-particles {
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.floating-particles div {
    position: absolute;
    background: rgba(110, 68, 255, 0.2);
    border-radius: 50%;
    filter: blur(5px);
    animation: float-particle linear infinite;
}

@keyframes float-particle {
    from {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    to {
        transform: translateY(-100vh) scale(1);
        opacity: 1;
    }
}

/* تأثير التمرير */
.card, .plan {
    transition: opacity 0.5s ease, transform 0.5s ease;
}

/* تخصيص شريط التمرير */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #111;
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-1);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--second-accent);
}