/* ==================== STAKING ==================== */

#screenStaking {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 130px 16px 100px 16px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: #08090d;
    min-height: 100vh;
    min-height: 100dvh;
    position: relative;
}

#screenStaking.active { display: flex !important; }

/* 🔥 3D-фон */
.staking-stage {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.8s ease;
}

#screenStaking.active .staking-stage {
    opacity: 1;
}

/* 🔥 Контент поверх фона */
.staking-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: auto;
    margin-bottom: auto;
}

.staking-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 🔥 Постепенное появление */
.staking-content > * {
    animation: staking-fade-in 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    opacity: 0;
}

.staking-content > *:nth-child(1) { animation-delay: 0.05s; }
.staking-content > *:nth-child(2) { animation-delay: 0.15s; }
.staking-content > *:nth-child(3) { animation-delay: 0.25s; }

@keyframes staking-fade-in {
    0% { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}

.staking-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.staking-title {
    color: #ffffff;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 3px;
    text-transform: uppercase;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.4), 0 0 40px rgba(240, 136, 62, 0.2);
}

.staking-subtitle {
    color: #a0b4e0;
    font-size: 13px;
    line-height: 1.5;
    letter-spacing: 0.5px;
}

.staking-create-btn {
    width: 100%;
    padding: 16px;
    border-radius: 14px;
    font-weight: 800;
    font-size: 15px;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #f0883e, #f5c842, #ffd700);
    color: #0a0f1a;
    border: 1px solid #f5c84260;
    box-shadow: 0 0 25px rgba(240, 136, 62, 0.4), 0 0 50px rgba(255, 215, 0, 0.2);
    transition: all 0.25s;
    -webkit-tap-highlight-color: transparent;
    margin-bottom: 8px;
}

.staking-create-btn:active {
    transform: scale(0.98);
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.6);
}

/* ==================== ACTIVE STAKES ==================== */

.staking-active-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.staking-active-title {
    color: #6b7daa;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-align: center;
    margin-bottom: 4px;
}

/* 🔥 Карточка стейка — стекло (одно определение, без hover/active) */
.staking-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 14px;
    position: relative;
    overflow: hidden;

    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        inset 0 -1px 0 rgba(255, 255, 255, 0.05);

    animation: staking-fade-in 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    opacity: 0;
}

.staking-card:nth-child(1) { animation-delay: 0.30s; }
.staking-card:nth-child(2) { animation-delay: 0.35s; }
.staking-card:nth-child(3) { animation-delay: 0.40s; }
.staking-card:nth-child(4) { animation-delay: 0.45s; }
.staking-card:nth-child(5) { animation-delay: 0.50s; }
.staking-card:nth-child(6) { animation-delay: 0.55s; }

.staking-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    pointer-events: none;
}

.staking-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.3), transparent, rgba(255, 255, 255, 0.1));
    pointer-events: none;
}

.staking-card.completed {
    background: rgba(95, 245, 122, 0.08);
    border-color: rgba(95, 245, 122, 0.3);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(95, 245, 122, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        inset 0 -1px 0 rgba(255, 255, 255, 0.05);
}

.staking-card > * {
    position: relative;
    z-index: 1;
}

.staking-card-icon {
    width: 36px;
    height: 36px;
    object-fit: contain;
    flex-shrink: 0;
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.2));
}

.staking-card-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.staking-card-currency {
    color: #d0daf0;
    font-size: 13px;
    font-weight: 700;
}

.staking-card-amount {
    color: #ffffff;
    font-size: 16px;
    font-weight: 800;
}

.staking-card-timer {
    color: #6b7daa;
    font-size: 11px;
    font-weight: 600;
    font-family: monospace;
    letter-spacing: 1px;
}

.staking-card-apr {
    color: #5ff57a;
    font-size: 13px;
    font-weight: 800;
    text-shadow: 0 0 10px rgba(95, 245, 122, 0.4);
    flex-shrink: 0;
}

