/* b.stage App Styles */
.bstage-view {
    background-color: #000000;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 150;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
    overflow: hidden;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border: none;
    outline: 1px solid #000; /* Fix potential white edge lines */
}

#bstage-view.bstage-view {
    inset: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.bstage-view.active {
    transform: translateX(0);
}

/* Header */
.bstage-header {
    height: auto;
    min-height: 44px; /* Compact height */
    padding: max(10px, calc(10px + env(safe-area-inset-top, 0px))) 16px 10px;
    margin-top: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #000000;
    position: sticky;
    top: 0;
    z-index: 20;
}

.bstage-logo {
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    cursor: pointer;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.bstage-header-right {
    display: flex;
    gap: 20px;
    align-items: center;
}

.bstage-icon-btn {
    font-size: 18px;
    color: #fff;
    cursor: pointer;
}

.bstage-avatar-placeholder {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #888;
}

/* Following Bar (Top) */
.bstage-following-bar {
    padding: 10px 16px 15px;
    display: flex;
    gap: 15px;
    overflow-x: auto;
    background-color: #000000;
    border-bottom: 1px solid #222;
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

.bstage-following-bar::-webkit-scrollbar {
    display: none;
}

.bstage-create-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: #222;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    cursor: pointer;
    border: 1px solid #333;
}

.bstage-create-btn i {
    font-size: 20px;
    color: #fff;
}

.bstage-team-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    flex-shrink: 0;
}

.bstage-team-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: #333;
    overflow: hidden;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}

.bstage-team-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bstage-team-item.active .bstage-team-avatar {
    border-color: #007aff;
}

.bstage-team-name {
    font-size: 11px;
    color: #888;
    max-width: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
}

/* Main Content Area */
.bstage-content-area {
    flex: 1;
    overflow-y: auto;
    position: relative;
    background-color: #111;
}

/* Team Home View */
.bstage-team-home {
    width: 100%;
    height: 100%;
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #000000; /* Darker Fallback */
    margin: 0;
    padding: 0;
}

.bstage-team-home::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4); /* Dark overlay */
}

.bstage-home-content {
    position: relative;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 100%;
}

.bstage-home-title {
    font-size: 32px;
    font-weight: 800;
    color: #fff;
    text-align: center;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.bstage-social-icons {
    display: flex;
    gap: 20px;
    margin-bottom: 10px;
}

.bstage-social-icon {
    font-size: 20px;
    color: #fff;
    opacity: 0.8;
    cursor: pointer;
    transition: opacity 0.2s;
}

.bstage-social-icon:hover {
    opacity: 1;
}

.bstage-sub-bubble {
    background-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 12px 24px;
    border-radius: 30px;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.1s;
}

.bstage-sub-bubble:active {
    transform: scale(0.95);
}

/* Pop View (List of Characters) */
.bstage-pop-view {
    padding: 20px 16px;
    background-color: #000000;
    min-height: 100%;
}

.bstage-pop-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.bstage-pop-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #1c1c1e;
    padding: 12px 16px;
    border-radius: 16px;
}

.bstage-pop-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bstage-pop-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    background-color: #333;
}

.bstage-pop-name-wrap {
    display: flex;
    flex-direction: column;
}

.bstage-pop-name {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 4px;
}

.bstage-verified-icon {
    color: #007aff; /* Blue check */
    font-size: 12px;
}

.bstage-pop-role {
    font-size: 12px;
    color: #888;
}

