.phone-section {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0px;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.phone-container {
    position: relative;
    width: 320px;
    max-width: 100%;
}

.phone-floating {
    position: relative;
    animation: floatPhone 6s ease-in-out infinite;
    transform-origin: center;
}

.phone-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 9 / 18;
    border-radius: 38px;
    padding: 14px;
    background: linear-gradient(145deg, #151820, #050508);
    box-shadow:
        0 22px 50px rgba(0, 0, 0, 0.9),
        0 0 0 2px rgba(255, 255, 255, 0.05);
    overflow: visible;
    /* важно, чтобы были видны боковые кнопки */
}

/* Металлический кант по периметру */
.phone-frame::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 38px;
    background: linear-gradient(135deg, #3a3f4e, #101117, #565b6c);
    z-index: -2;
}

/* Внутренняя рамка (черный кант экрана) */
.phone-frame::after {
    content: "";
    position: absolute;
    inset: 6px;
    border-radius: 30px;
    background: radial-gradient(circle at top, #151725, #050509);
    box-shadow:
        inset 0 0 0 1px rgba(0, 0, 0, 0.9),
        0 0 14px rgba(0, 0, 0, 0.9);
    z-index: -1;
}

.phone-screen {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 26px;
    overflow: hidden;
    background: radial-gradient(circle at top, #151c3b 0%, #050814 45%, #02030a 100%);
    padding: 26px 18px 18px;
    color: #fff;
    box-sizing: border-box;
}

.phone-notch {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 18px;
    background: #000;
    border-radius: 0 0 12px 12px;
    z-index: 3;
}

.phone-screen {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 26px;
    overflow: hidden;
    background: radial-gradient(circle at top, #151c3b 0%, #050814 45%, #02030a 100%);
    padding: 26px 18px 18px;
    color: #fff;
    box-sizing: border-box;
}

.status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    opacity: 0.85;
    margin-bottom: 8px;
}

.status-left {
    display: flex;
    align-items: center;
}

.status-time {
    letter-spacing: 0.04em;
}

.status-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ===== СЕТЬ (палочки) ===== */

.status-signal {
    display: flex;
    align-items: flex-end;
    gap: 1px;
    height: 12px;
}

.signal-bar {
    width: 2px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.25);
    transition: background 0.25s ease, height 0.25s ease, opacity 0.25s ease;
    opacity: 0.4;
}

.bar-1 {
    height: 4px;
}

.bar-2 {
    height: 6px;
}

.bar-3 {
    height: 8px;
}

.bar-4 {
    height: 10px;
}

.bar-5 {
    height: 12px;
}

.signal-bar.active {
    background: #ffffff;
    opacity: 1;
}

/* ===== Wi-Fi ===== */

.status-wifi {
    width: 14px;
    height: 10px;
    position: relative;
}

.wifi-icon::before,
.wifi-icon::after {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-color: rgba(255, 255, 255, 0.8) transparent transparent transparent;
}

.wifi-icon::before {
    width: 14px;
    height: 14px;
    top: -5px;
}

.wifi-icon::after {
    width: 8px;
    height: 8px;
    top: -1px;
}

.status-wifi::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -1px;
    transform: translateX(-50%);
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #ffffff;
}

/* ===== Батарея ===== */

.status-battery {
    display: flex;
    align-items: center;
    gap: 2px;
}

.battery-body {
    width: 22px;
    height: 10px;
    border-radius: 3px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    padding: 1px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
}

.battery-level {
    height: 100%;
    width: 60%;
    /* стартовый уровень, будет меняться скриптом */
    border-radius: 2px;
    background: linear-gradient(90deg, #4bffb0, #9aff4b);
    transition: width 0.4s ease, background 0.3s ease;
}

.battery-cap {
    width: 2px;
    height: 6px;
    border-radius: 1px;
    background: rgba(255, 255, 255, 0.8);
}

/* низкий заряд — покраснеет через класс .low */
.battery-level.low {
    background: linear-gradient(90deg, #ff4b4b, #ffb84b);
}

/* Toast notification */

.staking-toast {
    position: absolute;
    top: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(-120%);
    width: 100%;
    max-width: 260px;
    padding: 10px 14px;
    border-radius: 16px;
    background: rgba(7, 11, 28, 0.94);
    border: 1px solid rgba(102, 255, 178, 0.4);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    opacity: 0;
    pointer-events: none;
    transition: transform 0.5s ease, opacity 0.5s ease;
    z-index: 4;
}

.staking-toast.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast-icon {
    width: 28px;
    height: 28px;
    font-weight: 700;
    font-size: 14px;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-size: 11px;
    font-weight: 600;
}

.toast-text {
    font-size: 10px;
    opacity: 0.75;
}

.toast-amount {
    font-size: 11px;
    font-weight: 700;
    color: #4bffb0;
    white-space: nowrap;
}

/* ==============Шапка с ценой========= */

.wallet-top {
    margin-top: 46px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.token-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 0, #ff7a7a, #e0163b, #7b0622);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    box-shadow:
        0 8px 18px rgba(0, 0, 0, 0.9),
        0 0 0 1px rgba(255, 255, 255, 0.08);
}

.token-icon span {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.wallet-amount {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.wallet-usd {
    margin-top: 2px;
    font-size: 11px;
    opacity: 0.7;
}

.wallet-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 18px;
    gap: 14px;
}

.wallet-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 0;
    color: #ffffff;
    font: inherit;
}

.btn-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 0, #4d7cff, #1b48ff);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 6px 16px rgba(0, 0, 0, 0.7),
        0 0 0 1px rgba(255, 255, 255, 0.08);
    font-size: 18px;
    font-weight: 600;
}

.btn-label {
    font-size: 11px;
    opacity: 0.8;
}

.wallet-btn:hover .btn-icon {
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.85);
}

.wallet-btn:active .btn-icon {
    transform: translateY(1px) scale(0.97);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.6);
}

