@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@300;600&display=swap');

:root {
    --bg: #020202;
    --text-dim: #444;
    --text-light: #eee;
    --accent: #00f3ff;
    --glow: 0 0 20px rgba(0, 243, 255, 0.3);
}

/* فیکس کردن کامل صفحه برای جلوگیری از اسکرول */
html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    background-color: var(--bg);
    overflow: hidden; /* حذف اسکرول */
    position: fixed; /* جلوگیری از کشسانی در iOS و موبایل */
    font-family: 'Rajdhani', sans-serif;
    color: var(--text-light);
    cursor: crosshair;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
}

.stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(white 1px, transparent 1px),
        radial-gradient(rgba(255,255,255,0.5) 1px, transparent 1px);
    background-size: 50px 50px, 20px 20px;
    opacity: 0.1;
    z-index: 0;
    animation: moveStars 100s linear infinite;
    pointer-events: none; /* جلوگیری از تداخل تاچ */
}

@keyframes moveStars {
    from { background-position: 0 0; }
    to { background-position: 1000px 500px; }
}

.cosmos {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
    z-index: 1;
}

.core {
    position: absolute;
    text-align: center;
    z-index: 10;
    animation: breathe 4s ease-in-out infinite;
    pointer-events: none;
    width: 100%; /* اطمینان از مرکز بودن */
}

.core h1 {
    font-size: 3rem;
    font-weight: 300;
    letter-spacing: 8px;
    margin: 0;
    text-transform: uppercase;
    color: #fff;
    text-shadow: 0 0 10px rgba(255,255,255,0.2);
    mix-blend-mode: exclusion;
}

.core span {
    display: block;
    font-size: 0.8rem;
    letter-spacing: 4px;
    color: var(--accent);
    margin-top: 10px;
    opacity: 0.7;
}

.orb {
    position: absolute;
    padding: 15px 30px;
    cursor: pointer;
    transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
    color: var(--text-dim);
    border: 1px solid transparent;
    white-space: nowrap;
    z-index: 20;
    /* جلوگیری از انتخاب متن هنگام لمس در موبایل */
    -webkit-user-select: none;
    user-select: none;
}

.orb::before {
    content: '';
    position: absolute;
    left: -10px;
    top: 50%;
    width: 6px;
    height: 6px;
    background: var(--text-dim);
    border-radius: 50%;
    transform: translateY(-50%);
    transition: 0.3s;
}

.orb:hover {
    color: #fff;
    text-shadow: 0 0 8px var(--accent);
    transform: scale(1.1);
}

.orb:hover::before {
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
}

/* Desktop Positions */
.pos-1 { top: 30%; right: 25%; animation: float 6s ease-in-out infinite; }
.pos-2 { bottom: 30%; left: 25%; animation: float 7s ease-in-out infinite 1s; }
.pos-3 { bottom: 20%; right: 35%; animation: float 8s ease-in-out infinite 2s; }

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

@keyframes breathe {
    0%, 100% { opacity: 0.8; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.02); }
}

.detail-view {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s;
    z-index: 30;
}

.detail-view.active {
    opacity: 1;
    pointer-events: all;
}

.content-box {
    text-align: center;
    max-width: 600px;
    padding: 40px;
    border-left: 1px solid var(--accent);
    background: linear-gradient(90deg, rgba(0,243,255,0.05), transparent);
}

.content-title {
    color: var(--accent);
    font-size: 1.5rem;
    margin-bottom: 20px;
    letter-spacing: 4px;
    text-transform: uppercase;
}

.content-text {
    line-height: 1.8;
    font-size: 1.1rem;
    color: #ccc;
}

.content-text a {
    color: #fff;
    text-decoration: none;
    border-bottom: 1px solid var(--accent);
    transition: 0.3s;
    margin: 0 10px;
}

.content-text a:hover {
    color: var(--accent);
    box-shadow: 0 2px 0 var(--accent);
}

.close-btn {
    margin-top: 40px;
    display: inline-block;
    padding: 10px 30px;
    border: 1px solid #333;
    color: #666;
    cursor: pointer;
    transition: 0.3s;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.8rem;
}

.close-btn:hover {
    border-color: #fff;
    color: #fff;
}

/* --- تنظیمات دقیق موبایل (بدون اسکرول) --- */
@media (max-width: 768px) {
    .core h1 { font-size: 2rem; letter-spacing: 4px; }
    
    /* 1. Network: بالای صفحه */
    .pos-1 { 
        top: 15%; 
        left: 50%; 
        right: auto;
        transform: translateX(-50%); 
    }

    /* 2. Code: بالاتر آمد (30%) - سمت چپ فیکس */
    .pos-2 { 
        top: auto;
        bottom: 30%; /* افزایش ارتفاع از پایین */
        left: 8%;    
        right: auto; 
        transform: none; 
    }

    /* 3. Contact: بالاتر آمد (12%) - وسط */
    .pos-3 { 
        bottom: 12%; /* افزایش ارتفاع از پایین */
        left: 50%; 
        right: auto;
        transform: translateX(-50%); 
    }
    
    .content-box { width: 80%; padding: 20px; }
}