/* =============================================
   STAKE PRO PANEL - Dashboard CSS
   Premium Dark UI with Glassmorphism
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
    --bg-color: #030712;
    --card-bg: rgba(15, 23, 42, 0.85);
    --card-bg-light: rgba(30, 41, 59, 0.6);
    --accent: #00ffcc;
    --accent-dim: #00d4aa;
    --accent-glow: rgba(0, 255, 204, 0.35);
    --accent-glow-sm: rgba(0, 255, 204, 0.15);
    --gold: #f59e0b;
    --gold-glow: rgba(245, 158, 11, 0.3);
    --text-main: #f1f5f9;
    --text-dim: #64748b;
    --text-mid: #94a3b8;
    --danger: #ef4444;
    --success: #10b981;
    --border: rgba(255, 255, 255, 0.07);
    --border-accent: rgba(0, 255, 204, 0.25);
    --shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.7);
    --panel-max-width: 480px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 20px 40px;
    position: relative;
    overflow-x: hidden;
}

/* Animated background */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 50% -20%, rgba(0, 255, 204, 0.06) 0%, transparent 70%),
        radial-gradient(ellipse 60% 40% at 80% 80%, rgba(99, 102, 241, 0.05) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

/* =============================================
   BACK BUTTON
   ============================================= */
.back-btn {
    position: fixed;
    top: 18px;
    left: 18px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-mid);
    border: 1px solid var(--border);
    padding: 9px 16px;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--text-main);
    border-color: rgba(255, 255, 255, 0.15);
}

/* =============================================
   BASE CARD STYLES
   ============================================= */
.login-box,
.panel {
    position: relative;
    width: 100%;
    max-width: var(--panel-max-width);
    background: var(--card-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    padding: 36px 32px;
    border-radius: 28px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow), 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
    z-index: 1;
}

/* =============================================
   LOGIN BOX
   ============================================= */
.login-box {
    text-align: center;
}

.brand-logo {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    margin-bottom: 18px;
    border: 2px solid var(--accent);
    box-shadow: 0 0 0 4px var(--accent-glow-sm), 0 0 25px var(--accent-glow);
    object-fit: cover;
}

.login-box h1 {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--text-main);
    margin-bottom: 6px;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.1);
}

.login-box .small {
    font-size: 14px;
    color: var(--text-dim);
    margin-bottom: 24px;
    display: block;
}

/* =============================================
   INPUTS
   ============================================= */
input[type="text"],
input[type="number"] {
    width: 100%;
    padding: 14px 18px;
    margin-top: 0;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.35);
    color: var(--text-main);
    outline: none;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="text"] {
    text-align: center;
    letter-spacing: 1px;
}

input[type="text"]::placeholder,
input[type="number"]::placeholder {
    color: var(--text-dim);
}

input[type="text"]:focus,
input[type="number"]:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow-sm);
}

/* Hide number arrows */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
}

input[type=number] {
    -moz-appearance: textfield;
}

/* =============================================
   BUTTONS
   ============================================= */
button {
    width: 100%;
    padding: 15px;
    margin-top: 14px;
    border-radius: 14px;
    border: none;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dim) 100%);
    color: #000;
    box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--accent-glow);
    filter: brightness(1.08);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    color: var(--text-mid);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--text-main);
}

.logout {
    background: rgba(239, 68, 68, 0.08);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 8px 16px;
    font-size: 12px;
    margin-top: 0;
    width: auto;
    border-radius: 10px;
}

.logout:hover {
    background: rgba(239, 68, 68, 0.15);
    transform: none;
}

/* =============================================
   MESSAGES
   ============================================= */
.msg {
    color: var(--danger);
    font-size: 13px;
    margin-top: 14px;
    min-height: 18px;
    font-weight: 500;
}

/* =============================================
   PANEL: Layout
   ============================================= */
.panel {
    display: none;
    max-width: 520px;
    padding: 32px 28px;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.panel-header-info .label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 4px;
}

.panel-header-info .key-value {
    font-weight: 700;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: var(--text-main);
    margin-bottom: 6px;
}

.status-badge {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.status-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 6px var(--success);
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

/* =============================================
   PANEL: Cards
   ============================================= */
.card {
    background: var(--card-bg-light);
    padding: 20px;
    border-radius: 18px;
    margin-bottom: 14px;
    border: 1px solid var(--border);
    text-align: left;
}

.card:last-child {
    margin-bottom: 0;
}

/* Credit Display Card */
.credit-card-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.credit-card-label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 6px;
}