.wallet-section {
    margin-top: 14px;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(9, 12, 30, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.03);
    font-size: 11px;
}

.wallet-section-title {
    font-weight: 600;
    margin-bottom: 6px;
    opacity: 0.9;
}

.wallet-row {
    display: flex;
    justify-content: space-between;
    margin-top: 3px;
}

.wallet-row span:last-child {
    opacity: 0.85;
}

.wallet-log {
    margin-top: 10px;
    font-size: 10px;
    opacity: 0.7;
    text-align: center;
}

.phone-shadow {
    position: absolute;
    inset: auto 18px -20px;
    height: 26px;
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.8) 0, transparent 60%);
    filter: blur(2px);
    opacity: 0.7;
}

/* =============================боковые кнопки */
.phone-side {
    position: absolute;
    top: 24%;
    bottom: 24%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 10px;
    pointer-events: none;
}

.phone-side-left {
    left: -4px;
    align-items: flex-start;
}

.phone-side-right {
    right: -35px;
    align-items: flex-end;
}

.side-btn {
    width: 4px;
    height: 22px;
    border-radius: 999px;
    background: linear-gradient(180deg, #5b616f, #232632);
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.6),
        1px 1px 3px rgba(0, 0, 0, 0.7);
}

.side-btn-long {
    height: 34px;
    margin-bottom: 6px;
}

.side-btn-power {
    height: 40px;
    margin-top: 20px;
}

/* =============================History============== */

.wallet-section.history {
    margin-top: 10px;
}

.history-list {
    margin-top: 4px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 80px;
    /* чтобы не раздувало экран */
    overflow: hidden;
    /* просто обрезаем старые строки */
    font-size: 10px;
}

