:root {
    --wb-purple: #cb11ab;
    --wb-purple-glow: rgba(203, 17, 171, 0.4);
    --wb-purple-dark: #8c0a76;
    --bg-dark: #0a0a14;
    --card-bg: rgba(22, 22, 38, 0.85);
    --card-border: rgba(203, 17, 171, 0.25);
    --cell-unrevealed: #282840;
    --cell-unrevealed-hover: #373756;
    --cell-revealed: #141424;
    --cell-border: #1e1e32;
    --accent-fire: #ff4500;
    --accent-gold: #ffb703;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --font-heading: 'Outfit', sans-serif;
    --font-mono: 'Share Tech Mono', monospace;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
    -webkit-user-select: none;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-heading);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
    padding: 20px 10px;
}

/* Background Ambient Glow */
.background-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at 50% 20%, rgba(203, 17, 171, 0.18) 0%, transparent 65%),
                radial-gradient(circle at 80% 80%, rgba(255, 69, 0, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* Wildberries Warehouse Fire Backdrop */
.fire-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    opacity: 1;
    transition: opacity 0.8s ease;
    pointer-events: none;
}

.fire-backdrop.hidden {
    opacity: 0;
}

.fire-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.7) contrast(1.25) saturate(1.2);
    animation: zoomPulse 10s infinite alternate ease-in-out;
}

@keyframes zoomPulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.08); }
}

.fire-overlay-vignette {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(255, 69, 0, 0.25) 0%, rgba(10, 10, 20, 0.85) 85%);
}

/* Explosive Canvas Overlay */
#explosionCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 999;
}

