/* =========================================
   N-DRIVE: ДОСЬЕ ПИЛОТА - СТИЛИ
========================================= */

body {
    overflow-y: auto;
    display: block;
}

.profile-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 12px 15px 86px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-sizing: border-box;
    width: 100%;
    position: relative;
    z-index: 5;
}

.profile-header-bar {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 0;
    min-height: 38px;
}

.profile-title {
    color: var(--neon-cyan);
    font-size: 1.2rem;
    text-shadow: 0 0 10px rgba(0, 243, 255, 0.4);
    letter-spacing: 1.5px;
    margin: 0;
    text-transform: uppercase;
    text-align: center;
}

.cyber-btn-back-link {
    position: absolute;
    left: 0;
    background: rgba(10, 15, 25, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-main);
    padding: 8px 14px;
    font-size: 0.75rem;
    font-family: inherit;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none; 
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.cyber-btn-back-link:hover {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.3);
    color: var(--neon-cyan);
}

/* --- Карточка пилота (компактнее и выше) --- */
.pilot-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 16px;
}

.profile-avatar-wrapper {
    position: relative;
    width: 68px;
    height: 68px;
    border-radius: 50%;
    border: 2px solid var(--neon-cyan);
    background: rgba(0, 243, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.15);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    flex-shrink: 0;
}

.profile-avatar-wrapper:hover {
    transform: scale(1.08) rotate(5deg);
}

.profile-avatar-wrapper img {
    width: 85%;
    height: 85%;
    object-fit: contain;
}

.avatar-edit-badge {
    position: absolute;
    bottom: 0; 
    right: -5px;
    background: var(--neon-purple);
    color: #fff;
    font-size: 0.8rem;
    width: 26px; height: 26px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid #0a0f19;
    box-shadow: 0 0 10px rgba(188, 19, 254, 0.5);
}

.pilot-info {
    flex-grow: 1;
    width: 100%;
}

.pilot-name-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

#pilot-name-input {
    background: transparent;
    border: none;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 1.2rem;
    font-weight: 900;
    width: 100%;
    padding: 2px 0 4px 0;
    outline: none;
    font-family: inherit;
    transition: border-color 0.2s;
}

#pilot-name-input:focus {
    border-bottom-color: var(--neon-cyan);
}

.pilot-rank-title {
    font-size: 0.82rem;
    color: var(--neon-gold);
    font-weight: 700;
    margin: 2px 0 8px 0;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* --- Баланс и Тюнинг --- */
.wallet-tile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 18px;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 183, 0, 0.4);
    border-left: 4px solid var(--neon-gold);
}

.wallet-details {
    flex-grow: 1;
    margin-left: 15px;
}

.wallet-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.wallet-amount {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--neon-gold);
    text-shadow: 0 0 15px rgba(255, 183, 0, 0.5);
    line-height: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wallet-amount img {
    width: 24px;
    height: 24px;
}

.tuning-btn {
    background: rgba(255, 183, 0, 0.1);
    border: 1px solid var(--neon-gold);
    color: var(--neon-gold);
    padding: 10px 16px;
    font-size: 0.8rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 800;
    font-family: inherit;
    transition: all 0.3s;
    text-transform: uppercase;
    box-shadow: 0 0 10px rgba(255, 183, 0, 0.1);
}

.tuning-btn:active {
    transform: scale(0.95);
}

/* --- Сетка Статистики --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.stat-box {
    padding: 13px 10px;
    text-align: center;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-num {
    font-size: 1.45rem;
    font-weight: 900;
    color: #fff;
    margin-bottom: 4px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.stat-label {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.3;
}
/* --- Подпись опыта, промокод и кнопка сброса (база для тёмной темы) --- */
#profile-xp-text {
    color: rgba(255, 255, 255, 0.7);
}

#promo-code-input {
    flex: 1 1 0;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 243, 255, 0.3);
    color: #ffffff;
    border-radius: 6px;
    font-family: 'Exo 2', sans-serif;
    text-transform: uppercase;
    outline: none;
}

#btn-apply-promo {
    flex-shrink: 0;
    white-space: nowrap;
}
/* --- Компактный блок промокодов --- */
.promo-card {
    padding: 10px 14px;
    border-radius: 14px;
    text-align: center;
}

.promo-title {
    color: var(--neon-cyan);
    margin: 0 0 8px 0;
    font-size: 0.82rem;
    letter-spacing: 0.8px;
}

.promo-row {
    display: flex;
    gap: 8px;
    justify-content: center;
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
}

#promo-code-input {
    padding: 6px 10px;
    font-size: 0.85rem;
}

#btn-apply-promo {
    padding: 6px 12px;
    font-size: 0.78rem;
}

.promo-message {
    font-size: 0.8rem;
    font-weight: 700;
}

/* Отступ появляется только когда есть текст ответа (экономим место) */
.promo-message:not(:empty) {
    margin-top: 6px;
}

/* --- Кнопка сброса строго по центру --- */
.reset-progress-wrap {
    display: flex;
    justify-content: center;
    margin-top: 2px;
}

#btn-reset-progress {
    padding: 7px 14px;
    font-size: 0.76rem;
}

.stat-box:nth-child(1) .stat-num { color: var(--neon-cyan); text-shadow: 0 0 10px rgba(0, 243, 255, 0.4); }
.stat-box:nth-child(2) .stat-num { color: var(--neon-green); text-shadow: 0 0 10px rgba(0, 255, 102, 0.4); }
.stat-box:nth-child(3) .stat-num { color: var(--neon-purple); text-shadow: 0 0 10px rgba(188, 19, 254, 0.4); }
.stat-box:nth-child(4) .stat-num { color: var(--neon-gold); text-shadow: 0 0 10px rgba(255, 183, 0, 0.4); }