.bstage-pop-sub-btn {
    background-color: #fff;
    color: #000;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.bstage-pop-status {
    background-color: #333;
    color: #888;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Floating Bottom Navigation */
.bstage-bottom-nav-container {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    width: auto;
}

.bstage-bottom-nav {
    display: flex;
    background-color: rgba(30, 30, 30, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 30px;
    padding: 5px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    position: relative; /* For indicator */
}

.bstage-nav-indicator {
    position: absolute;
    bottom: 5px;
    left: 5px; /* Initial position matching padding */
    height: 38px; /* Match item height approx */
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 25px;
    transition: transform 0.3s cubic-bezier(0.25, 0.1, 0.25, 1), width 0.3s ease;
    pointer-events: none;
    z-index: 0;
}

.bstage-nav-item {
    padding: 10px 20px;
    color: #888;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s;
    position: relative;
    white-space: nowrap;
}

.bstage-nav-item.active {
    color: #fff;
    /* Remove default active styling if relying solely on indicator, 
       but keeping color change is good */
    z-index: 1;
}

/* Modals / Sheets */
.bstage-modal-content {
    padding: 20px;
}

.bstage-price-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 20px 0;
}

.bstage-price-option {
    background-color: #2c2c2e;
    padding: 15px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    border: 2px solid transparent;
}

.bstage-price-option.selected {
    border-color: #fff;
    background-color: #3a3a3c;
}

.bstage-price-title {
    font-weight: 600;
    font-size: 15px;
    color: #fff;
}

.bstage-price-amount {
    color: #fff;
    font-weight: 700;
}

/* Create Team Form - Enhanced */
.bstage-form-group {
    background-color: #2c2c2e; /* Slightly darker background for the group */
    border-radius: 24px; /* Larger border radius */
    padding: 10px 20px;
    margin-bottom: 24px;
    border: 1px solid #333;
}

.bstage-form-item {
    display: flex;
    flex-direction: column; /* Stack vertically for modern look */
    justify-content: center;
    min-height: 60px;
    padding: 10px 0;
    border-bottom: 1px solid #444;
}

.bstage-form-item:last-child {
    border-bottom: none;
}

.bstage-form-item label {
    font-size: 13px;
    font-weight: 600;
    color: #aaa;
    margin-bottom: 6px;
}

.bstage-form-item input,
.bstage-form-item textarea {
    width: 100%;
    border: none;
    outline: none;
    font-size: 16px;
    font-weight: 500;
    background: transparent;
    color: #fff;
    font-family: inherit;
}

.bstage-form-item textarea {
    resize: none;
    height: 44px;
    line-height: 1.4;
}

.bstage-avatar-upload {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: #e5e5ea;
    margin: 0 auto 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    overflow: hidden;
    position: relative;
}

.bstage-avatar-upload img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.bstage-avatar-upload i {
    font-size: 30px;
    color: #aaa;
}

.bstage-bg-upload {
    width: 100%;
    height: 140px;
    background-color: #f2f2f7;
    border: 1px dashed #d1d1d6;
    border-radius: 24px; /* Match large radius */
    margin-bottom: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    overflow: hidden;
    position: relative;
    transition: background-color 0.2s;
}

.bstage-bg-upload img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.bstage-add-char-btn {
    text-align: center;
    color: #007aff;
    margin: 10px 0;
    cursor: pointer;
    font-weight: 500;
}

.bstage-chars-list-preview {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 10px;
    min-height: 60px; /* Reserve space */
}

.bstage-char-preview-item {
    width: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.bstage-char-preview-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #eee;
    object-fit: cover;
}

.bstage-char-preview-name {
    font-size: 10px;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
    text-align: center;
}

/* User Profile Stats */
.bstage-profile-stats-container {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.bstage-profile-stat-bubble {
    background-color: #f2f2f7;
    border-radius: 20px;
    padding: 15px 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 120px;
}

.bstage-stat-label {
    font-size: 12px;
    color: #888;
    margin-bottom: 5px;
}

.bstage-stat-value {
    font-size: 18px;
    font-weight: 700;
    color: #000;
}

/* Profile Actions */
.bstage-profile-actions {
    margin-top: 30px;
    display: flex;
    flex-direction: column; /* Vertical layout */
    gap: 10px;
    align-items: center;
    width: 100%;
    padding: 0 40px;
    box-sizing: border-box;
}

.bstage-profile-btn {
    width: 100%;
    justify-content: center;
    padding: 14px 20px;
    border-radius: 25px;
    background-color: #000;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.bstage-profile-btn:active {
    opacity: 0.8;
}

/* Chat Detail Sheet Styles */
.bstage-settings-list {
    display: flex;
    flex-direction: column;
    padding: 0 20px 40px;
    gap: 10px; /* Spacing between buttons */
}

.bstage-setting-item {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    background-color: #f2f2f7; /* Button look */
    border-radius: 30px; /* Fully rounded / Pill shape */
    border-bottom: none; /* No separator */
    cursor: pointer;
}

.bstage-setting-item:last-child {
    border-bottom: none;
}

.bstage-setting-icon {
    width: 24px;
    font-size: 18px;
    color: #000;
    margin-right: 12px;
    display: flex;
    justify-content: center;
}

.bstage-setting-label {
    font-size: 16px;
    color: #000;
    font-weight: 500;
}

/* Toggle Switch */
.bstage-switch {
    width: 50px;
    height: 30px;
    background-color: #e5e5ea;
    border-radius: 15px;
    position: relative;
    transition: background-color 0.3s;
    cursor: pointer;
}

.bstage-switch.active {
    background-color: #34c759; /* Green */
}

.bstage-switch-knob {
    width: 26px;
    height: 26px;
    background-color: #fff;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.bstage-switch.active .bstage-switch-knob {
    transform: translateX(20px);
}

/* Translation Styles */
.bstage-trans-divider {
    /* Removed divider styles */
    display: none;
}

.bstage-trans-text {
    font-size: 13px;
    color: #888; /* Gray text */
    line-height: 1.4;
    margin-top: 4px;
    display: none; /* Hidden by default */
}

/* Show Translation when active */
.bstage-chat-content.show-trans .bstage-trans-text {
    display: block;
}

/* Locker Grid Styles */
.bstage-locker-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    padding: 0; /* Full bleed or padded? usually sheet content has padding. bstage-modal-content has 20px */
}

.bstage-locker-item {
    aspect-ratio: 1 / 1;
    background-color: #333;
    overflow: hidden;
    position: relative;
    border-radius: 2px;
}

.bstage-locker-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bstage-locker-item.add-btn {
    background-color: #f2f2f7;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.bstage-locker-item.add-btn i {
    font-size: 24px;
    color: #888;
}

/* Chat View Styles */
.bstage-chat-view {
    background-color: #1c1c1e; /* Lighter deep black */
    display: flex;
    flex-direction: column;
    z-index: 200; /* Above everything */
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.chat-header {
    background-color: transparent; /* Transparent for floating look */
    color: #fff;
    border-bottom: none;
    z-index: 2000; /* Increased significantly to fix click issues over bg */
    padding: 10px 16px; 
    margin-top: 0;
    position: absolute; /* Floating */
    top: max(10px, env(safe-area-inset-top, 0px)); /* Adjusted for standard top spacing */
    left: 0;
    width: 100%;
    pointer-events: none; /* Let clicks pass through empty areas */
}

/* Floating Header Elements */
.chat-header .bstage-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #2c2c2e; /* Flat, lighter gray */
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: auto; /* Re-enable clicks */
    border: none;
    position: relative; /* Ensure z-index works */
    z-index: 2001; /* Ensure button is on top */
    cursor: pointer;
}

.bstage-chat-header-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 6px 16px;
    border-radius: 50px; /* Capsule shape - Updated to 50px */
    border: 1px solid rgba(255, 255, 255, 0.1);
    pointer-events: auto;
    z-index: 2001;
}

