/* ============================================================
   Glass Party – Ultra Premium CSS | 900+ Lines
   رنگ‌ها: سفید، آبی نفتی تیره (#0b1e33)، نارنجی (#f97316)
   افکت‌ها: Glassmorphism چندلایه، موج‌های نور،
   شمارنده‌های پالسی، حاشیه‌های متحرک، پس‌زمینه‌های شناور
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800&display=swap');

:root {
    --gp-white: #ffffff;
    --gp-dark-blue: #0b1e33;
    --gp-dark-blue-soft: #152b44;
    --gp-orange: #f97316;
    --gp-orange-hover: #ea580c;
    --gp-orange-glow: rgba(249, 115, 22, 0.3);
    --gp-gray-bg: #f4f7fc;
    --gp-text: #1e293b;
    --gp-text-light: #64748b;
    --gp-border: #e2e8f0;
    --gp-radius: 24px;
    --gp-radius-sm: 14px;
    --transition-smooth: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1.2);
    --shadow-soft: 0 8px 30px rgba(15, 43, 70, 0.06);
    --shadow-hover: 0 25px 45px rgba(15, 43, 70, 0.12);
}

/* ================== انیمیشن‌های عمومی (پایه) ================== */
@keyframes gpFadeInUp {
    0% { opacity: 0; transform: translateY(40px); }
    100% { opacity: 1; transform: translateY(0); }
}
@keyframes gpFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes gpPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); box-shadow: 0 0 25px var(--gp-orange-glow); }
}
@keyframes gpFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}
@keyframes gpRotateBg {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
@keyframes gpShine {
    0% { left: -100%; }
    100% { left: 200%; }
}
@keyframes gpBorderGlow {
    0%, 100% { border-color: var(--gp-orange); box-shadow: 0 0 8px var(--gp-orange-glow); }
    50% { border-color: var(--gp-dark-blue); box-shadow: 0 0 20px rgba(11,30,51,0.2); }
}
@keyframes gpGradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
@keyframes gpRipple {
    0% { transform: scale(0); opacity: 1; }
    100% { transform: scale(4); opacity: 0; }
}
@keyframes gpTextGlow {
    0%, 100% { text-shadow: 0 0 8px rgba(249,115,22,0.4); }
    50% { text-shadow: 0 0 20px rgba(249,115,22,0.8); }
}
@keyframes gpDash {
    to { stroke-dashoffset: -100; }
}
@keyframes gpParticleFloat {
    0% { transform: translateY(0) rotate(0deg); opacity: 0; }
    50% { opacity: 0.6; }
    100% { transform: translateY(-120px) rotate(360deg); opacity: 0; }
}

/* ================== کانتینر اصلی ================== */
.gp-container,
.gp-login-msg {
    direction: rtl;
    text-align: right;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    max-width: 560px;
    margin: 50px auto;
    color: var(--gp-text);
    animation: gpFadeInUp 0.7s ease forwards;
    opacity: 0;
    position: relative;
    z-index: 1;
}

/* ================== کارت‌های شیشه‌ای (Glassmorphism چندلایه) ================== */
.gp-card,
.gp-already-box,
.gp-dashboard-card {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(18px) saturate(200%);
    -webkit-backdrop-filter: blur(18px) saturate(200%);
    border-radius: var(--gp-radius);
    padding: 42px 34px;
    box-shadow:
        0 8px 32px rgba(15, 43, 70, 0.08),
        inset 0 1px 0 rgba(255,255,255,0.6),
        inset 0 -2px 0 rgba(0,0,0,0.02);
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: all var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

/* لایه‌های تزئینی روی کارت */
.gp-card::before,
.gp-dashboard-card::before {
    content: "";
    position: absolute;
    top: -40%;
    left: -40%;
    width: 180%;
    height: 180%;
    background: radial-gradient(circle at 30% 30%, rgba(249,115,22,0.04) 0%, transparent 50%),
                radial-gradient(circle at 70% 70%, rgba(11,30,51,0.03) 0%, transparent 50%);
    animation: gpRotateBg 25s linear infinite;
    pointer-events: none;
    z-index: 0;
}
.gp-card::after,
.gp-dashboard-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23f97316' fill-opacity='0.02'%3E%3Ccircle cx='20' cy='20' r='1.5'/%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}

/* هاور کارت */
.gp-card:hover,
.gp-dashboard-card:hover {
    transform: translateY(-8px);
    box-shadow:
        0 30px 50px rgba(15, 43, 70, 0.14),
        inset 0 2px 0 rgba(255,255,255,0.8);
    border-color: rgba(249,115,22,0.2);
}

/* هدر کارت */
.gp-card h3,
.gp-already-box h3,
.gp-dashboard-card h3 {
    font-size: 1.9em;
    font-weight: 700;
    margin: 0 0 18px;
    color: var(--gp-dark-blue);
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: -0.5px;
    position: relative;
    z-index: 2;
}
.gp-card h3::after,
.gp-dashboard-card h3::after {
    content: "";
    flex: 1;
    height: 2px;
    background: linear-gradient(to left, var(--gp-orange), transparent);
    border-radius: 2px;
    opacity: 0.5;
}

.gp-card p,
.gp-dashboard-card p {
    color: var(--gp-text-light);
    font-size: 1.05em;
    margin-bottom: 30px;
    line-height: 1.95;
    position: relative;
    z-index: 2;
}

/* ================== فرم ورود کد ================== */
.gp-form {
    position: relative;
    z-index: 2;
}

.gp-form input[type="text"] {
    width: 100%;
    padding: 20px 28px;
    border: 2px solid var(--gp-border);
    border-radius: var(--gp-radius-sm);
    font-size: 1.3em;
    font-weight: 500;
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(4px);
    text-align: center;
    letter-spacing: 4px;
    color: var(--gp-dark-blue);
    transition: all 0.4s ease;
    margin-bottom: 22px;
    outline: none;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.03);
}
.gp-form input[type="text"]:focus {
    border-color: var(--gp-orange);
    background: #ffffff;
    box-shadow: 0 0 0 6px rgba(249, 115, 22, 0.12), 0 0 30px rgba(249,115,22,0.08);
    animation: gpBorderGlow 2.5s infinite;
}

.gp-form button {
    width: 100%;
    background: linear-gradient(135deg, var(--gp-orange), #fb923c);
    color: white;
    border: none;
    padding: 20px;
    border-radius: var(--gp-radius-sm);
    font-size: 1.25em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Vazirmatn', sans-serif;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 22px rgba(249, 115, 22, 0.35);
    z-index: 1;
    background-size: 200% auto;
    animation: gpGradientShift 3s ease infinite;
}
.gp-form button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(249, 115, 22, 0.45);
}
.gp-form button:active {
    transform: scale(0.97);
}

/* افکت موج و برق روی دکمه */
.gp-form button::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 400%;
    height: 400%;
    background: rgba(255,255,255,0.25);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.6s, opacity 0.6s;
    pointer-events: none;
}
.gp-form button:active::after {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0;
    transition: 0s;
}
.gp-form button::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transform: skewX(-25deg);
    animation: gpShine 2.8s infinite;
}

