
        * { margin: 0; padding: 0; box-sizing: border-box; }
        :root {
            --bg-grad-1: #E0EAFC;
            --bg-grad-2: #CFDEF3;
            --surface: #FFFFFF;
            --card-radius: 30px;
            --pill-radius: 50px;
            --shadow: 0 8px 32px rgba(0,0,0,0.06);
            --shadow-hover: 0 12px 40px rgba(0,0,0,0.10);
            --text: #1a1a1a;
            --text2: #555;
            --text3: #999;
            --accent: #FF6B8A;
            --accent-dark: #e84e6f;
            --live-red: #FF1744;
            --gold: #FFB800;
            --border: rgba(0,0,0,0.06);
            --font: 'Poppins', sans-serif;
        }
        html, body {
            height: 100%;
            font-family: var(--font);
            background: linear-gradient(135deg, var(--bg-grad-1) 0%, var(--bg-grad-2) 100%);
            color: var(--text);
            overflow: hidden;
        }

        .app {
            display: flex;
            height: 100vh;
            padding: 24px;
            gap: 24px;
        }

        /* ===== LEFT SIDEBAR ===== */
        .sidebar {
            width: 240px;
            flex-shrink: 0;
            display: flex;
            flex-direction: column;
            gap: 16px;
        }
        .logo {
            font-size: 28px;
            font-weight: 900;
            letter-spacing: -1px;
            background: linear-gradient(135deg, #FF1744, #FF6B8A);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            padding: 8px 0;
        }
        .logo span { -webkit-text-fill-color: #FF1744; }
        .sidebar-nav {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }
        .nav-item {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 12px 16px;
            border-radius: var(--pill-radius);
            font-size: 15px;
            font-weight: 600;
            color: var(--text);
            cursor: pointer;
            transition: all 0.2s;
            text-decoration: none;
        }
        .nav-item:hover { background: rgba(0,0,0,0.04); }
        .nav-item.active {
            background: #1a1a1a;
            color: white;
        }
        .nav-item .icon { font-size: 20px; }
        .nav-item .badge {
            margin-left: auto;
            background: var(--live-red);
            color: white;
            font-size: 10px;
            font-weight: 700;
            padding: 2px 7px;
            border-radius: 20px;
            min-width: 20px;
            text-align: center;
        }
        .sidebar-profile {
            margin-top: auto;
            padding: 16px;
            background: var(--surface);
            border-radius: var(--card-radius);
            box-shadow: var(--shadow);
            display: flex;
            align-items: center;
            gap: 12px;
            cursor: pointer;
        }
        .sidebar-profile .avatar {
            width: 44px;
            height: 44px;
            border-radius: 50%;
            background: linear-gradient(135deg, #FF1744, #FF6B8A);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 16px;
            font-weight: 800;
            color: white;
        }
        .sidebar-profile .info .name { font-size: 14px; font-weight: 700; }
        .sidebar-profile .info .handle { font-size: 12px; color: var(--text3); }
        .sidebar-profile .arrow { margin-left: auto; color: var(--text3); }

        /* ===== MAIN FEED ===== */
        .main-feed {
            flex: 1;
            display: flex;
            flex-direction: column;
            gap: 24px;
            overflow: hidden;
        }
        .feed-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
        }
        .feed-title {
            font-size: 24px;
            font-weight: 800;
            letter-spacing: -0.5px;
        }
        .live-tab {
            display: flex;
            gap: 8px;
        }
        .live-tab .tab {
            padding: 8px 20px;
            border-radius: var(--pill-radius);
            font-size: 13px;
            font-weight: 600;
            background: var(--surface);
            color: var(--text2);
            box-shadow: var(--shadow);
            cursor: pointer;
            transition: all 0.2s;
        }
        .live-tab .tab.active {
            background: #1a1a1a;
            color: white;
        }

        .stories-scroll {
            display: flex;
            gap: 16px;
            overflow-x: auto;
            padding-bottom: 8px;
            scrollbar-width: none;
        }
        .stories-scroll::-webkit-scrollbar { display: none; }
        .story-card {
            flex-shrink: 0;
            width: 90px;
            cursor: pointer;
        }
        .story-avatar-wrap {
            position: relative;
            width: 72px;
            height: 72px;
            margin: 0 auto 8px;
        }
        .story-avatar-wrap::before {
            content: '';
            position: absolute;
            inset: -3px;
            border-radius: 50%;
            background: linear-gradient(135deg, #FF1744, #FFB800, #FF6B8A);
            z-index: -1;
        }
        .story-avatar {
            width: 72px;
            height: 72px;
            border-radius: 50%;
            border: 4px solid white;
            object-fit: cover;
            background: linear-gradient(135deg, #FFB8D1, #D4BFFF);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 24px;
        }
        .story-name {
            text-align: center;
            font-size: 11px;
            font-weight: 600;
            color: var(--text2);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            max-width: 80px;
            margin: 0 auto;
        }

        .live-grid {
            flex: 1;
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 16px;
            overflow-y: auto;
            padding-right: 8px;
            scrollbar-width: thin;
        }
        .live-card {
            border-radius: var(--card-radius);
            overflow: hidden;
            background: var(--surface);
            box-shadow: var(--shadow);
            cursor: pointer;
            transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
            position: relative;
        }
        .live-card:hover {
            transform: translateY(-4px) scale(1.01);
            box-shadow: var(--shadow-hover);
        }
        .live-card .cover {
            aspect-ratio: 3/4;
            position: relative;
            overflow: hidden;
        }
        .live-card .cover img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        .live-card .cover .gradient {
            position: absolute;
            inset: 0;
            background: linear-gradient(180deg, transparent 30%, rgba(0,0,0,0.7) 100%);
        }
        .live-tag {
            position: absolute;
            top: 10px;
            left: 10px;
            background: var(--live-red);
            color: white;
            font-size: 10px;
            font-weight: 700;
            padding: 4px 10px;
            border-radius: var(--pill-radius);
            letter-spacing: 0.5px;
            display: flex;
            align-items: center;
            gap: 4px;
        }
        .live-tag .dot {
            width: 6px;
            height: 6px;
            background: white;
            border-radius: 50%;
            animation: pulse 1.5s infinite;
        }
        @keyframes pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.4; }
        }
        .views-tag {
            position: absolute;
            top: 10px;
            right: 10px;
            background: rgba(0,0,0,0.5);
            backdrop-filter: blur(8px);
            color: white;
            font-size: 10px;
            font-weight: 600;
            padding: 4px 10px;
            border-radius: var(--pill-radius);
        }
        .live-card .card-info {
            padding: 14px 16px 16px;
        }
        .live-card .username {
            font-size: 14px;
            font-weight: 700;
            display: flex;
            align-items: center;
            gap: 6px;
        }
        .live-card .username .verify {
            width: 14px;
            height: 14px;
            background: #4A90E2;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 8px;
            color: white;
        }
        .live-card .title {
            font-size: 12px;
            color: var(--text2);
            margin-top: 4px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .live-card .bottom-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-top: 10px;
        }
        .live-card .category-tag {
            font-size: 10px;
            font-weight: 600;
            padding: 4px 10px;
            border-radius: var(--pill-radius);
            background: #D1E9FF;
            color: #0066CC;
        }
        .live-card .follow-btn {
            font-size: 11px;
            font-weight: 700;
            padding: 5px 14px;
            border-radius: var(--pill-radius);
            background: #FFB8D1;
            color: #c0206e;
            border: none;
            cursor: pointer;
            transition: all 0.2s;
        }
        .live-card .follow-btn:hover {
            background: #FF6B8A;
            color: white;
        }

        /* Share bar */
        .share-bar {
            flex-shrink: 0;
            background: var(--surface);
            border-radius: var(--card-radius);
            box-shadow: var(--shadow);
            padding: 14px 18px;
            display: flex;
            align-items: center;
            gap: 12px;
        }
        .share-bar .share-avatar {
            width: 38px;
            height: 38px;
            border-radius: 50%;
            background: linear-gradient(135deg, #FF1744, #FF6B8A);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 14px;
            font-weight: 800;
            color: white;
            flex-shrink: 0;
        }
        .share-bar input {
            flex: 1;
            border: none;
            outline: none;
            font-size: 14px;
            font-family: var(--font);
            background: #F7F9FC;
            padding: 10px 16px;
            border-radius: var(--pill-radius);
            color: var(--text);
        }
        .share-bar input::placeholder { color: var(--text3); }
        .share-bar .send-btn {
            background: #1a1a1a;
            color: white;
            border: none;
            padding: 10px 20px;
            border-radius: var(--pill-radius);
            font-size: 13px;
            font-weight: 700;
            cursor: pointer;
            font-family: var(--font);
            transition: all 0.2s;
        }
        .share-bar .send-btn:hover { background: #333; }
        .share-bar .icons { display: flex; gap: 8px; }
        .share-bar .icons span {
            font-size: 18px;
            cursor: pointer;
            opacity: 0.5;
            transition: opacity 0.2s;
        }
        .share-bar .icons span:hover { opacity: 1; }

        /* ===== RIGHT WIDGETS ===== */
        .widgets {
            width: 300px;
            flex-shrink: 0;
            display: flex;
            flex-direction: column;
            gap: 20px;
            overflow-y: auto;
        }
        .widget-card {
            background: var(--surface);
            border-radius: var(--card-radius);
            box-shadow: var(--shadow);
            padding: 20px;
        }
        .widget-title {
            font-size: 18px;
            font-weight: 800;
            margin-bottom: 16px;
            letter-spacing: -0.3px;
        }

        /* Suggestions */
        .suggestion-item {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-bottom: 14px;
        }
        .suggestion-item:last-child { margin-bottom: 0; }
        .suggestion-item .sug-avatar {
            width: 42px;
            height: 42px;
            border-radius: 50%;
            background: linear-gradient(135deg, #D4BFFF, #FFB8D1);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 16px;
            font-weight: 700;
            color: white;
            flex-shrink: 0;
        }
        .suggestion-item .sug-info { flex: 1; min-width: 0; }
        .suggestion-item .sug-name { font-size: 13px; font-weight: 700; }
        .suggestion-item .sug-meta { font-size: 11px; color: var(--text3); }
        .suggestion-item .follow-btn {
            font-size: 11px;
            font-weight: 700;
            padding: 5px 14px;
            border-radius: var(--pill-radius);
            background: #FFB8D1;
            color: #c0206e;
            border: none;
            cursor: pointer;
            transition: all 0.2s;
            white-space: nowrap;
        }
        .suggestion-item .follow-btn:hover { background: #FF6B8A; color: white; }

        /* Categories */
        .categories-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 10px;
        }
        .cat-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 6px;
            cursor: pointer;
        }
        .cat-icon {
            width: 52px;
            height: 52px;
            border-radius: 18px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 22px;
            transition: transform 0.2s;
        }
        .cat-item:hover .cat-icon { transform: scale(1.1); }
        .cat-name { font-size: 10px; font-weight: 600; color: var(--text2); text-align: center; }

        /* App promo */
        .app-promo {
            background: linear-gradient(135deg, #1a1a1a, #333);
            color: white;
            border-radius: var(--card-radius);
            padding: 24px;
            box-shadow: var(--shadow);
        }
        .app-promo .app-title {
            font-size: 16px;
            font-weight: 800;
            margin-bottom: 6px;
        }
        .app-promo .app-sub {
            font-size: 12px;
            color: rgba(255,255,255,0.6);
            margin-bottom: 14px;
        }
        .app-promo .store-btns {
            display: flex;
            gap: 8px;
        }
        .app-promo .store-btn {
            flex: 1;
            background: white;
            color: #1a1a1a;
            border: none;
            padding: 8px;
            border-radius: 14px;
            font-size: 10px;
            font-weight: 700;
            cursor: pointer;
            font-family: var(--font);
            text-align: center;
        }
        .app-promo .store-btn .big { font-size: 14px; display: block; }

        /* ===== LIVE VIEWER OVERLAY ===== */
        .live-viewer {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0,0,0,0.85);
            backdrop-filter: blur(20px);
            z-index: 1000;
            flex-direction: column;
        }
        .live-viewer.active { display: flex; }
        .lv-header {
            display: flex;
            align-items: center;
            padding: 16px 24px;
            gap: 16px;
        }
        .lv-back {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: rgba(255,255,255,0.1);
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            font-size: 20px;
            color: white;
            transition: background 0.2s;
        }
        .lv-back:hover { background: rgba(255,255,255,0.2); }
        .lv-user {
            display: flex;
            align-items: center;
            gap: 12px;
        }
        .lv-avatar {
            width: 44px;
            height: 44px;
            border-radius: 50%;
            border: 2px solid white;
            object-fit: cover;
            background: linear-gradient(135deg, #FF1744, #FF6B8A);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 16px;
            font-weight: 800;
            color: white;
        }
        .lv-name { font-size: 16px; font-weight: 700; color: white; }
        .lv-follow {
            margin-left: auto;
            background: #FF6B8A;
            color: white;
            border: none;
            padding: 8px 20px;
            border-radius: var(--pill-radius);
            font-size: 13px;
            font-weight: 700;
            cursor: pointer;
            font-family: var(--font);
        }
        .lv-stats {
            display: flex;
            gap: 12px;
            margin-left: auto;
            margin-right: 24px;
        }
        .lv-stat {
            display: flex;
            align-items: center;
            gap: 4px;
            color: rgba(255,255,255,0.7);
            font-size: 13px;
            font-weight: 600;
        }
        .lv-live-cover {
            flex: 1;
            position: relative;
            overflow: hidden;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .lv-live-cover img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        .lv-live-cover .lv-avatar-big {
            width: 100px;
            height: 100px;
            border-radius: 50%;
            background: linear-gradient(135deg, #FF1744, #FF6B8A);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 36px;
            font-weight: 900;
            color: white;
            border: 4px solid rgba(255,255,255,0.3);
        }
        .lv-bottom {
            background: rgba(0,0,0,0.8);
            backdrop-filter: blur(20px);
            padding: 16px 24px;
        }
        .lv-chat {
            max-height: 150px;
            overflow-y: auto;
            margin-bottom: 12px;
            display: flex;
            flex-direction: column;
            gap: 6px;
        }
        .lv-chat .msg {
            font-size: 13px;
            line-height: 1.4;
        }
        .lv-chat .msg .name { font-weight: 700; color: #FFB800; margin-right: 6px; }
        .lv-chat .msg .text { color: rgba(255,255,255,0.9); }
        .lv-input-row {
            display: flex;
            gap: 10px;
            align-items: center;
        }
        .lv-input-row input {
            flex: 1;
            background: rgba(255,255,255,0.1);
            border: none;
            outline: none;
            padding: 12px 16px;
            border-radius: var(--pill-radius);
            color: white;
            font-size: 14px;
            font-family: var(--font);
        }
        .lv-input-row input::placeholder { color: rgba(255,255,255,0.4); }
        .lv-send {
            background: #FF1744;
            color: white;
            border: none;
            width: 44px;
            height: 44px;
            border-radius: 50%;
            font-size: 18px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        /* Gift bar */
        .lv-gifts {
            display: flex;
            gap: 8px;
            padding: 12px 0;
            overflow-x: auto;
            scrollbar-width: none;
        }
        .lv-gifts::-webkit-scrollbar { display: none; }
        .gift-item {
            flex-shrink: 0;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 4px;
            padding: 8px 12px;
            border-radius: 16px;
            background: rgba(255,255,255,0.06);
            cursor: pointer;
            transition: all 0.2s;
            border: 1px solid rgba(255,255,255,0.1);
        }
        .gift-item:hover {
            background: rgba(255,107,138,0.2);
            border-color: #FF6B8A;
            transform: scale(1.05);
        }
        .gift-item .g-icon { font-size: 24px; }
        .gift-item .g-price { font-size: 10px; font-weight: 700; color: #FFB800; }

        /* ===== BATTLE BANNER ===== */
        .battle-banner {
            background: linear-gradient(135deg, #1a1a1a, #2d1a3d);
            border-radius: var(--card-radius);
            padding: 16px 20px;
            box-shadow: var(--shadow);
        }
        .battle-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 12px;
        }
        .battle-title {
            font-size: 14px;
            font-weight: 800;
            color: #FFB800;
            letter-spacing: 0.5px;
        }
        .battle-live {
            background: var(--live-red);
            color: white;
            font-size: 10px;
            font-weight: 700;
            padding: 3px 10px;
            border-radius: var(--pill-radius);
        }
        .battle-streamers {
            display: flex;
            align-items: center;
            gap: 16px;
        }
        .battle-s {
            flex: 1;
            text-align: center;
        }
        .battle-s .bs-avatar {
            width: 56px;
            height: 56px;
            border-radius: 50%;
            margin: 0 auto 8px;
            object-fit: cover;
            border: 3px solid rgba(255,255,255,0.2);
        }
        .battle-s .bs-name {
            font-size: 13px;
            font-weight: 700;
            color: white;
        }
        .battle-s .bs-score {
            font-size: 22px;
            font-weight: 900;
            color: #FFB800;
        }
        .battle-s .bs-label {
            font-size: 10px;
            color: rgba(255,255,255,0.5);
        }
        .battle-vs {
            font-size: 16px;
            font-weight: 900;
            color: rgba(255,255,255,0.3);
        }
        .battle-vote-row {
            display: flex;
            gap: 8px;
            margin-top: 12px;
        }
        .battle-vote-btn {
            flex: 1;
            padding: 8px;
            border-radius: var(--pill-radius);
            background: rgba(255,255,255,0.1);
            border: 1px solid rgba(255,255,255,0.2);
            color: white;
            font-size: 12px;
            font-weight: 700;
            cursor: pointer;
            font-family: var(--font);
            transition: all 0.2s;
        }
        .battle-vote-btn:hover { background: rgba(255,107,138,0.3); }

        /* ===== AUTH MODAL ===== */
        .auth-modal {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0,0,0,0.6);
            backdrop-filter: blur(12px);
            z-index: 2000;
            align-items: center;
            justify-content: center;
        }
        .auth-modal.active { display: flex; }
        .auth-box {
            background: white;
            border-radius: 36px;
            padding: 40px;
            width: 380px;
            max-width: 90vw;
            box-shadow: 0 24px 80px rgba(0,0,0,0.15);
        }
        .auth-title {
            font-size: 26px;
            font-weight: 900;
            text-align: center;
            margin-bottom: 8px;
            background: linear-gradient(135deg, #FF1744, #FF6B8A);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }
        .auth-sub {
            text-align: center;
            font-size: 13px;
            color: var(--text3);
            margin-bottom: 28px;
        }
        .auth-tabs {
            display: flex;
            background: #F3F4F6;
            border-radius: var(--pill-radius);
            padding: 4px;
            margin-bottom: 24px;
        }
        .auth-tab {
            flex: 1;
            padding: 10px;
            text-align: center;
            font-size: 13px;
            font-weight: 700;
            border-radius: var(--pill-radius);
            cursor: pointer;
            transition: all 0.2s;
            color: var(--text2);
        }
        .auth-tab.active {
            background: white;
            color: #1a1a1a;
            box-shadow: 0 2px 8px rgba(0,0,0,0.08);
        }
        .auth-input {
            width: 100%;
            padding: 14px 18px;
            border: 2px solid #F0F0F0;
            border-radius: 16px;
            font-size: 14px;
            font-family: var(--font);
            outline: none;
            margin-bottom: 12px;
            transition: border-color 0.2s;
            background: #FAFAFA;
        }
        .auth-input:focus { border-color: #FF6B8A; background: white; }
        .auth-btn {
            width: 100%;
            padding: 14px;
            background: linear-gradient(135deg, #FF1744, #FF6B8A);
            color: white;
            border: none;
            border-radius: var(--pill-radius);
            font-size: 15px;
            font-weight: 800;
            cursor: pointer;
            font-family: var(--font);
            margin-top: 8px;
            transition: transform 0.2s;
        }
        .auth-btn:hover { transform: scale(1.02); }
        .auth-close {
            position: absolute;
            top: 16px;
            right: 20px;
            font-size: 24px;
            cursor: pointer;
            color: var(--text3);
        }

        /* ===== TOAST ===== */
        .toast {
            position: fixed;
            bottom: 30px;
            left: 50%;
            transform: translateX(-50%) translateY(100px);
            background: #1a1a1a;
            color: white;
            padding: 12px 24px;
            border-radius: var(--pill-radius);
            font-size: 13px;
            font-weight: 600;
            z-index: 9999;
            opacity: 0;
            transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
            pointer-events: none;
        }
        .toast.show {
            transform: translateX(-50%) translateY(0);
            opacity: 1;
        }

        /* Scrollbar */
        ::-webkit-scrollbar { width: 4px; }
        ::-webkit-scrollbar-track { background: transparent; }
        ::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 4px; }
    