.history-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.history-main {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.history-label {
    font-weight: 500;
}

.history-time {
    opacity: 0.6;
}

.history-amount {
    font-weight: 600;
    color: #4bffb0;
}

@keyframes floatPhone {
    0% {
        transform: translateY(0) rotateX(0deg) rotateY(0deg);
    }

    50% {
        transform: translateY(-10px) rotateX(6deg) rotateY(-6deg);
    }

    100% {
        transform: translateY(0) rotateX(0deg) rotateY(0deg);
    }
}

/* Общий оверлей внутри экрана телефона */
.phone-dialog-overlay {
    position: absolute;
    inset: 0;
    background: rgba(3, 5, 15, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 10;
}

.phone-dialog-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

/* Карточка диалога (как iOS-алерт) */
.phone-dialog {
    width: 88%;
    max-width: 280px;
    border-radius: 20px;
    padding: 14px 14px 12px;
    background: radial-gradient(circle at top, #1a1f35 0%, #050814 60%, #02030a 100%);
    box-shadow:
        0 16px 40px rgba(0, 0, 0, 0.95),
        0 0 0 1px rgba(255, 255, 255, 0.08);
    color: #ffffff;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
        "Segoe UI", sans-serif;
    transform: translateY(10px) scale(0.96);
    opacity: 0;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.phone-dialog-overlay.open .phone-dialog {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.phone-dialog-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.phone-dialog-title {
    font-size: 15px;
    font-weight: 600;
}

.phone-dialog-subtitle {
    font-size: 11px;
    opacity: 0.75;
    margin-bottom: 8px;
}

.phone-dialog-close {
    border: none;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    width: 20px;
    height: 20px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
}

.phone-dialog-close:hover {
    background: rgba(255, 255, 255, 0.16);
}

/* Форма в модалке */

.phone-dialog-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.phone-dialog-alert {
    font-size: 11px;
    padding: 6px 8px;
    border-radius: 10px;
    background: rgba(255, 90, 90, 0.1);
    border: 1px solid rgba(255, 90, 90, 0.4);
}

.phone-dialog-group {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.phone-dialog-group label {
    font-size: 10px;
    letter-spacing: 0.06em;
    opacity: 0.75;
}

.phone-dialog-group input {
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(6, 9, 24, 0.9);
    padding: 6px 8px;
    font-size: 12px;
    color: #ffffff;
    outline: none;
    transition: border 0.18s ease, box-shadow 0.18s ease,
        background 0.18s ease;
}

.phone-dialog-group input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.phone-dialog-group input:focus {
    border-color: rgba(102, 204, 255, 0.9);
    box-shadow: 0 0 0 1px rgba(102, 204, 255, 0.6);
    background: rgba(10, 14, 34, 0.95);
}

.phone-dialog-error {
    font-size: 9px;
    color: #ff8585;
    min-height: 9px;
}

/* Кнопка в модалке */

.phone-dialog-btn {
    margin-top: 4px;
    width: 100%;
    border-radius: 999px;
    border: none;
    background: linear-gradient(135deg, #4d7cff, #1b48ff);
    color: #ffffff;
    padding: 7px 10px;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(31, 80, 255, 0.6);
    transition: transform 0.12s ease, box-shadow 0.12s ease,
        background 0.2s ease;
}

.phone-dialog-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 11px 26px rgba(31, 80, 255, 0.8);
}

.phone-dialog-btn:active {
    transform: translateY(1px) scale(0.97);
    box-shadow: 0 5px 14px rgba(0, 0, 0, 0.9);
}

.phone-dialog-btn .btn-spinner {
    width: 13px;
    height: 13px;
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #ffffff;
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.phone-dialog-btn.loading .btn-spinner {
    opacity: 1;
    transform: scale(1);
}

.phone-dialog-btn.loading .btn-label {
    opacity: 0.6;
}

/* Модалка успеха чуть попроще */

.phone-dialog-success {
    text-align: center;
}

.phone-dialog-success .phone-dialog-subtitle {
    margin-bottom: 10px;
}

/* планшеты и ниже */
@media (max-width: 900px) {
    .hero {
        flex-direction: column;
        gap: 24px;
        margin: 40px auto 60px;
        padding: 0 16px;
    }

    .hero-title {
        font-size: 20px;
        text-align: center;
    }

    .hero-phone {
        width: 100%;
        justify-content: center;
    }
}

/* телефоны */
@media (max-width: 600px) {
    .phone-section {
        padding: 0;
    }

    .phone-container {
        width: 100%;
        max-width: 420px;
        /* почти весь экран, но без жёсткого переполнения */
        margin: 0 auto;
    }
}

/* очень узкие (320–360px) — прям почти во весь экран */
@media (max-width: 420px) {
    .hero {
        padding: 0 8px 32px;
    }

    .phone-container {
        width: 100%;
        max-width: none;
    }
}