.staking-card-claim-btn {
    padding: 8px 14px;
    border-radius: 10px;
    font-weight: 800;
    font-size: 12px;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: linear-gradient(135deg, #5ff57a, #11AC11);
    color: #0a0f1a;
    box-shadow: 0 0 15px rgba(95, 245, 122, 0.4);
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}

.staking-card-claim-btn:active { transform: scale(0.96); }

.staking-empty {
    color: #5a6070;
    font-size: 13px;
    text-align: center;
    padding: 40px 20px;
}

/* ==================== MODAL 1: CREATE ==================== */

.staking-modal-overlay {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 450px;
    height: 100vh;
    height: 100dvh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 300;
    display: none;
    justify-content: center;
    align-items: flex-end;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.staking-modal-overlay.show { display: flex; opacity: 1; }

.staking-modal-card {
    width: 100%;
    max-width: 450px;
    background: rgba(10, 12, 18, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px 20px 0 0;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: none;
    padding: 28px 24px 36px 24px;
    text-align: center;
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.5);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-sizing: border-box;
    will-change: transform;
}

.staking-modal-overlay.show .staking-modal-card { transform: translateY(0); }

.staking-modal-title {
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 1px;
}

.staking-currency-tabs {
    display: flex;
    background: rgba(120, 120, 128, 0.16);
    border-radius: 10px;
    padding: 2px;
    gap: 0;
    width: 100%;
}

.staking-currency-tab {
    flex: 1;
    min-height: 40px;
    padding: 10px 4px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 13px;
    border: none;
    cursor: pointer;
    background: transparent;
    color: #6b7daa;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    -webkit-tap-highlight-color: transparent;
}

.staking-currency-tab.active {
    background: linear-gradient(135deg, #f0883e, #f5c842);
    color: #0a0f1a;
    box-shadow: 0 0 12px rgba(245, 200, 66, 0.3);
}

.staking-currency-tab img { width: 18px; height: 18px; object-fit: contain; }

.staking-amount-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 8px 0;
}

.staking-amount-input {
    width: 140px;
    background: transparent;
    border: none;
    padding: 8px 4px;
    color: #ffffff;
    font-size: 40px;
    font-weight: 700;
    text-align: center;
    outline: none;
}

.staking-amount-input::placeholder { color: rgba(255, 255, 255, 0.25); }

.staking-amount-icon { width: 36px; height: 36px; object-fit: contain; }

.staking-durations {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.staking-duration-btn {
    padding: 12px 4px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 11px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    background: rgba(255, 255, 255, 0.03);
    color: #a0b4e0;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.2s;
    -webkit-tap-highlight-color: transparent;
    text-align: center;
}

.staking-duration-btn.active {
    background: linear-gradient(135deg, #f0883e, #f5c842);
    color: #0a0f1a;
    border-color: #f5c842;
    box-shadow: 0 0 15px rgba(245, 200, 66, 0.3);
}

.staking-confirm-btn {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 15px;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #f0883e, #f5c842, #ffd700);
    color: #0a0f1a;
    box-shadow: 0 0 25px rgba(240, 136, 62, 0.4);
    transition: all 0.25s;
    -webkit-tap-highlight-color: transparent;
    margin-top: 4px;
}

.staking-confirm-btn:active { transform: scale(0.98); }
.staking-confirm-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.staking-cancel-btn {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 15px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.5);
    transition: all 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.staking-cancel-btn:active { background: rgba(255, 255, 255, 0.08); }

/* ==================== MODAL 2: BONUSES ==================== */

.staking-bonus-title {
    color: #ffffff;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 8px;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

.staking-bonus-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.staking-bonus-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.staking-bonus-label { color: #a0b4e0; font-size: 13px; font-weight: 600; }

.staking-bonus-value {
    color: #5ff57a;
    font-size: 16px;
    font-weight: 800;
    text-shadow: 0 0 10px rgba(95, 245, 122, 0.4);
}

.staking-bonus-value.gold {
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
}

.staking-bonus-value.white {
    color: #ffffff;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

.staking-bonus-hint {
    color: #6b7daa;
    font-size: 12px;
    line-height: 1.5;
    text-align: center;
    margin-top: 4px;
}