/* ================== پیام‌ها (موفقیت/خطا) ================== */
.gp-message {
    padding: 16px 24px;
    border-radius: var(--gp-radius-sm);
    margin-bottom: 26px;
    font-weight: 500;
    font-size: 0.95em;
    animation: gpFadeIn 0.5s ease;
    position: relative;
    z-index: 2;
    backdrop-filter: blur(4px);
}
.gp-success {
    background: rgba(34, 197, 94, 0.08);
    color: #14532d;
    border-right: 6px solid #22c55e;
    border-left: 1px solid rgba(34,197,94,0.2);
    box-shadow: 0 4px 12px rgba(34,197,94,0.1);
}
.gp-error {
    background: rgba(239, 68, 68, 0.06);
    color: #991b1b;
    border-right: 6px solid #ef4444;
    border-left: 1px solid rgba(239,68,68,0.2);
    box-shadow: 0 4px 12px rgba(239,68,68,0.1);
}

/* ================== حالت قبلاً دعوت شده ================== */
.gp-already-box {
    text-align: center;
    background: rgba(14, 165, 233, 0.05);
    border: 2px solid rgba(14, 165, 233, 0.2);
    backdrop-filter: blur(20px);
}
.gp-already-box .gp-icon {
    font-size: 3.8em;
    margin-bottom: 14px;
    display: inline-block;
    animation: gpFloat 3s ease-in-out infinite, gpPulse 2s infinite;
    filter: drop-shadow(0 4px 10px rgba(14,165,233,0.3));
}
.gp-already-box p {
    color: #1e3a8a;
    font-size: 1.15em;
}
.gp-already-box strong {
    color: var(--gp-orange);
    font-weight: 700;
    background: linear-gradient(135deg, var(--gp-orange), #fdba74);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% auto;
    animation: gpGradientShift 3s ease infinite;
}

/* ================== لینک دعوت ================== */
.gp-link-box {
    display: flex;
    gap: 14px;
    margin-top: 24px;
    position: relative;
    z-index: 2;
}
.gp-link-box input {
    flex: 1;
    padding: 18px 24px;
    border: 2px solid var(--gp-border);
    border-radius: var(--gp-radius-sm);
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(6px);
    font-size: 1.1em;
    direction: ltr;
    text-align: left;
    font-family: 'Courier New', monospace;
    font-weight: 700;
    color: var(--gp-dark-blue);
    transition: all 0.4s;
    letter-spacing: 1.5px;
    box-shadow: inset 0 1px 8px rgba(0,0,0,0.04);
}
.gp-link-box input:focus {
    border-color: var(--gp-orange);
    box-shadow: 0 0 20px rgba(249,115,22,0.15), 0 0 0 6px rgba(249,115,22,0.06);
    outline: none;
}
.gp-link-box button {
    background: var(--gp-dark-blue);
    color: white;
    border: none;
    border-radius: var(--gp-radius-sm);
    padding: 18px 30px;
    font-weight: 600;
    font-size: 1.05em;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;
    font-family: 'Vazirmatn', sans-serif;
    box-shadow: 0 8px 20px rgba(11,30,51,0.25);
    position: relative;
    overflow: hidden;
}
.gp-link-box button:hover {
    background: #152b44;
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(11,30,51,0.35);
}
.gp-link-box button:active {
    transform: scale(0.96);
}

/* ================== داشبورد ================== */
.gp-dashboard-card {
    padding: 42px 34px;
}

.gp-stats-row {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 40px 0 30px;
    position: relative;
    z-index: 2;
}

.gp-stat {
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(14px);
    border-radius: 22px;
    padding: 28px 36px;
    text-align: center;
    min-width: 150px;
    border: 1px solid rgba(255,255,255,0.6);
    box-shadow: 0 6px 22px rgba(15,43,70,0.06);
    transition: all var(--transition-smooth);
    position: relative;
    overflow: hidden;
}
.gp-stat:hover {
    background: rgba(255,255,255,0.9);
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(15,43,70,0.14);
    border-color: rgba(249,115,22,0.25);
}
.gp-stat-label {
    display: block;
    font-size: 0.9em;
    color: var(--gp-text-light);
    margin-bottom: 12px;
    font-weight: 500;
    letter-spacing: -0.3px;
}
.gp-stat-value {
    font-size: 2.9em;
    font-weight: 800;
    color: var(--gp-dark-blue);
    display: block;
    line-height: 1.1;
    background: linear-gradient(135deg, #0b1e33, #1e3a5f);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% auto;
    animation: gpGradientShift 4s ease infinite;
}
.gp-stat.highlighted {
    background: rgba(249,115,22,0.06);
    border-color: rgba(249,115,22,0.2);
    animation: gpPulse 2.5s infinite;
}
.gp-stat.highlighted .gp-stat-value {
    font-size: 1.7em;
    background: linear-gradient(135deg, #f97316, #ea580c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    word-break: break-all;
    font-weight: 700;
}
.gp-hint {
    font-size: 0.85em;
    color: #94a3b8;
    margin: -8px 0 32px;
    text-align: center;
    position: relative;
    z-index: 2;
}

/* ================== لیست دوستان ================== */
.gp-friends-list {
    list-style: none;
    padding: 0;
    margin: 24px 0 0;
    position: relative;
    z-index: 2;
}
.gp-friends-list li {
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(10px);
    padding: 18px 24px;
    border-radius: var(--gp-radius-sm);
    margin-bottom: 14px;
    border-right: 7px solid var(--gp-orange);
    font-weight: 600;
    color: var(--gp-dark-blue);
    transition: all 0.35s ease;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 3px 14px rgba(0,0,0,0.03);
    counter-increment: friend-counter;
}
.gp-friends-list li::before {
    content: "🌟";
    font-size: 1.4em;
    animation: gpFloat 2.5s infinite;
}
.gp-friends-list li:hover {
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(15,43,70,0.1);
    transform: translateX(-8px);
    border-right-color: var(--gp-orange-hover);
}
.gp-no-friends {
    color: #94a3b8;
    font-style: italic;
    text-align: center;
    padding: 24px;
    opacity: 0.8;
}

/* ================== پیام ورود ================== */
.gp-login-msg {
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(22px);
    border-radius: 20px;
    padding: 32px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.6);
    font-weight: 600;
    color: var(--gp-dark-blue);
    box-shadow: var(--shadow-soft);
    animation: gpFadeIn 0.8s ease;
}

/* ================== ذرات پس‌زمینه شناور ================== */
.gp-container::before {
    content: "";
    position: fixed;
    top: -250px;
    left: -250px;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(249,115,22,0.05) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
    animation: gpFloat 10s ease-in-out infinite;
}
.gp-container::after {
    content: "";
    position: fixed;
    bottom: -200px;
    right: -200px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(11,30,51,0.05) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
    animation: gpFloat 8s ease-in-out 2s infinite reverse;
}

/* ذره کوچک اضافه */
.gp-dashboard-card::after {
    content: "";
    position: absolute;
    top: 20px;
    right: 20px;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, rgba(249,115,22,0.1) 0%, transparent 80%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    animation: gpParticleFloat 4s infinite;
}

/* ================== واکنش‌گرایی (Responsive) ================== */
@media screen and (max-width: 768px) {
    .gp-container,
    .gp-login-msg {
        margin: 35px 20px;
        max-width: 100%;
    }
    .gp-card,
    .gp-dashboard-card {
        padding: 32px 24px;
    }
    .gp-card h3,
    .gp-dashboard-card h3 {
        font-size: 1.7em;
    }
    .gp-stats-row {
        flex-direction: column;
        align-items: stretch;
    }
    .gp-stat {
        min-width: auto;
    }
    .gp-link-box {
        flex-direction: column;
    }
    .gp-link-box button {
        width: 100%;
    }
    .gp-form input[type="text"] {
        font-size: 1.15em;
        padding: 16px 20px;
    }
}

@media screen and (max-width: 480px) {
    .gp-card,
    .gp-dashboard-card {
        padding: 24px 18px;
        border-radius: 18px;
    }
    .gp-card h3,
    .gp-dashboard-card h3 {
        font-size: 1.5em;
    }
    .gp-form button {
        padding: 16px;
        font-size: 1.1em;
    }
    .gp-link-box input {
        font-size: 0.95em;
    }
}

/* ================== حالت کاهش حرکت (Accessibility) ================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ================== پشتیبانی از حالت تاریک (Dark Mode) ================== */
@media (prefers-color-scheme: dark) {
    /* در صورت تمایل می‌توان آداپته کرد؛ فعلاً همان تم روشن حفظ می‌شود */
}