/* MShub Global Style System */
:root {
    --bg-primary: #08080c;
    --bg-secondary: #13141f;
    --bg-card: rgba(25, 27, 41, 0.6);
    --border-color: rgba(255, 255, 255, 0.08);
    
    --text-primary: #ffffff;
    --text-secondary: #8b8e9f;
    --text-muted: #535565;
    
    --accent-orange: #fca840;
    --accent-yellow: #f1c40f;
    --accent-cyan: #00d2d3;
    --accent-pink: #ff9ff3;
    --accent-blue: #0984e3;
    --accent-gold: #d4af37;
    
    --transition-speed: 0.3s;
    --border-radius: 16px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: #030303;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text-primary);
    display: flex;
    justify-content: center;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ========================================================
   PREMIUM PRELOADER & ANIMATIONS SYSTEM
   ======================================================== */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #06060a;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.5s;
}

.preloader.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.preloader-logo {
    font-size: 42px;
    font-weight: 900;
    background: linear-gradient(135deg, #ff007f 0%, #7f00ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0px 4px 20px rgba(127, 0, 255, 0.4);
    margin-bottom: 24px;
    animation: pulseLogo 1.5s ease-in-out infinite alternate;
}

@keyframes pulseLogo {
    0% { transform: scale(0.95); opacity: 0.8; }
    100% { transform: scale(1.05); opacity: 1; }
}

.loader-bar-container {
    width: 160px;
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255,255,255,0.03);
}

.loader-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #f7b733 0%, #fc4a1a 100%);
    border-radius: 10px;
    animation: fillLoader 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fillLoader {
    0% { width: 0%; }
    100% { width: 100%; }
}

/* Premium 3D Flip-In Animation */
@keyframes premiumFlipIn {
    0% {
        opacity: 0;
        transform: perspective(1200px) rotateX(-65deg) translateY(50px);
        transform-origin: top center;
    }
    100% {
        opacity: 1;
        transform: perspective(1200px) rotateX(0deg) translateY(0);
        transform-origin: top center;
    }
}

.animate-flip {
    opacity: 0;
}

.active-animations .animate-flip {
    animation: premiumFlipIn 0.85s cubic-bezier(0.19, 1, 0.22, 1) both;
    backface-visibility: hidden;
}



/* Staggered Delay offsets */
.delay-1 { animation-delay: 0.04s; }
.delay-2 { animation-delay: 0.08s; }
.delay-3 { animation-delay: 0.12s; }
.delay-4 { animation-delay: 0.16s; }
.delay-5 { animation-delay: 0.2s; }
.delay-6 { animation-delay: 0.24s; }
.delay-7 { animation-delay: 0.28s; }
.delay-8 { animation-delay: 0.32s; }

/* Limit layout to mobile-sized viewport on desktop */
.mobile-container {

    width: 100%;
    max-width: 480px;
    background: linear-gradient(135deg, var(--bg-primary) 0%, #0c0d15 100%);
    min-height: 100vh;
    position: relative;
    padding-bottom: 90px; /* Space for sticky bottom navigation */
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.8);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* Hide scrollbars for a clean app feel */
.mobile-container::-webkit-scrollbar {
    display: none;
}

/* Header Action Bar for subpages */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    position: sticky;
    top: 0;
    background: rgba(8, 8, 12, 0.85);
    backdrop-filter: blur(10px);
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
}

.back-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    text-decoration: none;
    transition: background var(--transition-speed);
}

.back-btn:active {
    background: rgba(255, 255, 255, 0.15);
}

.header-title {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.header-actions {
    display: flex;
    gap: 12px;
}

.header-icon-btn {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 24px;
}

/* Button & Form Elements */
.btn-primary {
    background: linear-gradient(90deg, #f7b733 0%, #fc4a1a 100%);
    border: none;
    border-radius: var(--border-radius);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    padding: 14px 20px;
    width: 100%;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
    box-shadow: 0 4px 15px rgba(247, 183, 51, 0.3);
    text-align: center;
    text-decoration: none;
    display: inline-block;
}

.btn-primary:active {
    transform: scale(0.98);
    opacity: 0.9;
}

/* Glassmorphism Forms */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    padding-left: 4px;
}

.input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.input-container input, .input-container select, .input-container textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    padding: 14px 16px;
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-size: 15px;
    outline: none;
    color-scheme: dark;
    transition: border-color var(--transition-speed), background-color var(--transition-speed);
}


