:root {
  --main-black: linear-gradient(90deg, #3b82f6 0%, #06b6d4 100%);
  --main-red: #c00;
  --main-white: #fff;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--main-white);
    color: #222;
    line-height: 1.6;
    overflow-x: hidden;
}

.app {
    max-width: 480px;
    margin: 0 auto;
    background: var(--main-white);
    min-height: 100vh;
    position: relative;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

/* Page Management */
.page {
    display: none;
    padding-bottom: 80px; /* Space for bottom navigation */
}

.page.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Header Styles */
.header {
    background: var(--main-black);
    padding: 1rem;
    border-bottom: 1px solid var(--main-red);
    position: sticky;
    top: 0;
    z-index: 10;
}

.header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--main-white);
    margin-bottom: 1rem;
}

/* Search Styles */
.search-container {
    position: relative;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem;
    padding-right: 2.5rem;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    background: white;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-icon {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 1rem;
}

/* Featured Section */
.featured-section {
    padding: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin: 1rem;
    border-radius: 1rem;
}

.featured-section h2 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.featured-video {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.featured-thumbnail {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.featured-info h3 {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.featured-info p {
    font-size: 0.75rem;
    opacity: 0.9;
}

/* Categories Section */
.categories-section {
    padding: 1rem;
}

.categories-section h2 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #1e293b;
}

.category-tabs {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.category-tab {
    padding: 0.5rem 1rem;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.category-tab:hover {
    background: #e2e8f0;
}

.category-tab.active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

/* Videos Section */
.videos-section {
    padding: 1rem;
}

.videos-section h2 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #1e293b;
}

.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.video-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    margin-top: 1rem;
}

.video-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.video-thumbnail {
    width: 100%;
    height: 100px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.video-info {
    padding: 0.75rem;
}

.video-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

.video-creator {
    font-size: 0.75rem;
    color: #64748b;
    margin-bottom: 0.5rem;
}

.video-price {
    font-size: 0.875rem;
    font-weight: 600;
    color: #059669;
}

/* Creators Section */
.creators-section {
    padding: 1rem;
}

.creators-section h2 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #1e293b;
}

.creators-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.creator-card {
    text-align: center;
    padding: 1rem;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    transition: all 0.2s ease;
}

.creator-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.creator-avatar {
    width: 50px;
    height: 50px;
    background: #f1f5f9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 0.5rem;
}

.creator-card h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.creator-card p {
    font-size: 0.75rem;
    color: #64748b;
}

/* Video Player Page */
.video-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-bottom: 1px solid #e2e8f0;
}

.back-button {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #64748b;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: background-color 0.2s ease;
}

.back-button:hover {
    background: #f1f5f9;
}

.video-player-container {
    padding: 1rem;
}

.video-player-main {
    width: 100%;
    height: 200px;
    background: #1e293b;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    position: relative;
}

.play-button {
    font-size: 3rem;
    color: white;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.play-button:hover {
    transform: scale(1.1);
}

.video-info {
    margin-bottom: 1rem;
}

.video-info h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.video-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 0.75rem;
}

.video-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #059669;
    margin-bottom: 1rem;
}

.video-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.primary-button {
    padding: 0.75rem 1rem;
    background: var(--main-red);
    color: var(--main-white);
    border: none;
    border-radius: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.primary-button:hover {
    background: #a00;
}

.primary-button:disabled {
    background: #94a3b8;
    cursor: not-allowed;
}

.secondary-button {
    padding: 0.75rem 1rem;
    background: var(--main-black);
    color: var(--main-white);
    border: 1px solid var(--main-red);
    border-radius: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.secondary-button:hover {
    background: var(--main-red);
    color: var(--main-white);
}

/* Related Videos */
.related-videos {
    padding: 1rem;
    border-top: 1px solid #e2e8f0;
}

.related-videos h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #1e293b;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem;
}

/* Dashboard Styles */
.dashboard-content {
    padding: 1rem;
}

.upload-section {
    margin-bottom: 1.5rem;
}

.upload-button {
    width: 100%;
    padding: 1.5rem;
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    border-radius: 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.upload-button:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}

.upload-icon {
    font-size: 2rem;
    color: #64748b;
}

.pricing-section {
    margin-bottom: 1.5rem;
}

.pricing-section h2 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #1e293b;
}

.pricing-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1rem;
}