/* Screen Shake Effect */
body.shake {
    animation: shakeAnim 0.6s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shakeAnim {
    10%, 90% { transform: translate3d(-3px, 1px, 0); }
    20%, 80% { transform: translate3d(5px, -3px, 0); }
    30%, 50%, 70% { transform: translate3d(-7px, 5px, 0); }
    40%, 60% { transform: translate3d(7px, -5px, 0); }
}

/* App Container */
.app-container {
    width: 100%;
    max-width: 960px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Header */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 14px 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 15px var(--wb-purple-glow);
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-logo-wrapper {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    overflow: hidden;
    border: 1.5px solid var(--wb-purple);
    box-shadow: 0 0 12px var(--wb-purple-glow);
}

.brand-logo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.brand-title {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: 1px;
    background: linear-gradient(90deg, #fff, #f4a2ec);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-sub {
    font-size: 0.72rem;
    color: var(--text-muted);
    letter-spacing: 1.5px;
    font-weight: 600;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 14px;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.4);
    padding: 4px 10px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.custom-select {
    background: transparent;
    color: var(--text-main);
    border: none;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    outline: none;
}

.custom-select option {
    background: #181829;
    color: #fff;
}

.btn-icon {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background: var(--wb-purple);
    box-shadow: 0 0 10px var(--wb-purple);
}

/* Game Card Console */
.game-card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

.card-toolbar {
    width: 100%;
    display: flex;
    justify-content: center;
}

.difficulty-picker {
    display: flex;
    background: rgba(0, 0, 0, 0.5);
    padding: 4px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    gap: 4px;
}

.diff-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 8px 16px;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.85rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.diff-btn.active, .diff-btn:hover {
    background: var(--wb-purple);
    color: #fff;
    box-shadow: 0 0 10px var(--wb-purple-glow);
}

/* Scoreboard LCD Bar */
.scoreboard-bar {
    width: 100%;
    max-width: 520px;
    background: #0d0d18;
    border: 2px solid rgba(203, 17, 171, 0.4);
    border-radius: 14px;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.8);
}

.lcd-panel {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #05050a;
    padding: 6px 14px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.lcd-icon {
    font-size: 1.2rem;
}

.lcd-digital {
    font-family: var(--font-mono);
    font-size: 1.6rem;
    color: #ff0055;
    text-shadow: 0 0 8px rgba(255, 0, 85, 0.6);
    letter-spacing: 2px;
}

.status-face-btn {
    background: radial-gradient(circle, #0057b7 0%, #0a0a1a 100%);
    border: 2px solid #ffd700;
    border-radius: 50%;
    width: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.4), inset 0 0 10px rgba(0, 87, 183, 0.5);
}

.status-face-btn:hover {
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.7), inset 0 0 12px rgba(0, 87, 183, 0.8);
    transform: scale(1.05);
}

.status-face-btn:active {
    transform: scale(0.92);
}

#faceIcon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

#faceIcon svg {
    width: 36px;
    height: 36px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
    transition: transform 0.2s ease;
}

/* Board Wrapper & Grid */
.board-wrapper {
    width: 100%;
    overflow-x: auto;
    display: flex;
    justify-content: center;
    padding: 10px 0;
}

.board-grid {
    display: grid;
    gap: 4px;
    background: #0c0c16;
    padding: 12px;
    border-radius: 14px;
    border: 2px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 0 20px rgba(0,0,0,0.8);
}

/* Cell Styling */
.cell {
    width: 36px;
    height: 36px;
    background: var(--cell-unrevealed);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-top-color: rgba(255, 255, 255, 0.18);
    border-left-color: rgba(255, 255, 255, 0.18);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.cell:hover:not(.revealed):not(.flagged) {
    background: var(--cell-unrevealed-hover);
    border-color: var(--wb-purple);
    transform: translateY(-1px);
}

.cell:active:not(.revealed):not(.flagged) {
    transform: translateY(1px);
}

.cell.revealed {
    background: var(--cell-revealed);
    border-color: var(--cell-border);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.6);
    cursor: default;
}

.cell.flagged {
    color: #ff3366;
}

.cell.mine-hit {
    background: radial-gradient(circle, #ff0000 0%, #8b0000 100%) !important;
    animation: pulseHit 0.5s infinite alternate;
}

@keyframes pulseHit {
    0% { box-shadow: 0 0 5px #ff0000; }
    100% { box-shadow: 0 0 20px #ff4500; }
}

.cell.mine-revealed {
    background: #2a0815;
}

/* Cell Number Colors */
.cell-1 { color: #38bdf8; text-shadow: 0 0 6px rgba(56, 189, 248, 0.4); }
.cell-2 { color: #4ade80; text-shadow: 0 0 6px rgba(74, 222, 128, 0.4); }
.cell-3 { color: #f87171; text-shadow: 0 0 6px rgba(248, 113, 113, 0.4); }
.cell-4 { color: #c084fc; text-shadow: 0 0 6px rgba(192, 132, 252, 0.4); }
.cell-5 { color: #fbbf24; text-shadow: 0 0 6px rgba(251, 191, 36, 0.4); }
.cell-6 { color: #2dd4bf; text-shadow: 0 0 6px rgba(45, 212, 191, 0.4); }
.cell-7 { color: #f43f5e; text-shadow: 0 0 6px rgba(244, 63, 94, 0.4); }
.cell-8 { color: #ffffff; text-shadow: 0 0 6px rgba(255, 255, 255, 0.8); }

/* Card Footer / Legend */
.card-footer {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 12px;
    width: 100%;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.legend-badge {
    background: rgba(255, 255, 255, 0.05);
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.95rem;
}

/* Stats Panel */
.stats-panel {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 16px 24px;
}

.stats-panel h3 {
    font-size: 1.05rem;
    margin-bottom: 12px;
    color: var(--wb-purple);
    font-weight: 800;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.stat-box {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 12px;
    text-align: center;
}

.stat-value {
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Modal Backdrops & Cards */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(5, 5, 12, 0.85);
    backdrop-filter: blur(10px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 0.3s ease;
}

.modal-backdrop.active,
.modal-backdrop:not(.hidden) {
    display: flex;
    opacity: 1;
    pointer-events: auto;
}

.modal-backdrop.hidden {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.modal-card {
    background: #141424;
    border-radius: 20px;
    padding: 24px 30px;
    width: 92%;
    max-width: 480px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9);
    transform: scale(1);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
}

.loss-theme {
    border: 2px solid #ff4500;
    box-shadow: 0 0 35px rgba(255, 69, 0, 0.6);
}

.win-theme {
    border: 2px solid var(--wb-purple);
    box-shadow: 0 0 35px var(--wb-purple-glow);
}

.modal-fire-image-wrapper {
    position: relative;
    width: 100%;
    height: 190px;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 16px;
    border: 1px solid rgba(255, 69, 0, 0.4);
    box-shadow: 0 0 15px rgba(255, 69, 0, 0.4);
}

.modal-fire-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.95) contrast(1.15);
}

.modal-fire-badge {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.85);
    color: #ff4500;
    border: 1px solid #ff4500;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 1px;
    white-space: nowrap;
}

.modal-win-icon {
    font-size: 3.5rem;
    margin-bottom: 10px;
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 900;
    margin-bottom: 10px;
}

.loss-theme h2 { color: #ff4500; }
.win-theme h2 { color: var(--wb-purple); }

.modal-card p {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.5;
    margin-bottom: 20px;
}

.victory-stats {
    background: rgba(0, 0, 0, 0.4);
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.btn-primary-fire {
    background: linear-gradient(135deg, #ff4500 0%, #b30000 100%);
    color: #fff;
    border: none;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 800;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(255, 69, 0, 0.6);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
}

.btn-primary-win {
    background: linear-gradient(135deg, var(--wb-purple) 0%, #ff007f 100%);
    color: #fff;
    border: none;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 800;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 0 15px var(--wb-purple-glow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
}

.btn-primary-fire:hover, .btn-primary-win:hover {
    transform: translateY(-2px);
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .main-header {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .header-controls {
        justify-content: space-between;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cell {
        width: 30px;
        height: 30px;
        font-size: 0.95rem;
    }
}

/* ===================================================
   GLASS MODAL & AUTH / PROFILE MODALS
   =================================================== */
.glass-modal {
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(203, 17, 171, 0.35);
    border-radius: 16px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(203, 17, 171, 0.2);
    backdrop-filter: blur(16px);
    overflow: hidden;
    position: relative;
    max-width: 480px;
    width: 90%;
    animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
    0% { opacity: 0; transform: scale(0.95) translateY(10px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.modal-close-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.modal-tabs {
    display: flex;
    gap: 0.35rem;
}

.modal-tab-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 700;
    padding: 0.45rem 0.9rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-tab-btn.active {
    background: rgba(203, 17, 171, 0.2);
    color: #fff;
    border: 1px solid rgba(203, 17, 171, 0.4);
}

.auth-form {
    display: none;
    flex-direction: column;
    gap: 1.1rem;
    padding: 1.5rem;
}

.auth-form.active {
    display: flex;
}

.auth-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: #fff;
}

.auth-subtitle {
    font-size: 0.84rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin-top: -0.5rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.input-group label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.auth-input {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: #fff;
    font-size: 0.92rem;
    padding: 0.7rem 0.9rem;
    outline: none;
    transition: all 0.2s ease;
}

.auth-input:focus {
    border-color: var(--wb-purple);
    box-shadow: 0 0 12px var(--wb-purple-glow);
}

.input-hint {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.auth-alert {
    padding: 0.65rem 0.9rem;
    border-radius: 8px;
    font-size: 0.82rem;
}

.auth-alert.error {
    background: rgba(244, 63, 94, 0.15);
    border: 1px solid rgba(244, 63, 94, 0.4);
    color: #fda4af;
}

.auth-alert.success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #6ee7b7;
}

.auth-alert.hidden {
    display: none !important;
}

/* ===================================================
   USER PROFILE & CREDENTIALS MODAL
   =================================================== */
.profile-modal-card {
    width: 80vw !important;
    max-width: 1080px !important;
    min-width: 320px !important;
    max-height: 90vh !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    padding: 0 !important;
}

@media (max-width: 900px) {
    .profile-modal-card {
        width: 95vw !important;
        max-width: 95vw !important;
    }
}

.profile-modal-card .profile-content {
    overflow-y: auto !important;
    max-height: calc(90vh - 65px) !important;
    padding: 1.4rem 1.8rem !important;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.profile-dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    align-items: stretch;
    width: 100%;
}

.profile-dashboard-col {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: 100%;
}

@media (max-width: 768px) {
    .profile-dashboard-grid {
        grid-template-columns: 1fr;
    }
}

.profile-top-header-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    width: 100%;
    margin-bottom: 0.25rem;
}

.avatar-circular-container {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    background: linear-gradient(135deg, var(--wb-purple) 0%, #06b6d4 100%);
    box-shadow: 0 0 20px rgba(203, 17, 171, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.avatar-circular-container:hover {
    border-color: #00d2ff;
    box-shadow: 0 0 25px rgba(0, 210, 255, 0.6);
    transform: scale(1.03);
}

.avatar-circular-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.avatar-fallback-initial {
    font-size: 2.25rem;
    font-weight: 900;
    color: #fff;
    text-transform: uppercase;
}

.avatar-hover-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.avatar-circular-container:hover .avatar-hover-overlay {
    opacity: 1;
}

.avatar-hover-overlay span {
    color: #fff;
    font-size: 1.1rem;
}

.avatar-overlay-text {
    font-size: 0.68rem !important;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.profile-tier-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
    flex-wrap: wrap;
    margin-top: 0.25rem;
}

.btn-master-upgrade {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 9999px !important;
    padding: 0.5rem 1.05rem !important;
    font-size: 0.84rem !important;
    font-weight: 700 !important;
    font-family: inherit !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.45rem !important;
    cursor: pointer !important;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.45) !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    white-space: nowrap !important;
}

.btn-master-upgrade:hover {
    transform: scale(1.04) translateY(-1px) !important;
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.65) !important;
}

.profile-master-perks-strip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    flex-wrap: wrap;
    font-size: 0.78rem;
    font-weight: 600;
    color: #fde68a;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, rgba(99, 102, 241, 0.1) 100%);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 8px;
    padding: 0.4rem 0.85rem;
    margin-top: 0.25rem;
    width: 100%;
    max-width: 520px;
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.1);
}

.profile-master-perks-strip .perk-dot {
    color: rgba(245, 158, 11, 0.6);
    font-size: 0.85rem;
}

.account-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.28rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: all 0.25s ease;
}

.account-type-badge.tier-free {
    background: rgba(148, 163, 184, 0.15);
    border: 1px solid rgba(148, 163, 184, 0.35);
    color: #cbd5e1;
    box-shadow: 0 0 10px rgba(148, 163, 184, 0.15);
}

.account-type-badge.tier-master {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.25) 0%, rgba(245, 158, 11, 0.35) 100%);
    border: 1px solid rgba(251, 191, 36, 0.7);
    color: #fef08a;
    box-shadow: 0 0 16px rgba(234, 179, 8, 0.45);
}

.profile-efficiency-card {
    width: 100%;
    padding: 1rem 1.15rem;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(203, 17, 171, 0.15) 0%, rgba(6, 182, 212, 0.12) 100%);
    border: 1px solid rgba(203, 17, 171, 0.35);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.efficiency-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.efficiency-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.efficiency-tier-badge {
    font-size: 0.72rem;
    font-weight: 800;
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
    background: linear-gradient(135deg, #eab308 0%, #f97316 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(234, 179, 8, 0.3);
}

.ppm-main-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.15rem;
    padding: 0.25rem 0;
}

.ppm-number-wrapper {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
}

.ppm-number {
    font-size: 2.35rem;
    font-weight: 900;
    color: #fff;
    line-height: 1;
    background: linear-gradient(135deg, #ffffff 0%, #38bdf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.ppm-unit {
    font-size: 1rem;
    font-weight: 800;
    color: #00d2ff;
}

.ppm-desc-text {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.profile-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-top: 0.25rem;
    padding-top: 0.6rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.pstat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.pstat-val {
    font-size: 1rem;
    font-weight: 800;
    color: #fff;
}

.pstat-lbl {
    font-size: 0.68rem;
    color: var(--text-muted);
}

.profile-credentials-box {
    width: 100%;
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.cred-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.82rem;
    padding: 0.25rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

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

.cred-label {
    color: var(--text-muted);
    font-weight: 500;
}

.cred-val {
    color: #fff;
    font-weight: 600;
}

.cred-val-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.badge-verified {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.15rem 0.55rem;
    border-radius: 9999px;
    line-height: 1;
    user-select: none;
    letter-spacing: 0.02em;
}

.badge-verified.verified {
    background: rgba(16, 185, 129, 0.18);
    border: 1px solid rgba(16, 185, 129, 0.45);
    color: #34d399;
}

.badge-verified.unverified {
    background: rgba(245, 158, 11, 0.18);
    border: 1px solid rgba(245, 158, 11, 0.45);
    color: #fbbf24;
}

.profile-storage-card {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 1.1rem 1.2rem;
    margin: 0.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.profile-storage-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.profile-storage-title {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.profile-storage-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.storage-item-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 0.75rem 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    position: relative;
    transition: all 0.2s ease;
}

.storage-item-box:hover {
    border-color: rgba(203, 17, 171, 0.4);
    background: rgba(203, 17, 171, 0.08);
}

.storage-item-icon {
    font-size: 1.4rem;
    line-height: 1;
}

.storage-item-info {
    display: flex;
    flex-direction: column;
}

.storage-item-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
}

.storage-item-value {
    font-size: 0.95rem;
    font-weight: 800;
    color: #fff;
}

.btn-storage-action {
    margin-top: 0.35rem;
    padding: 0.45rem 0.65rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-storage-action:hover {
    background: rgba(56, 189, 248, 0.2);
    border-color: #38bdf8;
    color: #fff;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-muted);
    padding: 0.6rem 1.1rem;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.btn-secondary.danger {
    color: #fda4af;
    background: rgba(244, 63, 94, 0.15);
    border-color: rgba(244, 63, 94, 0.35);
}

.btn-secondary.danger:hover {
    background: rgba(244, 63, 94, 0.3);
    border-color: #f43f5e;
    color: #fff;
}