.input-container input:focus, .input-container select:focus {
    border-color: var(--accent-orange);
    background: rgba(255, 255, 255, 0.08);
}

.input-container select option {
    background-color: #13141f;
    color: #ffffff;
}

.input-icon-right {

    position: absolute;
    right: 16px;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
}

/* Bottom Navigation */
.bottom-nav {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 76px;
    background: rgba(19, 20, 31, 0.95);
    backdrop-filter: blur(15px);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 99;
    padding-bottom: env(safe-area-inset-bottom);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-secondary);
    transition: color var(--transition-speed);
    flex: 1;
}

.nav-item.active {
    color: var(--accent-orange);
}

.nav-item .material-icons-round {
    font-size: 24px;
    margin-bottom: 4px;
}

.nav-label {
    font-size: 11px;
    font-weight: 500;
}

/* Special Raised Center Button for Betting */
.betting-btn-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f7b733 0%, #fc4a1a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    margin-top: -16px;
    box-shadow: 0 4px 15px rgba(252, 74, 26, 0.4);
    transition: transform 0.2s;
}

.nav-item:active .betting-btn-wrapper {
    transform: scale(0.9);
}

.nav-item.active .betting-btn-wrapper {
    box-shadow: 0 0 20px rgba(247, 183, 51, 0.6);
}

/* ========================================================
   PAGE SPECIFIC: LOGIN & REGISTER
   ======================================================== */
.auth-page {
    padding: 40px 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.auth-header {
    text-align: center;
    margin-bottom: 40px;
    margin-top: 20px;
}

.logo-container {
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
}

.logo-text {
    font-size: 38px;
    font-weight: 800;
    background: linear-gradient(135deg, #ff007f 0%, #7f00ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0px 4px 20px rgba(127, 0, 255, 0.4);
}

.auth-title {
    font-size: 28px;
    font-weight: 700;
    margin-top: 16px;
    text-align: left;
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 24px;
    backdrop-filter: blur(10px);
    margin-bottom: 24px;
}

.auth-links {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    margin-top: 16px;
}

.auth-link {
    color: var(--accent-orange);
    text-decoration: none;
    font-weight: 500;
}

.auth-link:hover {
    text-decoration: underline;
}

.alert-error {
    background: rgba(231, 76, 60, 0.15);
    border: 1px solid rgba(231, 76, 60, 0.3);
    color: #e74c3c;
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-success {
    background: rgba(46, 204, 113, 0.15);
    border: 1px solid rgba(46, 204, 113, 0.3);
    color: #2ecc71;
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 14px;
}

/* ========================================================
   PAGE SPECIFIC: PROFILE (我的)
   ======================================================== */
.profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 20px 20px;
    position: relative;
}

.avatar-wrapper {
    position: relative;
    margin-bottom: 12px;
}

.avatar-img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    object-fit: cover;
}

.username {
    font-size: 22px;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

/* Cards Row */
.profile-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    width: 100%;
    padding: 0 16px;
    margin-bottom: 24px;
}

.p-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 85px;
    text-align: center;
    backdrop-filter: blur(10px);
}

.p-card-icon {
    font-size: 28px;
    margin-bottom: 4px;
}

.p-card-val {
    font-size: 13px;
    font-weight: 600;
    margin-top: 2px;
}