.pricing-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.pricing-option:last-child {
    margin-bottom: 0;
}

.earnings-section {
    margin-bottom: 1.5rem;
}

.earnings-section h2 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #1e293b;
}

.earnings-card {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 0.75rem;
    text-align: center;
    margin-bottom: 0.75rem;
}

.earnings-amount {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.my-videos-section h2 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #1e293b;
}

/* Stats Page */
.stats-content {
    padding: 1rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1rem;
    text-align: center;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #3b82f6;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    color: #64748b;
}

.performance-section h2 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #1e293b;
}

.performance-list {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    overflow: hidden;
}

.performance-item {
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.performance-item:last-child {
    border-bottom: none;
}

.performance-info h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.performance-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: #64748b;
}

/* Wallet Page */
.wallet-content {
    padding: 1rem;
}

.balance-section {
    text-align: center;
    margin-bottom: 1.5rem;
}

.balance-amount {
    font-size: 3rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.wallet-actions {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.wallet-actions .primary-button,
.wallet-actions .secondary-button {
    flex: 1;
}

.payment-methods {
    margin-bottom: 1.5rem;
}

.payment-methods h2 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #1e293b;
}

.payment-options {
    display: flex;
    gap: 0.75rem;
}

.payment-option {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.payment-option:hover {
    background: #f8fafc;
}

.payment-icon {
    font-size: 1.25rem;
}

.transactions-section h2 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #1e293b;
}

.transactions-list {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    overflow: hidden;
}

.transaction-item {
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.transaction-item:last-child {
    border-bottom: none;
}

.transaction-info h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.transaction-date {
    font-size: 0.75rem;
    color: #64748b;
}

.transaction-amount {
    font-weight: 600;
    color: #059669;
}

.transaction-amount.negative {
    color: #dc2626;
}

/* Profile Page */
.profile-content {
    padding: 1rem;
}

.profile-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    background: #f1f5f9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1rem;
}

.profile-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.profile-header p {
    color: #64748b;
}

.profile-stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
}

.profile-stat {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: #3b82f6;
}

.stat-label {
    font-size: 0.75rem;
    color: #64748b;
}

.profile-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    background: var(--main-black);
    border-top: 1px solid var(--main-red);
    display: flex;
    justify-content: space-around;
    padding: 0.5rem 0;
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #64748b;
    transition: all 0.2s ease;
    border-radius: 0.5rem;
}

.nav-item:hover {
    background: #f1f5f9;
}

.nav-item.active {
    color: var(--main-red);
}

.nav-icon {
    font-size: 1.25rem;
}

.nav-label {
    font-size: 0.75rem;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 480px) {
    .app {
        max-width: 100%;
        box-shadow: none;
    }
    
    .videos-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
    
    .creators-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .wallet-actions {
        flex-direction: column;
    }
    
    .payment-options {
        flex-direction: column;
    }
}