.bstage-chat-name {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

.bstage-chat-days {
    font-size: 10px;
    color: #ccc;
}

.bstage-chat-content {
    flex: 1;
    overflow-y: auto;
    padding: 70px 16px 80px; /* Add top/bottom padding for floating headers/inputs */
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.bstage-chat-date {
    text-align: center;
    font-size: 12px;
    color: #666;
    margin-bottom: 10px;
    background-color: #222;
    padding: 4px 12px;
    border-radius: 12px;
    align-self: center;
}

.bstage-chat-msg {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    max-width: 80%;
}

.bstage-chat-msg.income {
    align-self: flex-start;
}

.bstage-chat-msg.outgoing {
    align-self: flex-end;
    flex-direction: row; 
    align-items: flex-end; /* Align container to bottom */
    justify-content: flex-end;
}

/* Status + Time Container */
.bstage-msg-status {
    display: flex;
    flex-direction: column;
    align-items: flex-end; /* Align text to right */
    margin-right: 6px;
    justify-content: flex-end;
    height: 100%;
}

.bstage-msg-time {
    font-size: 10px;
    color: #888;
    margin-top: 2px;
    font-family: inherit; /* Don't change font */
}

/* New Status Text */
.bstage-msg-status-text {
    font-size: 10px;
    color: #888; /* Gray */
    font-weight: 500;
    margin-bottom: 2px;
}

/* System Notice Bubble */
.bstage-system-notice {
    align-self: center;
    background-color: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 15px;
    margin: 10px 0;
}

.bstage-chat-msg img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    background-color: #333;
}

.bstage-chat-avatar-placeholder {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 600;
    color: #fff;
}

.bstage-chat-bubble {
    padding: 10px 14px;
    border-radius: 20px; /* Pure rounded corners as requested */
    font-size: 15px;
    line-height: 1.4;
    position: relative;
}

.bstage-chat-msg.income .bstage-chat-bubble {
    background-color: #2c2c2e; /* Dark Gray */
    color: #fff;
}

.bstage-chat-msg.outgoing .bstage-chat-bubble {
    background-color: #e5e5ea; /* Light Gray */
    color: #000;
}

.bstage-chat-input-area {
    padding: 10px 16px;
    padding-bottom: 10px;
    background-color: transparent;
    display: flex;
    align-items: center;
    position: absolute;
    bottom: 20px; /* Standard bottom spacing */
    left: 0;
    width: 100%;
    z-index: 20;
}

.bstage-chat-input-wrapper {
    flex: 1;
    background-color: rgba(0, 0, 0, 0.6); /* Semi-transparent */
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 25px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.bstage-chat-input-wrapper input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 15px;
    color: #fff;
}

.bstage-chat-input-wrapper i {
    color: #007aff;
    font-size: 18px;
    cursor: pointer;
}

/* Shop Styles */
.bstage-shop-view {
    padding: 20px 16px;
    padding-bottom: 100px;
    background-color: #000000;
    min-height: 100%;
}

.bstage-shop-banner {
    width: 100%;
    height: 150px;
    border-radius: 16px;
    background-color: #1a1a1a;
    background-image: url('https://picsum.photos/seed/bstage_banner/800/400?grayscale');
    background-size: cover;
    background-position: center;
    margin-bottom: 24px;
    overflow: hidden;
    position: relative;
}

.bstage-shop-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bstage-shop-banner-text {
    position: absolute;
    bottom: 16px;
    left: 16px;
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.bstage-shop-section-title {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
}

/* Shop Category Bar */
.bstage-shop-category-bar {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 10px;
    margin-bottom: 5px; /* Reduced margin to make room for wand */
    -ms-overflow-style: none;
    scrollbar-width: none;
    align-items: center;
}

.bstage-shop-category-bar::-webkit-scrollbar {
    display: none;
}

.bstage-shop-cat-item {
    padding: 8px 16px;
    border-radius: 20px;
    background-color: #1c1c1e;
    color: #888;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    border: 1px solid #333;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px; /* Space for delete icon */
}

/* Delete button on category */
.bstage-cat-delete {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 16px;
    height: 16px;
    /* Remove background as requested */
    background-color: transparent; 
    color: #888; /* Subtle color */
    font-size: 12px; /* Slightly larger for X */
    margin-left: 4px;
    cursor: pointer;
    transition: color 0.2s;
}
.bstage-cat-delete:hover {
    color: #ff3b30; /* Red on hover */
    background-color: transparent;
}

/* Magic Wand Button (Small, B&W, Right Aligned) */
.bstage-magic-action-container {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 15px;
    padding-right: 5px;
}

.bstage-small-magic-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #fff; /* White background */
    color: #000; /* Black icon */
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    border: 1px solid #ccc;
    font-size: 12px;
    transition: transform 0.1s;
}
.bstage-small-magic-btn:active {
    transform: scale(0.9);
}

.bstage-shop-cat-item.active {
    background-color: #fff;
    color: #000;
    border-color: #fff;
}

.bstage-shop-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 30px;
}

