/*
 * loading.css — SMM Panel Loading / Auth Page
 * Telegram Web App tekshiruvi davomida ko'rsatiladigan sahifa stillari
 */

/* ── Reset & Base ────────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg:      #0f0f13;
    --card:    #1a1a24;
    --border:  rgba(255, 255, 255, 0.08);
    --accent:  #5b6bff;
    --accent2: #8b5cf6;
    --text:    #e8e8f0;
    --muted:   #8888a8;
    --danger:  #ef4444;
    --radius:  18px;
}

html, body {
    height: 100%;
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* ── Animated gradient background ──────────────────────────── */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 50% at 30% 20%, rgba(91, 107, 255, 0.15) 0%, transparent 70%),
        radial-gradient(ellipse 50% 40% at 70% 80%, rgba(139, 92, 246, 0.12) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* ── Container ──────────────────────────────────────────────── */
.lp-container {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    padding: 40px 24px;
    width: 100%;
    max-width: 360px;
    text-align: center;
}

/* ── Logo ──────────────────────────────────────────────────── */
.lp-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.lp-logo-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 0 8px 24px rgba(91, 107, 255, 0.4);
}

.lp-logo-text {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.lp-logo-text span {
    color: var(--accent);
}

/* ── Card ──────────────────────────────────────────────────── */
.lp-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px 28px;
    width: 100%;
    backdrop-filter: blur(12px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

/* ── Loading state ─────────────────────────────────────────── */
#stateLoading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.lp-spinner {
    width: 52px;
    height: 52px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: lp-spin 0.8s linear infinite;
}

@keyframes lp-spin {
    to { transform: rotate(360deg); }
}

.lp-loading-text {
    font-size: 15px;
    color: var(--muted);
    font-weight: 500;
}

.lp-dots::after {
    content: '';
    animation: lp-dots 1.4s steps(4, end) infinite;
}

@keyframes lp-dots {
    0%  { content: ''; }
    25% { content: '.'; }
    50% { content: '..'; }
    75% { content: '...'; }
}

/* ── Error state ───────────────────────────────────────────── */
#stateError {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

.lp-error-icon {
    width: 64px;
    height: 64px;
    background: rgba(239, 68, 68, 0.12);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.lp-error-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
}

.lp-error-desc {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.6;
}

/* ── Button ────────────────────────────────────────────────── */
.lp-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 12px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(91, 107, 255, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.lp-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(91, 107, 255, 0.45);
}

.lp-btn:active {
    transform: translateY(0);
}

.lp-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.lp-note {
    font-size: 12px;
    color: var(--muted);
    opacity: 0.7;
    margin-top: -8px;
}

/* ── Fade animations ────────────────────────────────────────── */
.lp-fade-in {
    animation: lp-fadeIn 0.5s ease forwards;
}

.lp-fade-out {
    animation: lp-fadeOut 0.3s ease forwards;
}

@keyframes lp-fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes lp-fadeOut {
    from { opacity: 1; }
    to   { opacity: 0; transform: translateY(-8px); }
}