/* Smooth Transitions */
* {
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Success/Error States */
.success {
    color: #059669;
}

.error {
    color: #dc2626;
} 

.mode-switcher {
    width: 100%;
    padding: 1rem 0;
    background: linear-gradient(90deg, #3b82f6 0%, #06b6d4 100%);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 0 0 1rem 1rem;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.08);
    cursor: pointer;
    margin-bottom: 1rem;
    letter-spacing: 0.02em;
    transition: background 0.2s, color 0.2s;
}
.mode-switcher:hover {
    background: linear-gradient(90deg, #2563eb 0%, #0ea5e9 100%);
    color: #f1f5f9;
} 

/* Locked Video Overlay */
.locked-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(17, 17, 17, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    z-index: 2;
    text-align: center;
    backdrop-filter: blur(3px);
}
.locked-overlay .unlock-btn {
    margin-top: 0.5rem;
    padding: 0.5rem 1.25rem;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 1rem;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.95rem;
    box-shadow: 0 2px 8px rgba(59,130,246,0.08);
    transition: background 0.2s;
}
.locked-overlay .unlock-btn:hover {
    background: #2563eb;
}

.purchased-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: #059669;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    z-index: 3;
    box-shadow: 0 2px 8px rgba(16,185,129,0.08);
}

/* Tip/Donate Button */
.tip-btn {
    margin-top: 0.75rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(90deg, #f59e42 0%, #f97316 100%);
    color: white;
    border: none;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(249,115,22,0.08);
    transition: background 0.2s;
}
.tip-btn:hover {
    background: linear-gradient(90deg, #ea580c 0%, #f59e42 100%);
}

/* Blurred Preview */
.blurred {
    filter: blur(4px) grayscale(0.2);
    pointer-events: none;
}

/* Viewer Profile Purchase/Tip History */
.viewer-history {
    margin-top: 1.5rem;
}
.viewer-history h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1e293b;
}
.viewer-history-list {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    overflow: hidden;
}
.viewer-history-item {
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
}
.viewer-history-item:last-child {
    border-bottom: none;
}
.viewer-history-type {
    font-weight: 600;
    color: #3b82f6;
    margin-right: 0.5rem;
}
.viewer-history-amount {
    font-weight: 600;
    color: #059669;
}
.viewer-history-amount.negative {
    color: #dc2626;
} 

.go-live-section {
    margin-bottom: 1.5rem;
    text-align: center;
}
.go-live-button {
    width: 100%;
    padding: 1.25rem 0;
    background: linear-gradient(90deg, var(--main-red) 0%, var(--main-black) 100%);
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 2px 8px rgba(239,68,68,0.08);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    transition: background 0.2s;
}
.go-live-button:hover {
    background: linear-gradient(90deg, #a00 0%, #222 100%);
}
.go-live-icon {
    font-size: 1.5rem;
    animation: pulse 1.2s infinite alternate;
}
@keyframes pulse {
    from { opacity: 1; }
    to { opacity: 0.6; }
}

/* Live Modal */
.live-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.35);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.live-modal-content {
    background: var(--main-white);
    border-radius: 1rem;
    padding: 2rem 1.5rem 1.5rem 1.5rem;
    min-width: 320px;
    max-width: 95vw;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    position: relative;
    text-align: center;
}
.live-modal-content h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}
.live-modal-content .close {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    font-size: 1.5rem;
    color: #64748b;
    cursor: pointer;
    font-weight: 700;
}
#live-streams-list {
    margin-top: 1rem;
}
.live-stream-item {
    background: #f1f5f9;
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: space-between;
}
.live-stream-title {
    font-weight: 600;
    color: #ef4444;
}
.live-stream-creator {
    color: #64748b;
    font-size: 0.95rem;
}

/* Dual-currency wallet */
#wallet-balance-usd {
    font-size: 1.5rem;
    font-weight: 600;
    color: #0ea5e9;
    margin-bottom: 0.25rem;
}
.wallet-actions .primary-button {
    margin-bottom: 0.5rem;
} 

#live-preview-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #f1f5f9;
    border-radius: 0.75rem;
    padding: 1rem;
    margin-top: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
#live-video {
    width: 100%;
    max-width: 320px;
    height: 200px;
    border-radius: 0.75rem;
    background: #000;
    object-fit: cover;
    margin-bottom: 0.75rem;
}

.premium-creator-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
    background: #f5f5f5;
    color: #222;
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
}
.premium-creator-avatar {
    width: 32px;
    height: 32px;
    background: #e0e7ef;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}
.premium-creator-info {
    display: flex;
    flex-direction: column;
}
.premium-creator-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: #1e293b;
}
.premium-creator-subs {
    font-size: 0.8rem;
    color: #64748b;
} 

.live-chat {
    width: 100%;
    background: #f8fafc;
    border-radius: 0.75rem;
    margin-top: 0.75rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    padding: 0.5rem 0.75rem 0.75rem 0.75rem;
    max-width: 340px;
}
.live-chat-messages {
    max-height: 120px;
    overflow-y: auto;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}
.live-chat-message {
    margin-bottom: 0.35rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;
    background: #e0e7ef;
    color: #1e293b;
    word-break: break-word;
}
.live-chat-message.creator {
    background: #f59e42;
    color: white;
    font-weight: 600;
}
.live-chat-form {
    display: flex;
    gap: 0.5rem;
}
.live-chat-form input {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
    font-size: 0.95rem;
}
.live-chat-form button {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    border: none;
    background: #3b82f6;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.live-chat-form button:hover {
    background: #2563eb;
}

