:root {
    --primary: #8b5cf6;
    --primary-dark: #7c3aed;
    --secondary: #ec4899;
    --dark: #0f172a;
    --light: #f8fafc;
    --gray: #64748b;
    --light-gray: #e2e8f0;
    --dark-gray: #334155;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --card-bg: #ffffff;
    --body-bg: #f1f5f9;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.dark-mode {
    --primary: #a78bfa;
    --primary-dark: #8b5cf6;
    --secondary: #f472b6;
    --dark: #f8fafc;
    --light: #0f172a;
    --gray: #94a3b8;
    --light-gray: #1e293b;
    --dark-gray: #cbd5e1;
    --card-bg: #1e293b;
    --body-bg: #0f172a;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
}

a:-webkit-any-link {
    cursor: pointer;
    text-decoration:none;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--body-bg);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
header {
    background-color: var(--card-bg);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background-color 0.3s;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    PADDING-RIGHT: 40px;
    padding-left: 40px;
}

.logo {
    font-size: 24px;
    font-weight: 400;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo-icon {
    margin-right: 5px;
    width: 24px;
    height: 24px;
}

.nav-links {
    display: flex;
    gap: 25px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a:focus-visible {
    color: var(--primary);
}

.user-section {
    display: flex;
    align-items: center;
    gap: 20px;
}

.wallet-balance {
    background-color: var(--primary);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.wallet-icon {
    font-size: 16px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
    cursor: pointer;
}

.theme-toggle {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-primary);
    transition: transform 0.3s;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
    transform: rotate(30deg);
}

/* === User Dropdown Menu === */
.user-dropdown {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dropdown-menu {
    position: absolute;
    top: 60px;
    right: 0;
    width: 240px;
    background-color: var(--card-bg);
    border-radius: 10px;
    box-shadow: var(--shadow);
    overflow: hidden;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.3s;
}

.dropdown-menu a:hover,
.dropdown-menu a:focus-visible {
    background-color: var(--light-gray);
}

.dropdown-menu hr.dropdown-divider {
    margin: 5px 0;
    border-color: var(--light-gray);
    border-style: solid;
    border-width: 1px 0 0 0;
}

/* Keep all your other styles below... */
/* Main Content Styles */
.main-content {
    padding: 30px 0;
}

/* Category Navigation */
.category-nav {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    overflow-x: auto;
    padding-bottom: 10px;
    scrollbar-width: none;
    justify-content: center;
}

.category-nav::-webkit-scrollbar {
    display: none;
}

.category-item {
    background-color: var(--light-gray);
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.category-item:hover,
.category-item.active {
    background-color: var(--primary);
    color: white;
}

/* Stream Grid */
.streams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.stream-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    position: relative;
}

.stream-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.dark-mode .stream-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
}

.stream-thumbnail-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background-color: var(--light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stream-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.stream-thumbnail-placeholder {
    width: 50%;
    height: 50%;
    opacity: 0.3;
}

/* Live Badge */
.live-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #E74C3C;
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 2;
}

.live-pulse {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    animation: pulse 1.2s infinite;
}




/* Viewer Count */
.viewer-count {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 2;
}

.stream-card-info {
    padding: 16px;
}

.stream-card-title {
    font-weight: 600;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-primary);
}

.stream-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.streamer-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.streamer-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.streamer-name {
    font-size: 14px;
    color: var(--text-secondary);
}

.stream-tip-btn {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    gap: 4px;
}

.stream-tip-btn:hover,
.stream-tip-btn:focus-visible {
    background-color: var(--primary-dark);
}

.eth-icon {
    font-size: 14px;
}

/* Featured Section */
.featured-section {
    margin-bottom: 40px;
    padding:10px;
}

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

.section-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.view-all {
    color: var(--primary);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.3s;
}

.view-all:hover,
.view-all:focus-visible {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Loading Animation */
.loading-more {
    display: flex;
    justify-content: center;
    padding: 20px 0;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--light-gray);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Stream Player */
.stream-player {
    width: 100%;
    aspect-ratio: 16/9;
    background-color: black;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.stream-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.stream-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    padding: 20px;
    color: white;
}

.stream-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 5px;
}

.streamer-info-large {
    display: flex;
    align-items: center;
    gap: 10px;
}

.streamer-avatar-large {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.streamer-name-large {
    font-weight: 500;
}

.stream-viewers {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: var(--light-gray);
}

.viewer-icon {
    font-size: 16px;
}

.stream-controls {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
}

.control-button {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s;
}

.control-button:hover,
.control-button:focus-visible {
    background-color: rgba(255, 255, 255, 0.3);
}

.go-live-btn {
    background-color: var(--secondary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.go-live-btn:hover,
.go-live-btn:focus-visible {
    background-color: #e11d48;
}

/* Sidebar Styles */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Tipping Section */
.tipping-section {
    background-color: var(--card-bg);
    border-radius: 10px;
    padding: 20px;
    box-shadow: var(--shadow);
}

.tip-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.tip-amounts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 10px;
}

.tip-amount {
    background-color: var(--light-gray);
    border: 1px solid var(--gray);
    border-radius: 5px;
    padding: 10px;
    text-align: center;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.tip-amount:hover,
.tip-amount:focus-visible {
    background-color: var(--gray);
    color: white;
}

.tip-amount.active {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

.custom-tip {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tip-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid var(--gray);
    border-radius: 5px;
    font-size: 16px;
    background-color: var(--card-bg);
    color: var(--text-primary);
}

.tip-input:focus {
    outline: none;
    border-color: var(--primary);
}

.send-tip-btn {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.send-tip-btn:hover,
.send-tip-btn:focus-visible {
    background-color: var(--primary-dark);
}

/* Chat Section */
.chat-section {
    background-color: var(--card-bg);
    border-radius: 10px;
    padding: 20px;
    box-shadow: var(--shadow);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    max-height: 300px;
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-message {
    display: flex;
    gap: 10px;
}

.chat-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
}

.message-content {
    flex: 1;
}

.message-user {
    font-weight: 600;
    font-size: 14px;
}

.message-text {
    font-size: 14px;
    color: var(--text-secondary);
}

.tip-notification {
    background-color: #f0fdf4;
    border-left: 3px solid var(--success);
    padding: 8px 12px;
    font-size: 14px;
    margin-bottom: 10px;
    border-radius: 0 5px 5px 0;
}

.dark-mode .tip-notification {
    background-color: rgba(16, 185, 129, 0.1);
}

.chat-input-container {
    display: flex;
    gap: 10px;
}

.chat-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid var(--gray);
    border-radius: 5px;
    font-size: 14px;
    background-color: var(--card-bg);
    color: var(--text-primary);
}

.chat-input:focus {
    outline: none;
    border-color: var(--primary);
}

.send-chat-btn {
    background-color: var(--primary);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s;
}

.send-chat-btn:hover,
.send-chat-btn:focus-visible {
    background-color: var(--primary-dark);
}

/* Auth Pages */
.auth-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}

.auth-form {
    padding: 60px;
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}

.auth-hero {
    background-color: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.hero-content {
    max-width: 500px;
}

.auth-btn {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    margin-top: 20px;
}

.auth-social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid var(--light-gray);
    background-color: var(--card-bg);
    color: var(--text-primary);
    cursor: pointer;
    margin-bottom: 10px;
}

.auth-social-btn .social-icon {
    font-weight: bold;
}

.auth-social-btn:hover,
.auth-social-btn:focus-visible {
    background-color: var(--light-gray);
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
    color: var(--gray);
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--light-gray);
}

.auth-divider span {
    padding: 0 10px;
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
}

/* Profile Page */
.profile-header {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
}

.profile-avatar {
    position: relative;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.edit-avatar-btn {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.profile-info {
    flex: 1;
}

.profile-name {
    font-size: 28px;
    margin-bottom: 10px;
}

.profile-bio {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.profile-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 20px;
    font-weight: 600;
    display: block;
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.profile-actions {
    display: flex;
    gap: 10px;
}

.follow-btn,
.tip-btn,
.edit-profile-btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
}

.follow-btn {
    background-color: var(--primary);
    color: white;
    border: none;
}

.follow-btn:hover,
.follow-btn:focus-visible {
    background-color: var(--primary-dark);
}

.tip-btn {
    background-color: var(--secondary);
    color: white;
    border: none;
}

.tip-btn:hover,
.tip-btn:focus-visible {
    background-color: #e11d48;
}

.edit-profile-btn {
    background-color: var(--light-gray);
    border: none;
    color: var(--text-primary);
}

.edit-profile-btn:hover,
.edit-profile-btn:focus-visible {
    background-color: var(--gray);
    color: white;
}

.profile-tabs {
    display: flex;
    border-bottom: 1px solid var(--light-gray);
    margin-bottom: 20px;
}

.profile-tab {
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-weight: 500;
    cursor: pointer;
    color: var(--text-secondary);
}

.profile-tab:hover,
.profile-tab:focus-visible {
    color: var(--primary);
}

.profile-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}

/* Wallet Page */
.wallet-balance-large {
    font-size: 32px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
}

.wallet-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.wallet-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background-color: var(--card-bg);
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: transform 0.3s;
}

.wallet-action-btn:hover,
.wallet-action-btn:focus-visible {
    transform: translateY(-3px);
}

.action-icon {
    font-size: 24px;
    margin-bottom: 5px;
}

.wallet-tabs {
    display: flex;
    border-bottom: 1px solid var(--light-gray);
    margin-bottom: 20px;
}

.wallet-tab {
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-weight: 500;
    cursor: pointer;
    color: var(--text-secondary);
}

.wallet-tab:hover,
.wallet-tab:focus-visible {
    color: var(--primary);
}

.wallet-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.transactions-list {
    margin-top: 20px;
}

.transaction-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    border-bottom: 1px solid var(--light-gray);
}

.transaction-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.transaction-details {
    flex: 1;
}

.transaction-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.transaction-type {
    font-weight: 500;
}

.transaction-date {
    color: var(--gray);
    font-size: 14px;
}

.transaction-amount {
    font-weight: 600;
}

.transaction-amount.positive {
    color: var(--success);
}

.transaction-amount.negative {
    color: var(--danger);
}

.transaction-description {
    color: var(--gray);
    font-size: 14px;
    margin-top: 5px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 10px;
    max-width: 500px;
    width: 100%;
}

.wallet-address {
    background-color: var(--light-gray);
    padding: 15px;
    border-radius: 6px;
    margin: 20px 0;
    word-break: break-all;
}

.copy-btn {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 10px;
}

.copy-btn:hover,
.copy-btn:focus-visible {
    background-color: var(--primary-dark);
}

.qr-code {
    background-color: white;
    width: 200px;
    height: 200px;
    margin: 0 auto 20px;
    padding: 10px;
}

.close-modal-btn {
    background-color: var(--light-gray);
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    width: 100%;
}

.close-modal-btn:hover,
.close-modal-btn:focus-visible {
    background-color: var(--gray);
    color: white;
}

/* Settings Page */
.settings-form {
    max-width: 600px;
    margin-top: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--light-gray);
    border-radius: 6px;
    background-color: var(--card-bg);
    color: var(--text-primary);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox-group input {
    width: auto;
}

.avatar-upload {
    display: flex;
    align-items: center;
    gap: 20px;
}

#avatarPreview {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.upload-btn {
    padding: 8px 16px;
    background-color: var(--light-gray);
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.upload-btn:hover,
.upload-btn:focus-visible {
    background-color: var(--gray);
    color: white;
}

.save-btn {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}

.save-btn:hover,
.save-btn:focus-visible {
    background-color: var(--primary-dark);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .auth-container {
        grid-template-columns: 1fr;
    }
    .auth-hero {
        display: none;
    }
    .profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .profile-stats {
        justify-content: center;
    }
    .profile-actions {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    .streams-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
    .main-content {
        grid-template-columns: 1fr;
    }
    .wallet-actions {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .auth-form {
        padding: 30px;
    }
    .tip-amounts {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Loading Overlay */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    flex-direction: column;
    color: white;
}

.loading-content {
    text-align: center;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #333;
    border-top: 4px solid #8b5cf6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-overlay p {
    font-size: 16px;
    margin: 0;
}

/* Error Overlay */
.error-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    font-size: 16px;
}


/* Footer Styles */
.site-footer {
    margin-top: 40px;
    border-top: 1px solid var(--border);
    background: var(--bg-secondary);
    padding: 12px 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.footer-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 500px;
    margin: 0 auto;
}

.footer-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-secondary);
    transition: color 0.2s ease, transform 0.2s ease;
    padding: 8px;
    border-radius: 12px;
}

.footer-icon:hover {
    color: var(--text-primary);
    transform: scale(1.1);
}

.footer-icon svg {
    width: 24px;
    height: 24px;
}

/* Active State (Optional) – Add to highlight current page */
/* You can add 'active' class via JS or PHP based on current page */
.footer-icon.active {
    color: var(--highlight);
}

/* Responsive: On larger screens, show slightly bigger */
@media (min-width: 768px) {
    .footer-container {
        justify-content: center;
        gap: 40px;
    }
    .footer-icon {
        padding: 12px;
    }
}

/* ======================== */
/* MOBILE RESPONSIVE LAYOUT */
/* ======================== */

/* Base mobile styles */
@media (max-width: 768px) {
    /* Global container adjustments */
    .container {
        width: 100%;
        max-width: 100%;
        padding: 0 16px;
    }
    
    .main-content {
        padding: 16px 0;
    }
    
    /* Header adjustments */
    .header-container {
        padding: 0 16px;
    }
    
    .nav-links {
        display: none;
    }
    
    .user-section {
        gap: 12px;
    }
    
    /* Category navigation - make it scrollable on mobile */
    .category-nav {
        overflow-x: auto;
        white-space: nowrap;
        padding: 10px 0;
        margin: 0 -16px 16px;
        background: var(--bg-secondary);
        margin-left: 10px;
        margin-right: 10px;
    }
    
    .category-item {
        display: inline-block;
        padding: 8px 16px;
        margin-right: 8px;
        border-radius: 20px;
        font-size: 14px;
        white-space: nowrap;
    }
    
    /* Section headers */
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .view-all {
        font-size: 14px;
        padding: 6px 12px;
        width: 100%;
    }
    
    /* Stream cards grid - single column on mobile */
    .streams-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    /* Stream card adjustments */
    .stream-card {
        width: 100%;
        border-radius: 12px;
        overflow: hidden;
    }
    
    .stream-thumbnail-container {
        position: relative;
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
        margin-bottom: 12px;
    }
    
    .stream-thumbnail,
    .stream-thumbnail-placeholder {
        width: 100%;
        height: 100%;
        object-fit: cover;
        
    }
    
    .stream-card-info {

    }
    
    .stream-card-title {
        font-size: 16px;
        line-height: 1.3;
        margin: 0 0 8px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .streamer-info {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-top: 6px;
    }
    
    .streamer-avatar {
        width: 28px;
        height: 28px;
    }
    
    .streamer-name {
        font-size: 14px;
    }
    
    /* Status badges */
    .live-badge, .offline-badge, .vod-badge {
        position: absolute;
        top: 8px;
        left: 8px;
        padding: 4px 8px;
        font-size: 12px;
        z-index: 2;
    }
    
    .viewer-count {
        position: absolute;
        bottom: 8px;
        left: 8px;
        background: rgba(0, 0, 0, 0.6);
        padding: 4px 8px;
        border-radius: 4px;
        font-size: 12px;
        z-index: 2;
    }
    
    /* Welcome modal adjustments */
    .modal-content {
        width: 95% !important;
        max-width: 95% !important;
        top: 20px !important;
        padding: 16px !important;
    }
    
    /* Stream page specific styles */
    .stream-layout {
        flex-direction: column;
    }
    
    .stream-main, .sidebar {
        width: 100%;
        min-width: 100% !important;
    }
    
    .stream-player {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }
    
    .stream-video {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    /* Tipping section */
    .tip-amounts {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    
    .tip-amount {
        padding: 8px 0;
        font-size: 14px;
    }
    
    /* Chat section */
    .chat-messages {
        max-height: 300px !important;
    }
    
    .chat-input-container {
        flex-direction: row;
    }
    
    .chat-input {
        font-size: 14px;
        padding: 10px;
    }
    
    .send-chat-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    /* Stream controls */
    .stream-controls {
        display: flex;
        width: 100%;
    }
    
    .go-live-btn {
        flex: 1;
        padding: 12px;
        font-size: 16px;
    }
    
    /* Wallet connection */
    .wallet-connect button {
        padding: 12px;
        font-size: 16px;
    }
    
    /* Custom tip input */
    .custom-tip {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    
    .tip-input {
        padding: 10px;
        font-size: 14px;
    }
    
    #sendOnChainTipBtn {
        padding: 10px;
        font-size: 16px;
    }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
    /* Stream card title */
    .stream-card-title {
        font-size: 15px;
    }
    
    /* Streamer info */
    .streamer-name {
        font-size: 13px;
    }
    
    /* Category items */
    .category-item {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    /* Section titles */
    .section-title {
        font-size: 18px;
    }
    
    /* Tipping amounts */
    .tip-amounts {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Chat messages */
    .chat-message {
        font-size: 13px;
    }
    
    .chat-bubble {
        padding: 8px;
    }
    
    .chat-avatar {
        width: 24px;
        height: 24px;
    }
}

/* Fix iOS Safari video playback */
@media (max-width: 768px) {
    video {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 16 / 9 !important;
        object-fit: cover !important;
    }
    
    .stream-player {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 16 / 9 !important;
    }
    
    .stream-video {
        width: 100% !important;
        height: 100% !important;
        aspect-ratio: 16 / 9 !important;
        object-fit: cover !important;
    }
}

/* ==================== */
/* AUTH PAGES: login.php & register.php */
/* ==================== */

/* Auth Container - Full height split layout */
.auth-container {
    display: flex;
    min-height: 100vh;
    background: var(--bg-primary);
    font-family: 'Inter', sans-serif;
}

/* Left Side: Form */
.auth-form {
    flex: 1;
    max-width: 500px;
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--bg-primary);
    border-right: 1px solid var(--border);
}

.auth-form h1 {
    font-size: 28px;
    color: var(--text-primary);
    margin: 0 0 12px;
    font-weight: 600;
}

.auth-form p {
    color: var(--text-secondary);
    font-size: 15px;
    margin: 0 0 24px;
    line-height: 1.5;
}

/* Form Styling */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 15px;
    transition: border 0.2s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #6C5CE7;
    box-shadow: 0 0 0 2px rgba(108, 92, 231, 0.2);
}

/* Forgot Password Link */
.forgot-password {
    display: block;
    text-align: right;
    font-size: 14px;
    color: var(--text-tertiary);
    margin-top: 6px;
    text-decoration: none;
}

.forgot-password:hover {
    color: var(--highlight);
}

/* Submit Button */
.auth-btn {
    width: 100%;
    padding: 14px;
    background: #6C5CE7;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
    text-align: center;
    position: relative;
    top: -10px;
}

.auth-btn:hover {
    background: #5d4dd4;
}

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
    color: var(--text-tertiary);
    font-size: 14px;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    border-top: 1px solid var(--border);
}

.auth-divider span {
    padding: 0 12px;
    background: var(--bg-primary);
}

/* Social Buttons */
.auth-social-btn {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    color: var(--text-primary);
    cursor: pointer;
    margin-bottom: 12px;
    transition: background 0.2s ease;
}

.auth-social-btn:hover {
    background: var(--bg-secondary);
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    margin-right: 12px;
    font-size: 14px;
    font-weight: bold;
}

.google-btn .social-icon {
    background: #DB4437;
    color: white;
}

/* Auth Footer */
.auth-footer {
    margin-top: 24px;
    font-size: 14px;
    color: var(--text-secondary);
}

.auth-footer a {
    color: #6C5CE7;
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Right Side: Hero */
.auth-hero {
    flex: 1;
    background: linear-gradient(135deg, #6C5CE7 0%, #a29bfe 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
}

.hero-content {
    max-width: 400px;
}

.hero-content h2 {
    font-size: 32px;
    margin: 0 0 16px;
    font-weight: 700;
}

.hero-content p {
    font-size: 16px;
    margin: 0 0 20px;
    opacity: 0.9;
}

.hero-content ul {
    text-align: left;
    margin: 20px 0 0;
    padding-left: 20px;
    list-style: none;
    font-size: 15px;
    opacity: 0.95;
}

.hero-content li {
    margin-bottom: 12px;
    line-height: 1.4;
}

/* Responsive: Stack on Mobile */
@media (max-width: 900px) {
    .auth-container {
        flex-direction: column;
    }

    .auth-form {
        max-width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding: 40px 20px;
    }

    .auth-hero {
        padding: 30px 20px;
    }

    .hero-content h2 {
        font-size: 28px;
    }

    .hero-content p, .hero-content li {
        font-size: 15px;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .auth-form,
    .auth-hero {
        padding: 30px 16px;
    }

    .auth-form h1 {
        font-size: 24px;
    }

    .hero-content h2 {
        font-size: 24px;
    }

    .auth-social-btn span {
        font-size: 14px;
    }

    .form-group input {
        font-size: 16px;
    }
}

/* ==================== */
/* HEADER STYLES */
/* ==================== */

/* Header Base */
header {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    height: 64px;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 20px;
    transition: opacity 0.2s ease;
}

.logo:hover {
    opacity: 0.9;
}

.logo-icon {
    height: 32px;
    width: 32px;
    border-radius: 8px;
}

/* Navigation */
.nav-links {
    display: flex;
    gap: 24px;
    margin-left: 40px;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: color 0.2s ease;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-primary);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--highlight);
    border-radius: 1px;
}

/* User Section */
.user-section {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Theme Toggle */
.theme-toggle {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-secondary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.theme-toggle:hover {
    background: var(--bg-tertiary);
}

/* User Dropdown */
.user-dropdown {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

/* Wallet Balance */
.wallet-balance {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
    background: var(--bg-tertiary);
    padding: 6px 12px;
    border-radius: 8px;
    min-width: 90px;
    justify-content: center;
}

.wallet-balance.usdc-only {
    min-width: 100px;
}

.wallet-balance.usdc-only .wallet-icon {
    background: #27AE60;
    color: white;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
}

.wallet-balance small {
    font-size: 11px;
    color: var(--text-tertiary);
    font-weight: 400;
}

/* Avatar */
.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
    transition: border-color 0.2s ease;
}

.user-avatar:hover {
    border-color: var(--highlight);
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: 52px;
    right: 0;
    width: 220px;
   /* background: var(--bg-primary); */
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
    padding: 8px 0;
}

.user-dropdown.show .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s ease;
}

.dropdown-menu a:hover {
    background: var(--bg-tertiary);
}

.dropdown-menu a span:first-child {
    font-size: 16px;
    min-width: 20px;
}

.dropdown-divider {
    margin: 8px 0;
    border: none;
    border-top: 1px solid var(--border);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .header-container {
        padding: 0 16px;
    }

    .user-section {
        gap: 12px;
    }

    .theme-toggle {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }

    .wallet-balance {
        padding: 6px 10px;
        font-size: 13px;
    }

    .wallet-balance small {
        font-size: 10px;
    }

    .user-avatar {
        width: 32px;
        height: 32px;
    }
}

@media (max-width: 480px) {
    .header-container {
        height: 56px;
    }

    .logo {
        font-size: 18px;
    }

    .logo-icon {
        height: 28px;
        width: 28px;
    }

    .theme-toggle {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }

    .wallet-balance {
        min-width: 80px;
        font-size: 12px;
        padding: 4px 8px;
    }

    .wallet-balance small {
        display: none;
    }

    .user-avatar {
        width: 28px;
        height: 28px;
    }
}