.p-card-lbl {
    font-size: 10px;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* Specific Card Visual Themes */
.card-vip {
    border-color: rgba(243, 156, 18, 0.25);
    background: linear-gradient(135deg, rgba(243, 156, 18, 0.1) 0%, rgba(25, 27, 41, 0.6) 100%);
}
.card-vip .p-card-icon { color: var(--accent-yellow); }
.card-vip .p-card-val { color: var(--accent-yellow); }

.card-credit {
    border-color: rgba(230, 126, 34, 0.25);
    background: linear-gradient(135deg, rgba(230, 126, 34, 0.1) 0%, rgba(25, 27, 41, 0.6) 100%);
}
.card-credit .p-card-icon { color: var(--accent-orange); }
.card-credit .p-card-val { color: #f39c12; }

.card-balance {
    border-color: rgba(0, 210, 211, 0.25);
    background: linear-gradient(135deg, rgba(0, 210, 211, 0.1) 0%, rgba(25, 27, 41, 0.6) 100%);
}
.card-balance .p-card-icon { color: var(--accent-cyan); }
.card-balance .p-card-val { color: var(--accent-cyan); }

/* Option Menu List */
.menu-list {
    padding: 0 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 30px;
}

.menu-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-primary);
    transition: background var(--transition-speed);
}

.menu-item:active {
    background: rgba(255, 255, 255, 0.08);
}

.menu-icon-wrapper {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 14px;
}

/* Colors for icon wrapper */
.icon-blue { background: rgba(9, 132, 227, 0.15); color: var(--accent-blue); }
.icon-orange { background: rgba(252, 168, 64, 0.15); color: var(--accent-orange); }
.icon-pink { background: rgba(255, 159, 243, 0.15); color: var(--accent-pink); }
.icon-cyan { background: rgba(0, 210, 211, 0.15); color: var(--accent-cyan); }
.icon-yellow { background: rgba(241, 196, 15, 0.15); color: var(--accent-yellow); }

.menu-title {
    font-size: 15px;
    font-weight: 500;
    flex-grow: 1;
}

.menu-arrow {
    color: var(--text-muted);
    font-size: 20px;
}

.btn-logout {
    margin: 10px 16px 30px;
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.2);
    color: #e74c3c;
    padding: 14px;
    border-radius: 14px;
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: background 0.2s;
    display: block;
}

.btn-logout:active {
    background: rgba(231, 76, 60, 0.2);
}

/* ========================================================
   PAGE SPECIFIC: SUBPAGES
   ======================================================== */
.subpage-container {
    padding: 20px 16px;
}

/* Record cards */
.record-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 12px;
}

.record-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 8px;
}

.record-title {
    font-size: 15px;
    font-weight: 600;
}

.record-status {
    font-size: 13px;
    font-weight: 500;
}

.status-success { color: #2ecc71; }
.status-pending { color: var(--accent-yellow); }
.status-danger { color: #e74c3c; }

.record-details {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 6px;
}

.record-val {
    color: var(--text-primary);
    font-weight: 500;
}

/* ========================================================
   PAGE SPECIFIC: LIVE & WELFARE & HOSTESS
   ======================================================== */
.live-stream-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 16px;
    position: relative;
}

.live-thumbnail {
    width: 100%;
    height: 180px;
    background: linear-gradient(45deg, #1e1f29, #2b2d42);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.live-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #e74c3c;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.live-viewers {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 6px;
}

.live-info {
    padding: 14px;
}

.live-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.live-host {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Hostess (Support) cards */
.hostess-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    gap: 16px;
    margin-bottom: 14px;
}

.hostess-avatar {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent-pink) 0%, #e84393 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
}

.hostess-details {
    flex-grow: 1;
}

.hostess-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.hostess-name {
    font-size: 16px;
    font-weight: 600;
}

.hostess-status-badge {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 6px;
    background: rgba(46, 204, 113, 0.15);
    color: #2ecc71;
}

.hostess-status-badge.busy {
    background: rgba(231, 76, 60, 0.15);
    color: #e74c3c;
}

.hostess-specs {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.hostess-tags {
    display: flex;
    gap: 6px;
}

.hostess-tag {
    font-size: 11px;
    padding: 2px 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    color: var(--text-secondary);
}