/* End-of-stream summary modal */
#live-summary-modal .live-modal-content {
    min-width: 260px;
    max-width: 95vw;
    text-align: center;
}
#live-summary-content {
    margin: 1rem 0 1.5rem 0;
    font-size: 1.05rem;
    color: #1e293b;
} 

.emoji-reactions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.5rem 0 0.5rem 0;
}
.emoji-reactions button {
    background: #f1f5f9;
    border: none;
    border-radius: 50%;
    font-size: 1.3rem;
    cursor: pointer;
    width: 2.2rem;
    height: 2.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.1s;
}
.emoji-reactions button:hover {
    background: #e0e7ef;
    transform: scale(1.15);
}
#live-emoji-counts, #viewer-emoji-counts {
    margin-left: 0.75rem;
    font-size: 1.1rem;
    color: #ef4444;
    font-weight: 600;
}
.floating-emoji {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
    pointer-events: none;
    animation: floatUp 1.2s ease-out forwards;
    z-index: 10;
}
@keyframes floatUp {
    0% { opacity: 1; bottom: 40px; }
    100% { opacity: 0; bottom: 180px; }
}

/* Scheduled Stream Modal */
#schedule-modal .live-modal-content {
    min-width: 260px;
    max-width: 95vw;
    text-align: center;
}
#scheduled-streams-list {
    margin-top: 1rem;
}
.scheduled-stream-item {
    background: #f1f5f9;
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: space-between;
}
.scheduled-stream-title {
    font-weight: 600;
    color: #3b82f6;
}
.scheduled-stream-date {
    color: #64748b;
    font-size: 0.95rem;
} 

.see-trailer-btn {
    background: var(--main-red);
    color: var(--main-white) !important;
    font-weight: 700;
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 2px 8px rgba(249,115,22,0.12);
    font-size: 0.95rem;
    padding: 0.4em 1.1em;
    transition: background 0.2s, color 0.2s;
    z-index: 10;
    position: absolute;
    top: 8px;
    left: 8px;
    display: block;
}
.see-trailer-btn:hover {
    background: #a00;
    color: var(--main-white);
} 

.auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5em;
}
.branding {
    max-width: 480px;
    margin: 0;
    padding: 0 1em;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.auth-container {
    max-width: 480px;
    margin: 0;
    background: #fff;
    border-radius: 1.2em;
    box-shadow: 0 0 20px rgba(0,0,0,0.07);
    padding: 2em 1em 2em 1em;
    display: flex;
    flex-direction: column;
    align-items: center;
} 

/* --- DARK MODE --- */
body.dark-mode {
  --main-black: linear-gradient(90deg, #222 0%, #333 100%);
  --main-red: #ff5555;
  --main-white: #18181b;
  background-color: #18181b;
  color: #f1f5f9;
}
body.dark-mode .app {
  background: var(--main-white);
  box-shadow: 0 0 20px rgba(0,0,0,0.4);
}
body.dark-mode .header {
  background: var(--main-black);
  border-bottom: 1px solid var(--main-red);
}
body.dark-mode .header h1 {
  color: #f1f5f9;
}
body.dark-mode .search-input {
  background: #23272f;
  border: 1px solid #333;
  color: #e01e1e;
}
body.dark-mode .search-input:focus {
  background: #23272f;
  border-color: #3b82f6;
  color: #fff;
}
body.dark-mode .search-icon {
  color: #bcdffb;
}
body.dark-mode .featured-section {
  background: linear-gradient(135deg, #23272f 0%, #333 100%);
  color: #f1f5f9;
}
body.dark-mode .featured-thumbnail {
  background: rgba(30,41,59,0.3);
}
body.dark-mode .category-tab {
  background: #23272f;
  border: 1px solid #333;
  color: #bcdffb;
}
body.dark-mode .category-tab.active {
  background: #3b82f6;
  color: #fff;
  border-color: #3b82f6;
}
body.dark-mode .videos-section h2,
body.dark-mode .categories-section h2,
body.dark-mode .creators-section h2,
body.dark-mode .earnings-section h2,
body.dark-mode .my-videos-section h2,
body.dark-mode .stats-content h2,
body.dark-mode .wallet-content h2,
body.dark-mode .profile-header h2,
body.dark-mode .viewer-history h3 {
  color: #f1f5f9;
}
body.dark-mode .videos-grid .video-card,
body.dark-mode .creators-grid .creator-card,
body.dark-mode .stat-card,
body.dark-mode .pricing-card,
body.dark-mode .earnings-card,
body.dark-mode .profile-stats,
body.dark-mode .viewer-history-list,
body.dark-mode .transactions-list,
body.dark-mode .performance-list,
body.dark-mode .live-modal-content {
  background: #23272f;
  border-color: #333;
  color: #f1f5f9;
}
body.dark-mode .video-title,
body.dark-mode .creator-card h3,
body.dark-mode .premium-creator-name {
  color: #f1f5f9;
}
body.dark-mode .video-creator,
body.dark-mode .creator-card p,
body.dark-mode .premium-creator-subs,
body.dark-mode .stat-label,
body.dark-mode .transaction-date,
body.dark-mode .profile-header p {
  color: #bcdffb;
}
body.dark-mode .primary-button {
  background: var(--main-red);
  color: #fff;
}
body.dark-mode .primary-button:hover {
  background: #a00;
}
body.dark-mode .secondary-button {
  background: var(--main-black);
  color: #fff;
  border: 1px solid var(--main-red);
}
body.dark-mode .secondary-button:hover {
  background: var(--main-red);
  color: #fff;
}
body.dark-mode .bottom-nav {
  background: var(--main-black);
  border-top: 1px solid var(--main-red);
}
body.dark-mode .nav-item {
  color: #bcdffb;
}
body.dark-mode .nav-item.active {
  color: var(--main-red);
}
body.dark-mode .nav-item:hover {
  background: #23272f;
}
body.dark-mode .live-modal {
  background: rgba(0,0,0,0.7);
}
body.dark-mode .live-modal-content {
  background: #23272f;
  color: #f1f5f9;
}
body.dark-mode .locked-overlay {
  background: rgba(24,24,27,0.92);
}
body.dark-mode .upload-button {
  background: #23272f;
  border-color: #333;
  color: #bcdffb;
}
body.dark-mode .upload-button:hover {
  background: #18181b;
  border-color: #3b82f6;
}
body.dark-mode .live-chat {
  background: #23272f;
  color: #f1f5f9;
}
body.dark-mode .live-chat-message {
  background: #18181b;
  color: #f1f5f9;
}
body.dark-mode .live-chat-message.creator {
  background: #3b82f6;
  color: #fff;
}
body.dark-mode .live-chat-form input {
  background: #18181b;
  border: 1px solid #333;
  color: #f1f5f9;
}
body.dark-mode .live-chat-form button {
  background: #3b82f6;
  color: #fff;
}
body.dark-mode .live-chat-form button:hover {
  background: #2563eb;
}
body.dark-mode .branding {
  background: none;
}
body.dark-mode .auth-container {
  background: #23272f;
  color: #f1f5f9;
}
body.dark-mode .profile-avatar,
body.dark-mode .creator-avatar,
body.dark-mode .premium-creator-avatar {
  background: #23272f;
}
body.dark-mode .tip-btn {
  background: linear-gradient(90deg, #f59e42 0%, #f97316 100%);
  color: #fff;
}
body.dark-mode .tip-btn:hover {
  background: linear-gradient(90deg, #ea580c 0%, #f59e42 100%);
}
body.dark-mode .see-trailer-btn {
  background: var(--main-red);
  color: #fff !important;
}
body.dark-mode .see-trailer-btn:hover {
  background: #a00;
} 

#toggle-btn {
  background: #f1f5f9;
  border: 1px solid #d1d5db;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin: 0.3rem 0 0.5rem 0; /* moved higher by reducing top margin */
  padding: 8px 12px;
  border-radius: 8px;
  outline: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: background 0.2s, border 0.2s;
}

#toggle-btn img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  filter: invert(0);
  transition: filter 0.2s;
}
body.dark-mode #toggle-btn {
  background: #23272f;
  border: 1px solid #444;
}
body.dark-mode #toggle-btn img {
  filter: invert(1) brightness(1.2);
}
#toggle-btn:hover {
  background: #e5e7eb;
}
body.dark-mode #toggle-btn:hover {
  background: #18181b;
} 