.bstage-shop-item {
    background-color: #1c1c1e;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.bstage-shop-img {
    aspect-ratio: 1 / 1;
    background-color: #1a1a1a;
    background-image: url('https://picsum.photos/seed/bstage_shop/400/400?grayscale');
    background-size: cover;
    background-position: center;
    overflow: hidden;
    position: relative;
}

.bstage-shop-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bstage-shop-info {
    padding: 10px;
}

.bstage-shop-name {
    font-size: 13px;
    color: #fff;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bstage-shop-price {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
}

.bstage-shop-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    margin-bottom: 4px;
    /* B&W Theme: White text on Black (or dark gray) background */
    background-color: #333;
    color: #fff;
    border: 1px solid #444;
}

/* Menu Enhancements */
.bstage-setting-right-action {
    font-size: 13px;
    color: #007aff;
    padding: 4px 8px;
    cursor: pointer;
}

.bstage-collapse-area {
    display: none;
    padding: 0 20px 10px;
    flex-direction: column;
    gap: 8px;
}

.bstage-collapse-area.open {
    display: flex;
}

.bstage-css-input {
    width: 100%;
    height: 80px;
    background-color: #f2f2f7;
    border: 1px solid #e5e5ea;
    border-radius: 12px;
    padding: 10px;
    font-family: monospace;
    font-size: 12px;
    color: #000;
    outline: none;
    resize: none;
}

