/* -----------------------------------------------------------
   SCREEN 7: LOBBY DASHBOARD
----------------------------------------------------------- */

/* Screen Transition Styles */
/* Screen Transition Styles - MOVED TO style.css or SCOPED */
/* 
.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #121212;
    transition: opacity 0.1s ease;
    z-index: 10;
}

.screen.hidden {
    display: none !important;
    opacity: 0;
    pointer-events: none;
    z-index: 0;
}

.screen.active {
    opacity: 1;
    z-index: 100;
}
*/

/* Apply Flex Layout ONLY to Lobby Screen to preserve others */
#screen-hub-explore {
    display: flex;
    flex-direction: column;
    background: #121212;
}

/* 1. Lobby Header (Sticky Profile) */
.lobby-header {
    flex: 0 0 auto;
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px 20px;
    padding-top: 20px;
    z-index: 100;
    position: sticky;
    top: 0;
}

.lobby-profile-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.profile-info-block {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.profile-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--accent-gold);
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-text {
    display: flex;
    flex-direction: column;
}

.lobby-nickname {
    color: #fff;
    font-size: 16px;
    margin: 0;
    line-height: 1.2;
}

.lobby-details {
    color: #888;
    font-size: 13px;
    margin: 0;
}

.profile-actions {
    display: flex;
    gap: 12px;
}

.icon-btn {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s;
}

.icon-btn:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.1);
}

.icon-btn img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.lobby-balance-row {
    display: flex;
    justify-content: flex-start;
    gap: 20px;
    background: rgba(0, 0, 0, 0.3);
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.balance-item {
    display: flex;
    align-items: center;
    gap: 2px;
    font-size: 14px;
    color: #ccc;
}

.balance-item .label {
    opacity: 0.7;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.balance-item .val-iron {
    color: #fff;
}

.balance-item .val-crown {
    color: var(--accent-gold);
    font-weight: bold;
}

.currency-icon {
    width: 20px;
    height: 20px;
    display: block;
}


/* 2. Lobby Content (Scrollable Grid) */
.lobby-content {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 20px;
    padding-bottom: 90px;
    display: flex;
    flex-direction: column;
}

/* Character Preview Container */
.lobby-character-preview {
    width: 100%;
    height: 300px;
    position: relative;
    margin-bottom: 20px;
    background: #000;
    border-radius: 16px;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.lobby-bg-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    pointer-events: none;
}

/* Slider Arrows */
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 60px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 18px;
    cursor: pointer;
    z-index: 20;
    display: none;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
    border-radius: 8px;
}

.slider-arrow:hover {
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
}

.slider-arrow.left {
    left: 10px;
}

.slider-arrow.right {
    right: 10px;
}

/* Inner Spine Container */
.lobby-spine-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Header Overlay */
.lobby-card-header {
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    z-index: 10;
}

.lobby-card-left-col {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 40%;
}

/* Common container style for Nickname and Bars */
.nickname-container,
.stat-bar-container {
    position: relative;
    width: 100%;
    height: 15px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.6);
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.char-name-text {
    font-size: 12px;
    font-weight: normal;
    color: #fff;
    text-shadow: 0 1px 2px #000;
    z-index: 1;
}

.btn-add-char {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffd700, #ffaa00);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #1A1F36;
    font-size: 20px;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    transition: transform 0.1s;
}

.btn-add-char:active {
    transform: scale(0.9);
}

/* Bars internals */
.stat-bar-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.stat-bar-fill {
    height: 100%;
    width: 50%;
    border-radius: 6px;
    transition: width 0.5s ease;
}

.stat-bar-fill.hp {
    background: linear-gradient(to right, #ff4d4d, #cc0000);
    box-shadow: 0 0 8px rgba(255, 0, 0, 0.5);
}

.stat-bar-fill.xp {
    background: linear-gradient(to right, #ffeb3b, #fbc02d);
    box-shadow: 0 0 8px rgba(255, 235, 59, 0.5);
}

.stat-bar-text {
    position: relative;
    z-index: 1;
    font-size: 9px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 2px #000;
    pointer-events: none;
}

.lobby-actions-row {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 20px;
    width: 100%;
}

/* Small Buttons */
.lobby-small-btn {
    flex: 1;
    height: 70px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.2s, background 0.2s;
    background: rgba(255, 255, 255, 0.05);
    padding: 5px;
}

.lobby-small-btn:active {
    transform: scale(0.95);
}

.small-btn-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.action-btn-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    margin-bottom: 2px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.btn-title-small {
    font-size: 11px;
    color: #ccc;
    font-weight: normal;
}

/* Variants */
.btn-pvp-small {
    background: linear-gradient(to bottom, rgba(74, 144, 226, 0.1), rgba(20, 20, 20, 0.6));
    border-color: rgba(74, 144, 226, 0.2);
}

.btn-hero-small {
    background: linear-gradient(to bottom, rgba(80, 200, 120, 0.1), rgba(20, 20, 20, 0.6));
}

.btn-trade-small {
    background: linear-gradient(to bottom, rgba(255, 215, 0, 0.1), rgba(20, 20, 20, 0.6));
}

.btn-tasks-small {
    background: linear-gradient(to bottom, rgba(155, 89, 182, 0.1), rgba(20, 20, 20, 0.6));
}

/* CTA Banner */
.cta-banner-container {
    margin-top: auto;
}

.cta-banner {
    background: linear-gradient(90deg, #FFD700 0%, #FF8C00 100%);
    border-radius: 12px;
    padding: 12px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #000;
    font-weight: bold;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.2);
}

.cta-icon {
    font-size: 18px;
}

/* 3. Lobby Footer (Navigation) */
.lobby-footer {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    height: 70px;
    background: #1a1a1a;
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 200;
    padding-bottom: 0;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: #666;
    cursor: pointer;
    padding: 10px;
    transition: color 0.2s;
}

.nav-item.active {
    color: var(--accent-gold);
}

.nav-icon {
    font-size: 22px;
}

.nav-icon-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    margin-bottom: 2px;
    filter: brightness(0.6);
    transition: filter 0.3s;
}

.nav-item.active .nav-icon-img {
    filter: brightness(1) drop-shadow(0 0 3px rgba(255, 215, 0, 0.4));
}

.nav-label {
    font-size: 11px;
}

/* Responsive adjustments */
@media screen and (max-height: 700px) {
    .lobby-character-preview {
        height: 250px;
        /* Smaller preview on small screens */
    }
}