.credit-display {
    font-size: 42px;
    font-weight: 900;
    color: var(--accent);
    text-shadow: 0 0 30px var(--accent-glow);
    line-height: 1;
    letter-spacing: -1px;
}

.credit-suffix {
    font-size: 14px;
    color: var(--text-dim);
    font-weight: 500;
    margin-top: 4px;
}

.credit-icon {
    font-size: 44px;
    opacity: 0.6;
}

/* Action Buttons Card */
.actions-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.actions-card button {
    margin-top: 0;
    padding: 14px 10px;
    font-size: 13px;
    border-radius: 12px;
}

/* =============================================
   BUY CREDITS SECTION — Premium UI
   ============================================= */
.buy-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}

.buy-card-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(0, 255, 204, 0.15), rgba(0, 255, 204, 0.05));
    border: 1px solid var(--border-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.buy-card-title {
    font-size: 17px;
    font-weight: 800;
    color: var(--text-main);
}

.buy-card-subtitle {
    font-size: 12px;
    color: var(--text-dim);
    margin-top: 2px;
}

/* Quick-select credit packs */
.credit-packs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.pack-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    color: var(--text-mid);
    border-radius: 12px;
    padding: 10px 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    margin-top: 0;
    transition: all 0.2s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.pack-btn .pack-credits {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-main);
}

.pack-btn .pack-price {
    font-size: 10px;
    color: var(--text-dim);
}

.pack-btn:hover,
.pack-btn.active {
    background: rgba(0, 255, 204, 0.08);
    border-color: var(--border-accent);
    color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px var(--accent-glow-sm);
}

.pack-btn.active .pack-credits {
    color: var(--accent);
}

.pack-btn.active .pack-price {
    color: var(--accent-dim);
}

/* Custom amount input row */
.input-row {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 14px;
}

.input-row label {
    font-size: 12px;
    color: var(--text-dim);
    white-space: nowrap;
    font-weight: 500;
}

.input-row input {
    flex: 1;
    padding: 13px 16px;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    color: var(--text-main);
    border-radius: 12px;
}

/* Price breakdown box */
.price-box {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(16, 185, 129, 0.03));
    border: 1px solid rgba(16, 185, 129, 0.2);
    padding: 14px 16px;
    border-radius: 14px;
    margin-bottom: 14px;
    color: var(--success);
    display: none;
    font-size: 14px;
}

.price-box-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price-box-label {
    color: var(--text-dim);
    font-size: 12px;
    font-weight: 500;
}

.price-box-value {
    font-size: 18px;
    font-weight: 800;
    color: var(--success);
}

.price-box-inr {
    font-size: 12px;
    color: var(--text-dim);
    text-align: right;
    margin-top: 4px;
}

/* Min order note */
.min-note {
    font-size: 11px;
    color: var(--text-dim);
    text-align: center;
    margin-top: -6px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.min-note span {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.25);
    color: var(--gold);
    padding: 3px 10px;
    border-radius: 50px;
    font-weight: 600;
}

/* Send button */
.buy-send-btn {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dim) 100%);
    color: #000;
    font-weight: 800;
    font-size: 14px;
    padding: 16px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 20px var(--accent-glow);
    border: none;
    cursor: pointer;
    width: 100%;
    margin-top: 0;
    transition: all 0.2s ease;
}

.buy-send-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--accent-glow);
    filter: brightness(1.05);
}

.buy-send-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Telegram note at bottom */
.telegram-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 11px;
    color: var(--text-dim);
    margin-top: 12px;
}

.telegram-note a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

.telegram-note a:hover {
    text-decoration: underline;
}

/* =============================================
   TOAST
   ============================================= */
#toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    color: var(--text-main);
    padding: 13px 24px;
    border-radius: 50px;
    border: 1px solid var(--border-accent);
    display: none;
    z-index: 9999;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 255, 204, 0.1);
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

#toast.show {
    display: block;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* =============================================
   ANIMATIONS
   ============================================= */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    animation: fadeInUp 0.4s ease forwards;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 540px) {
    body {
        padding: 70px 14px 30px;
        align-items: flex-start;
    }

    .login-box,
    .panel {
        padding: 28px 20px;
        border-radius: 22px;
    }

    .credit-display {
        font-size: 36px;
    }

    .actions-card {
        grid-template-columns: 1fr;
    }

    .credit-packs {
        grid-template-columns: repeat(2, 1fr);
    }
}