.bstage-apply-btn {
    align-self: flex-end;
    background-color: #000;
    color: #fff;
    padding: 6px 16px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

/* Day Mode (Light Mode) */
.bstage-chat-view.light-mode {
    background-color: #ffffff !important;
}

.bstage-chat-view.light-mode .chat-header .bstage-icon-btn {
    background-color: #f2f2f7; 
    color: #000; 
    border: none;
}

.bstage-chat-view.light-mode .bstage-chat-header-info {
    background-color: rgba(255,255,255,0.6); 
    color: #000; 
    border: 1px solid rgba(0,0,0,0.1);
}

.bstage-chat-view.light-mode .bstage-chat-name {
    color: #000;
}

.bstage-chat-view.light-mode .bstage-chat-days {
    color: #666;
}

.bstage-chat-view.light-mode .bstage-chat-input-wrapper {
    background-color: rgba(255,255,255,0.8); 
    border: 1px solid rgba(0,0,0,0.1);
}

.bstage-chat-view.light-mode .bstage-chat-input-wrapper input {
    color: #000;
}

.bstage-chat-view.light-mode .bstage-chat-msg.income .bstage-chat-bubble {
    background-color: #fff; 
    color: #000; 
    border: 1px solid #eee; 
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* Day Mode Fixes */
.bstage-chat-view.light-mode .bstage-chat-date {
    background-color: #f2f2f7;
    color: #666;
}

.bstage-chat-view.light-mode .bstage-system-notice {
    background-color: rgba(0,0,0,0.05);
    color: #666;
}

/* Content Tab Styles */
.bstage-content-view {
    padding-bottom: 100px;
    background-color: #000000;
    min-height: 100%;
    color: #fff;
    overflow-y: auto;
}

.bstage-top-carousel {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 20px 16px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.bstage-top-carousel::-webkit-scrollbar { display: none; }

.bstage-carousel-item {
    width: 280px;
    height: 160px;
    border-radius: 16px;
    background-color: #1a1a1a;
    background-image: url('https://picsum.photos/seed/bstage_carousel/600/400?grayscale');
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
.bstage-carousel-item img {
    width: 100%; height: 100%; object-fit: cover;
}

.bstage-add-photo-btn {
    width: 60px;
    height: 160px;
    border-radius: 16px;
    background-color: #1c1c1e;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    cursor: pointer;
    border: 1px solid #333;
}
.bstage-add-photo-btn i { font-size: 20px; color: #666; }

/* Video Series */
.bstage-video-section {
    padding: 0 16px;
    margin-top: 10px;
}
.bstage-section-header {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #fff;
}
.bstage-video-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.bstage-video-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    cursor: pointer;
}
.bstage-video-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #1a1a1a;
    background-image: url('https://picsum.photos/seed/bstage_video/800/450?grayscale');
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}
.bstage-video-thumb img {
    width: 100%; height: 100%; object-fit: cover;
}
.bstage-video-duration {
    position: absolute;
    bottom: 8px; right: 8px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}
.bstage-video-info { }
.bstage-video-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 4px;
    color: #fff;
}
.bstage-video-meta {
    font-size: 12px;
    color: #888;
}

/* Video Detail Modal */
.bstage-video-modal-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0;
    overflow: hidden;
    background-color: #000;
}

.bstage-video-player-placeholder {
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #1a1a1a;
    background-image: url('https://picsum.photos/seed/bstage_video/800/450?grayscale');
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    color: #fff;
    position: relative;
    border-bottom: 1px solid #222;
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto;
    gap: 8px;
    cursor: pointer;
}

.bstage-video-player-placeholder.has-cover {
    background-image: none; /* Removed pattern if it has actual cover, applied via JS inline style */
}

.bstage-video-content-bubble {
    background-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 14px;
    color: #fff;
    max-width: 85%;
    line-height: 1.4;
    align-self: flex-start;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

#bstage-video-detail-modal .bottom-sheet {
    background-color: #000;
    border: 1px solid #333;
    color: #fff;
}

.bstage-video-detail-scroll {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 80px; /* Space for input */
}

.bstage-video-info-section {
    padding: 16px;
    border-bottom: 1px solid #222;
}

.bstage-publisher-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.bstage-publisher-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #333;
    object-fit: cover;
}

