/* ============================================================
   CYBER//TYPE — Brain Map & Profile Styles
   Личный кабинет, визуализация мозга
   ============================================================ */

/* ==================== PROFILE TOP BAR ==================== */
.profile-grid-page .top-bar {
    position: relative;
    padding-top: 35px;
}

.profile-grid-page .page-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
}

/* ==================== PROFILE LAYOUT ==================== */
.profile-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
    margin-bottom: 30px;
}

/* ==================== USER CARD ==================== */
.user-card {
    display: flex;
    align-items: center;
    gap: 25px;
    background: rgba(0, 255, 200, 0.03);
    border: 1px solid rgba(0, 255, 200, 0.15);
    padding: 25px 30px;
    position: relative;
    overflow: hidden;
}

.user-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

.user-avatar {
    width: 70px;
    height: 70px;
    border: 2px solid var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Orbitron', sans-serif;
    font-size: 28px;
    color: var(--primary);
    background: rgba(0, 255, 200, 0.06);
    flex-shrink: 0;
    position: relative;
}

.user-avatar::after {
    content: '';
    position: absolute;
    inset: -4px;
    border: 1px solid rgba(0, 255, 200, 0.2);
    border-radius: 50%;
    animation: avatarPulse 3s ease-in-out infinite;
}

@keyframes avatarPulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.05); }
}

.user-details {
    flex: 1;
}

.user-name {
    font-family: 'Orbitron', sans-serif;
    font-size: 18px;
    color: var(--primary);
    margin-bottom: 6px;
    letter-spacing: 1px;
}

.user-meta {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    line-height: 1.6;
}

.user-meta span {
    display: inline-block;
    margin-right: 15px;
}

.user-subscription {
    flex-shrink: 0;
    text-align: right;
}

.sub-badge {
    display: inline-block;
    padding: 6px 16px;
    font-family: 'Orbitron', sans-serif;
    font-size: 11px;
    letter-spacing: 2px;
    border: 1px solid;
}

.sub-badge.premium {
    color: var(--mastery);
    border-color: rgba(191, 0, 255, 0.5);
    background: rgba(191, 0, 255, 0.1);
    text-shadow: 0 0 10px rgba(191, 0, 255, 0.5);
}

.sub-badge.free {
    color: rgba(255, 255, 255, 0.4);
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.03);
}

.sub-expires {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.3);
    margin-top: 6px;
}

/* ==================== STATS ROW ==================== */
.profile-stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.profile-stat {
    background: rgba(0, 255, 200, 0.03);
    border: 1px solid rgba(0, 255, 200, 0.1);
    padding: 16px;
    text-align: center;
    position: relative;
}

.profile-stat::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
}

.profile-stat.stat-progress::before { background: var(--primary); }
.profile-stat.stat-mastery::before  { background: var(--mastery); }
.profile-stat.stat-sessions::before { background: var(--stable); }
.profile-stat.stat-streak::before   { background: var(--warning); }
.profile-stat.stat-wpm::before      { background: #00aaff; }
.profile-stat.stat-accuracy::before { background: #ff8800; }

.profile-stat-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 24px;
    margin-bottom: 4px;
}

.profile-stat-label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* ==================== BRAIN MAP CONTAINER ==================== */
.brain-map-wrapper {
    position: relative;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 255, 200, 0.15);
    overflow: hidden;
}

.brain-map-wrapper::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        transparent,
        var(--mastery) 20%,
        var(--primary) 50%,
        var(--mastery) 80%,
        transparent
    );
}

.brain-map-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px 0;
    flex-wrap: wrap;
    gap: 10px;
}

.brain-map-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 14px;
    color: var(--primary);
    letter-spacing: 2px;
}

.brain-legend {
    display: flex;
    gap: 14px;
    font-size: 11px;
    flex-wrap: wrap;
}

.brain-legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    color: rgba(255, 255, 255, 0.6);
}

.brain-legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    box-shadow: 0 0 6px currentColor;
}
.trend-empty {
    width: 100%;
    text-align: center;
    padding: 20px 0;
}

.brain-legend-dot.dot-mastery  { color: var(--mastery);  background: var(--mastery); }
.brain-legend-dot.dot-stable   { color: var(--stable);   background: var(--stable); }
.brain-legend-dot.dot-learning { color: var(--learning); background: var(--learning); }
.brain-legend-dot.dot-weak     { color: var(--weak);     background: var(--weak); }
.brain-legend-dot.dot-unknown  { color: var(--unknown);  background: var(--unknown); }

.brain-canvas-container {
    padding: 10px 15px 15px;
}

.brain-canvas-container canvas {
    display: block;
    width: 100%;
}

/* ==================== QUICK ACTIONS ==================== */
.profile-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.profile-actions .btn {
    flex: 1;
    min-width: 180px;
    text-align: center;
}

/* ==================== WEEKLY TREND ==================== */
.trend-section {
    background: rgba(0, 255, 200, 0.03);
    border: 1px solid rgba(0, 255, 200, 0.1);
    padding: 20px 25px;
}

.trend-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 12px;
    color: var(--primary);
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.trend-bars {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 100px;
}

.trend-bar {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.trend-bar-fill {
    width: 100%;
    min-height: 2px;
    background: linear-gradient(180deg, var(--primary), rgba(0, 255, 200, 0.3));
    border-top: 2px solid var(--primary);
    transition: height 0.6s ease;
}

.trend-bar-label {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.35);
    text-transform: uppercase;
}

.trend-bar-value {
    font-size: 10px;
    color: var(--primary);
    font-family: 'Orbitron', sans-serif;
}

/* ==================== EMPTY STATE ==================== */
.brain-empty-state {
    text-align: center;
    padding: 60px 20px;
}

.brain-empty-icon {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.6;
}

.brain-empty-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 16px;
    color: var(--primary);
    margin-bottom: 8px;
}

.brain-empty-desc {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
    max-width: 400px;
    margin: 0 auto 20px;
    line-height: 1.5;
}

/* ==================== SUBSCRIPTION MANAGEMENT ==================== */
.subscription-manage {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 255, 65, 0.15);
    border-radius: 12px;
    padding: 20px;
}

.sub-manage-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 13px;
    color: var(--primary);
    margin-bottom: 16px;
    letter-spacing: 1px;
}

.sub-manage-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sub-manage-row:last-child {
    border-bottom: none;
}

.sub-manage-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.sub-manage-label-hint {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.3);
    margin-top: 2px;
}

/* Toggle switch */
.toggle-switch {
    position: relative;
    width: 48px;
    height: 26px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 13px;
    cursor: pointer;
    transition: background 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.toggle-switch.active {
    background: rgba(0, 255, 65, 0.3);
    border-color: var(--primary);
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    transition: transform 0.3s, background 0.3s;
}

.toggle-switch.active::after {
    transform: translateX(22px);
    background: var(--primary);
}

.toggle-switch.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Remove payment method button */
.btn-remove-card {
    background: rgba(255, 50, 50, 0.15);
    color: #ff5555;
    border: 1px solid rgba(255, 50, 50, 0.3);
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 12px;
    cursor: pointer;
    font-family: 'Orbitron', sans-serif;
    transition: all 0.2s;
}

.btn-remove-card:hover {
    background: rgba(255, 50, 50, 0.25);
    border-color: #ff5555;
}

.sub-manage-info {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.35);
    padding: 10px 0 0;
    line-height: 1.5;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .user-card {
        flex-direction: column;
        text-align: center;
    }
    .user-subscription {
        text-align: center;
    }
    .profile-stats-row {
        grid-template-columns: repeat(3, 1fr);
    }
    .profile-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .profile-stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
}