.bstage-publisher-name {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

.bstage-video-detail-title {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
    line-height: 1.3;
}

.bstage-video-detail-meta {
    font-size: 13px;
    color: #888;
    margin-bottom: 12px;
}

.bstage-video-description {
    font-size: 14px;
    color: #ccc;
    line-height: 1.5;
    background-color: #1c1c1e;
    padding: 12px;
    border-radius: 8px;
}

/* Comments Section */
.bstage-comments-section {
    padding: 16px;
}

.bstage-comments-header {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 16px;
}

.bstage-comment-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.bstage-comment-item {
    display: flex;
    gap: 12px;
}

.bstage-comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #333;
    flex-shrink: 0;
}

.bstage-comment-content {
    flex: 1;
}

.bstage-comment-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 2px;
}

.bstage-comment-author {
    font-size: 13px;
    font-weight: 600;
    color: #888;
}

.bstage-comment-time {
    font-size: 11px;
    color: #666;
}

.bstage-comment-text {
    font-size: 14px;
    color: #fff;
    line-height: 1.4;
}

.bstage-comment-input-area {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 12px 16px;
    padding-bottom: 12px;
    background-color: #1c1c1e;
    border-top: 1px solid #333;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10;
}

.bstage-user-avatar-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #333;
}

.bstage-comment-input {
    flex: 1;
    background-color: #2c2c2e;
    border: none;
    border-radius: 20px;
    padding: 8px 16px;
    color: #fff;
    font-size: 14px;
    outline: none;
}

.bstage-comment-send-btn {
    color: #007aff;
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
}
.bstage-comment-send-btn.disabled {
    color: #555;
    cursor: default;
}
