/* Modern TikTok-inspired styles */
:root {
    --primary: #FF0050;
    --secondary: #121212;
    --dark: #000;
    --light: #fff;
    --gray: #222;
    --light-gray: #444;
    --text: #f1f1f1;
    --text-secondary: #aaa;
    --card-bg: #1e1e1e;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    --border-radius: 12px;
    --transition: all 0.3s ease;
    --shop-primary: #131921;
    --shop-secondary: #232f3e;
    --shop-accent: #febd69;
    --shop-light: #f3f3f3;
    --shop-dark: #0f1111;
    --shop-gray: #cccccc;
    --shop-footer: #37475a;
    --shop-price: #b12704;
    --shop-star: #ffa41c;
    --monetization-green: #00c853;
    --monetization-yellow: #ffab00;
    --monetization-red: #ff1744;
    --premium-gold: #FFD700;
    --call-green: #4CAF50;
    --call-red: #F44336;
    --playstore-green: #0f9d58;
    --books-blue: #4285f4;
}

body.dark-mode {
    --secondary: #121212;
    --dark: #000;
    --light: #fff;
    --gray: #222;
    --light-gray: #444;
    --text: #f1f1f1;
    --text-secondary: #aaa;
    --card-bg: #1e1e1e;
}

body.light-mode {
    --secondary: #f9f9f9;
    --dark: #f1f1f1;
    --light: #000;
    --gray: #e0e0e0;
    --light-gray: #ccc;
    --text: #333;
    --text-secondary: #666;
    --card-bg: #fff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

body {
    background-color: var(--secondary);
    color: var(--text);
    min-height: 100vh;
    padding-bottom: 60px; /* Space for bottom nav */
}

/* Notification Permission Prompt */
.notification-permission {
    position: fixed;
    bottom: 80px;
    right: 20px;
    background-color: var(--dark);
    padding: 15px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    z-index: 1000;
    max-width: 300px;
    display: none;
}

.notification-permission p {
    margin-bottom: 10px;
}

.notification-permission button {
    padding: 8px 12px;
    border: none;
    border-radius: var(--border-radius);
    margin-right: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.notification-permission button:first-child {
    background-color: var(--primary);
    color: white;
}

.notification-permission button:last-child {
    background-color: var(--gray);
    color: var(--text);
}

.notification-permission button:hover {
    opacity: 0.9;
}

/* Top Navigation */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background-color: var(--dark);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.menu-btn {
    background: none;
    border: none;
    color: var(--text);
    font-size: 20px;
    cursor: pointer;
    display: none;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 20px;
    font-weight: bold;
    gap: 8px;
}

.logo i {
    color: var(--primary);
    font-size: 24px;
}

.search-section {
    display: flex;
    width: 50%;
    max-width: 600px;
}

.search-bar {
    display: flex;
    width: 100%;
}

.search-bar input {
    flex: 1;
    padding: 10px 16px;
    border: none;
    border-radius: 24px 0 0 24px;
    background-color: var(--gray);
    color: var(--text);
    font-size: 16px;
}

.search-bar button {
    padding: 10px 20px;
    background-color: var(--gray);
    border: none;
    border-radius: 0 24px 24px 0;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.search-bar button:hover {
    color: var(--text);
}

.top-nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.top-nav-right button {
    background: none;
    border: none;
    color: var(--text);
    font-size: 18px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.top-nav-right button:hover {
    background-color: var(--gray);
}

#install-btn {
    display: none;
}

#install-btn.visible {
    display: flex;
}

/* Side Navigation */
.side-nav {
    width: 240px;
    background-color: var(--dark);
    height: calc(100vh - 60px);
    position: fixed;
    top: 60px;
    left: 0;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    z-index: 90;
    transition: transform 0.3s ease;
    transform: translateX(0);
}

.side-nav.hidden {
    transform: translateX(-100%);
}

.nav-items {
    display: flex;
    flex-direction: column;
    padding: 0 12px;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    margin: 4px 0;
    border-radius: var(--border-radius);
    color: var(--text);
    text-decoration: none;
    transition: var(--transition);
}

.nav-item i {
    font-size: 20px;
    margin-right: 16px;
    width: 24px;
    text-align: center;
}

.nav-item span {
    font-size: 14px;
    font-weight: 500;
}

.nav-item.active {
    background-color: var(--gray);
    color: var(--primary);
}

.nav-item:hover:not(.active) {
    background-color: var(--gray);
}

.ad-section {
    margin-top: 20px;
    padding: 15px;
    border-top: 1px solid var(--light-gray);
}

.ad-section h4 {
    color: var(--text-secondary);
    margin-bottom: 10px;
    font-size: 14px;
    text-transform: uppercase;
}

#sidebar-ad {
    width: 100%;
    min-height: 250px;
    background-color: var(--gray);
    border-radius: var(--border-radius);
    overflow: hidden;
}

/* Bottom Navigation (Mobile) */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--dark);
    z-index: 100;
    padding: 8px 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
}

.bottom-nav .nav-item {
    flex-direction: column;
    padding: 8px 4px;
    font-size: 10px;
    gap: 4px;
}

.bottom-nav .nav-item i {
    margin-right: 0;
    font-size: 18px;
}

.bottom-nav .nav-item span {
    font-size: 10px;
}

/* Main Content */
.main-content {
    margin-left: 240px;
    padding: 20px;
    transition: margin-left 0.3s ease;
}

.main-content.expanded {
    margin-left: 0;
}

/* Pages */
.page {
    display: none;
    padding: 16px 0;
}

.page.active {
    display: block;
}

/* Search Page */
.search-page {
    padding: 16px;
}

.search-container {
    max-width: 1200px;
    margin: 0 auto;
}

.search-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.search-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.search-filters select, 
.search-filters input {
    padding: 10px 15px;
    border: none;
    border-radius: var(--border-radius);
    background-color: var(--gray);
    color: var(--text);
}

.search-filters button {
    padding: 10px 20px;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

.search-filters button:hover {
    background-color: #e00045;
}

.search-history {
    margin-bottom: 24px;
    padding: 16px;
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
}

.search-history h3 {
    margin-bottom: 12px;
    color: var(--text-secondary);
}

#search-history-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.search-history-item {
    padding: 8px 16px;
    background-color: var(--gray);
    border-radius: 20px;
    color: var(--text);
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
}

.search-history-item:hover {
    background-color: var(--light-gray);
}

.search-results-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* Categories */
.categories-container {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    overflow-x: auto;
    padding: 8px 0;
    scrollbar-width: none;
}

.categories-container::-webkit-scrollbar {
    display: none;
}

.category-btn {
    padding: 8px 16px;
    background-color: var(--gray);
    border: none;
    border-radius: 20px;
    color: var(--text);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.category-btn.active {
    background-color: var(--primary);
    color: white;
}

/* Video Grid */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.video-card {
    cursor: pointer;
    transition: var(--transition);
}

.video-card:hover {
    transform: translateY(-5px);
}

.video-thumbnail {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: var(--border-radius);
    object-fit: cover;
    background-color: var(--gray);
}

.video-info {
    display: flex;
    margin-top: 12px;
    gap: 12px;
}

.channel-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--gray);
}

.video-details {
    flex: 1;
}

.video-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-channel, .video-stats {
    font-size: 12px;
    color: var(--text-secondary);
}

.ad-container {
    width: 100%;
    margin: 20px 0;
    padding: 10px;
    background-color: var(--gray);
    border-radius: var(--border-radius);
    overflow: hidden;
    text-align: center;
}

#home-ad {
    height: 90px;
}

#shop-ad {
    height: 250px;
}

/* Shorts Page */
.shorts-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
}

.short-card {
    width: 100%;
    max-width: 375px;
    height: 70vh;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
}

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

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

.short-title {
    font-size: 16px;
    margin-bottom: 8px;
    font-weight: 500;
}

.short-stats {
    display: flex;
    gap: 16px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

.short-actions {
    position: absolute;
    right: 16px;
    bottom: 80px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}

.short-action-btn {
    background: none;
    border: none;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 12px;
}

.short-action-btn i {
    font-size: 24px;
}

/* Upload Page */
.upload-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
}

.upload-box {
    width: 100%;
    max-width: 600px;
    padding: 40px;
    border: 2px dashed var(--light-gray);
    border-radius: var(--border-radius);
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.upload-box:hover {
    border-color: var(--primary);
}

.upload-box i {
    font-size: 64px;
    color: var(--primary);
    margin-bottom: 16px;
}

.upload-box p {
    font-size: 18px;
    margin-bottom: 24px;
}

.upload-details {
    display: none;
    flex-direction: column;
    gap: 16px;
}

.upload-details input,
.upload-details textarea,
.upload-details select {
    width: 100%;
    padding: 12px 16px;
    background-color: var(--gray);
    border: none;
    border-radius: var(--border-radius);
    color: var(--text);
    font-size: 16px;
}

.upload-details textarea {
    min-height: 120px;
    resize: vertical;
}

.monetization-options {
    margin: 10px 0;
    padding: 10px;
    background-color: var(--gray);
    border-radius: var(--border-radius);
}

.monetization-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.monetization-options input[type="checkbox"] {
    width: auto;
}

#monetization-details {
    margin-top: 10px;
    padding: 10px;
    background-color: var(--dark);
    border-radius: var(--border-radius);
}

#upload-btn {
    padding: 12px 24px;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

#upload-btn:hover {
    background-color: #e00045;
}

/* You Page */
.profile-header {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--light-gray);
}

#profile-pic {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary);
}

.profile-info {
    flex: 1;
}

#profile-name {
    font-size: 24px;
    margin-bottom: 8px;
}

#subscriber-count {
    color: var(--text-secondary);
    margin-bottom: 16px;
}

#edit-profile, #monetize-channel, #withdraw-earnings, #subscribe-premium {
    padding: 8px 16px;
    background-color: var(--gray);
    color: var(--text);
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    margin-right: 10px;
    margin-bottom: 10px;
}

#edit-profile:hover, #monetize-channel:hover, #withdraw-earnings:hover {
    background-color: var(--light-gray);
}

#monetize-channel {
    background-color: var(--monetization-green);
    color: white;
}

#monetize-channel:hover {
    background-color: #00b247;
}

#withdraw-earnings {
    background-color: var(--primary);
    color: white;
}

#withdraw-earnings:hover {
    background-color: #e00045;
}

#subscribe-premium {
    background-color: var(--premium-gold);
    color: black;
    font-weight: bold;
}

#subscribe-premium:hover {
    background-color: #ffcc00;
}

.profile-stats {
    display: flex;
    gap: 24px;
}

.stat {
    text-align: center;
    min-width: 80px;
}

.stat span:first-child {
    font-size: 18px;
    font-weight: bold;
    display: block;
    margin-bottom: 4px;
}

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

.tabs {
    display: flex;
    border-bottom: 1px solid var(--light-gray);
    margin-bottom: 16px;
    overflow-x: auto;
}

.tab-btn {
    padding: 12px 24px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    position: relative;
    white-space: nowrap;
}

.tab-btn.active {
    color: var(--text);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--primary);
}

.tab-content {
    display: none;
}

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

.channel-settings, .monetization-settings, .analytics-container, .bank-details {
    background-color: var(--card-bg);
    padding: 24px;
    border-radius: var(--border-radius);
    max-width: 800px;
    margin: 0 auto;
}

.channel-settings h3, .monetization-settings h3, .analytics-container h3, .bank-details h3 {
    margin-bottom: 16px;
}

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

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

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 12px 16px;
    background-color: var(--gray);
    border: none;
    border-radius: var(--border-radius);
    color: var(--text);
    font-size: 16px;
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: normal;
}

.ownership-notice {
    margin: 20px 0;
    padding: 15px;
    background-color: var(--gray);
    border-radius: var(--border-radius);
    font-size: 14px;
    color: var(--text-secondary);
}

#connect-channel, #save-monetization, #enable-monetization-btn, #submit-monetization, #save-bank-details, #submit-withdrawal {
    padding: 12px 24px;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 8px;
}

#connect-channel:hover, #save-monetization:hover, #enable-monetization-btn:hover, #submit-monetization:hover, #save-bank-details:hover, #submit-withdrawal:hover {
    background-color: #e00045;
}

#enable-monetization-btn {
    background-color: var(--monetization-green);
}

#enable-monetization-btn:hover {
    background-color: #00b247;
}

#channel-status, #bank-details-status, #withdrawal-status, #premium-status {
    margin-top: 16px;
    padding: 12px;
    border-radius: var(--border-radius);
    display: none;
}

#channel-status.success, #bank-details-status.success, #withdrawal-status.success, #premium-status.success {
    background-color: rgba(0, 200, 83, 0.2);
    color: #00c853;
    display: block;
}

#channel-status.error, #bank-details-status.error, #withdrawal-status.error, #premium-status.error {
    background-color: rgba(255, 0, 0, 0.2);
    color: #ff0000;
    display: block;
}

.monetization-status {
    margin-bottom: 20px;
    padding: 15px;
    background-color: var(--gray);
    border-radius: var(--border-radius);
}

#monetization-status-text {
    font-size: 18px;
    margin-bottom: 10px;
}

.monetization-details {
    margin-top: 20px;
}

.analytics-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background-color: var(--gray);
    padding: 20px;
    border-radius: var(--border-radius);
    text-align: center;
}

.stat-card h4 {
    color: var(--text-secondary);
    margin-bottom: 10px;
    font-size: 16px;
}

.stat-card p {
    font-size: 24px;
    font-weight: bold;
}

.analytics-charts {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

@media (min-width: 992px) {
    .analytics-charts {
        grid-template-columns: 1fr 1fr;
    }
}

.ad-performance {
    margin-top: 30px;
}

.ad-performance table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.ad-performance th, .ad-performance td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--light-gray);
}

.ad-performance th {
    background-color: var(--gray);
    font-weight: 500;
}

.ad-performance tr:hover {
    background-color: var(--gray);
}

.bank-details-preview {
    margin: 20px 0;
    padding: 15px;
    background-color: var(--gray);
    border-radius: var(--border-radius);
}

.bank-details-preview h4 {
    margin-bottom: 10px;
}

.bank-details-preview p {
    margin-bottom: 5px;
}

#edit-bank-details {
    margin-top: 10px;
    padding: 8px 16px;
    background-color: var(--gray);
    color: var(--text);
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

#edit-bank-details:hover {
    background-color: var(--light-gray);
}

.withdrawal-info {
    margin-bottom: 20px;
    padding: 15px;
    background-color: var(--gray);
    border-radius: var(--border-radius);
}

.withdrawal-info p {
    margin-bottom: 5px;
}

/* Premium Subscription Modal */
.premium-form {
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
    text-align: center;
}

.premium-form h2 {
    color: var(--premium-gold);
    margin-bottom: 20px;
}

.premium-benefits {
    text-align: left;
    margin: 20px 0;
    line-height: 2;
}

.premium-benefits i {
    color: var(--premium-gold);
    margin-right: 10px;
}

#paypal-button-container {
    margin: 20px 0;
}

/* Weather Page */
.weather-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.weather-search {
    display: flex;
    width: 300px;
}

#weather-location {
    flex: 1;
    padding: 12px 16px;
    background-color: var(--gray);
    border: none;
    border-radius: 24px 0 0 24px;
    color: var(--text);
}

#weather-search-btn {
    padding: 12px 16px;
    background-color: var(--gray);
    border: none;
    border-radius: 0 24px 24px 0;
    color: var(--text);
    cursor: pointer;
}

.current-weather {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 24px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.weather-main {
    display: flex;
    align-items: center;
    gap: 16px;
}

.weather-icon {
    font-size: 48px;
    color: var(--primary);
}

.weather-temp {
    font-size: 48px;
    font-weight: bold;
}

.weather-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-item i {
    width: 24px;
    color: var(--primary);
    text-align: center;
}

/* Forecast styles */
.forecast-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.forecast-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 16px;
    text-align: center;
}

.forecast-day {
    font-weight: 500;
    margin-bottom: 8px;
}

.forecast-icon {
    font-size: 32px;
    color: var(--primary);
    margin: 8px 0;
}

.forecast-temp {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.high-temp {
    color: #ff6b6b;
    font-weight: bold;
}

.low-temp {
    color: #74b9ff;
    font-weight: bold;
}

.hourly-container {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 16px 0;
}

.hourly-card {
    min-width: 80px;
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 12px;
    text-align: center;
}

.hourly-time {
    font-weight: 500;
    margin-bottom: 8px;
}

.hourly-icon {
    font-size: 24px;
    color: var(--primary);
    margin: 8px 0;
}

.hourly-temp {
    font-weight: bold;
}

/* AI Assistant Page */
.ai-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-bottom: 1px solid var(--light-gray);
}

.chat-container {
    height: calc(100vh - 150px);
    display: flex;
    flex-direction: column;
}

#chat-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
}

.message {
    max-width: 80%;
    margin-bottom: 16px;
    padding: 12px 16px;
    border-radius: 18px;
    line-height: 1.4;
}

.message.user {
    background-color: var(--primary);
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 4px;
}

.message.bot {
    background-color: var(--gray);
    color: var(--text);
    margin-right: auto;
    border-bottom-left-radius: 4px;
}

.chat-input {
    display: flex;
    padding: 16px;
    border-top: 1px solid var(--light-gray);
}

#user-message {
    flex: 1;
    padding: 12px 16px;
    background-color: var(--gray);
    border: none;
    border-radius: 24px;
    color: var(--text);
    font-size: 16px;
    margin-right: 12px;
}

#send-message {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--primary);
    color: white;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

#send-message:hover {
    background-color: #e00045;
}

/* Shop Page */
.shop-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.shop-search {
    display: flex;
    width: 300px;
}

#shop-search-input {
    flex: 1;
    padding: 12px 16px;
    background-color: var(--gray);
    border: none;
    border-radius: 24px 0 0 24px;
    color: var(--text);
}

#shop-search-btn {
    padding: 12px 16px;
    background-color: var(--gray);
    border: none;
    border-radius: 0 24px 24px 0;
    color: var(--text);
    cursor: pointer;
}

.shop-categories {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    overflow-x: auto;
    padding: 8px 0;
}

.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.product-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.product-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.product-info {
    padding: 12px;
}

.product-title {
    font-size: 14px;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 40px;
}

.product-price {
    color: var(--primary);
    font-weight: bold;
    margin-bottom: 8px;
}

.product-rating {
    color: var(--shop-star);
    font-size: 12px;
    margin-bottom: 8px;
}

.add-to-cart-btn {
    width: 100%;
    padding: 8px;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
}

.add-to-cart-btn:hover {
    background-color: #e00045;
}

.cart-indicator {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 60px;
    height: 60px;
    background-color: var(--primary);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    box-shadow: var(--shadow);
    z-index: 80;
}

.cart-indicator i {
    font-size: 24px;
}

.cart-indicator span {
    font-size: 12px;
    margin-top: 2px;
}

/* Images Page */
.images-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.images-search {
    display: flex;
    width: 300px;
}

#images-search-input {
    flex: 1;
    padding: 12px 16px;
    background-color: var(--gray);
    border: none;
    border-radius: 24px 0 0 24px;
    color: var(--text);
}

#images-search-btn {
    padding: 12px 16px;
    background-color: var(--gray);
    border: none;
    border-radius: 0 24px 24px 0;
    color: var(--text);
    cursor: pointer;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.image-card {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    background-color: var(--card-bg);
}

.image-card img {
    width: 100%;
    height: auto;
    display: block;
}

.download-button {
    position: absolute;
    bottom: 10px;
    right: 10px;
    padding: 8px 12px;
    background-color: rgba(0, 123, 255, 0.8);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

.download-button:hover {
    background-color: rgba(0, 86, 179, 0.8);
}

/* Play Store Page */
.playstore-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.playstore-search {
    display: flex;
    width: 400px;
}

#playstore-search-input {
    flex: 1;
    padding: 12px 16px;
    background-color: var(--gray);
    border: none;
    border-radius: 24px 0 0 24px;
    color: var(--text);
}

#playstore-search-btn {
    padding: 12px 16px;
    background-color: var(--playstore-green);
    border: none;
    border-radius: 0 24px 24px 0;
    color: white;
    cursor: pointer;
}

.playstore-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.app-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
}

.app-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.app-image {
    width: 100%;
    height: 180px;
    object-fit: contain;
    background-color: var(--dark);
    padding: 10px;
}

.app-info {
    padding: 12px;
}

.app-title {
    font-size: 14px;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 40px;
}

.app-developer {
    color: var(--text-secondary);
    font-size: 12px;
    margin-bottom: 8px;
}

.app-rating {
    color: var(--shop-star);
    font-size: 12px;
    margin-bottom: 8px;
}

.download-app-btn {
    width: 100%;
    padding: 8px;
    background-color: var(--playstore-green);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
}

.download-app-btn:hover {
    background-color: #0d8e4d;
}

/* Books Page */
.books-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.books-search {
    display: flex;
    width: 400px;
}

#books-search-input {
    flex: 1;
    padding: 12px 16px;
    background-color: var(--gray);
    border: none;
    border-radius: 24px 0 0 24px;
    color: var(--text);
}

#books-search-btn {
    padding: 12px 16px;
    background-color: var(--books-blue);
    border: none;
    border-radius: 0 24px 24px 0;
    color: white;
    cursor: pointer;
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.book-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
}

.book-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.book-image {
    width: 100%;
    height: 250px;
    object-fit: contain;
    background-color: var(--dark);
    padding: 10px;
}

.book-info {
    padding: 12px;
}

.book-title {
    font-size: 14px;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 40px;
}

.book-author {
    color: var(--text-secondary);
    font-size: 12px;
    margin-bottom: 8px;
}

.read-book-btn {
    width: 100%;
    padding: 8px;
    background-color: var(--books-blue);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
}

.read-book-btn:hover {
    background-color: #3a7bd5;
}

/* Book Reader Modal */
#book-reader-modal .modal-content {
    max-width: 800px;
    width: 95%;
    height: 90vh;
    display: flex;
    flex-direction: column;
}

.book-reader-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background-color: var(--dark);
    border-bottom: 1px solid var(--light-gray);
}

.book-reader-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.book-reader-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background-color: var(--secondary);
}

.book-reader-content p {
    margin-bottom: 15px;
    line-height: 1.6;
}

/* Checkout Page */
.checkout-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.checkout-container {
    max-width: 800px;
    margin: 0 auto;
}

.checkout-form {
    background-color: var(--card-bg);
    padding: 24px;
    border-radius: var(--border-radius);
}

.checkout-form h3 {
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--light-gray);
}

.order-summary {
    margin-top: 32px;
    background-color: var(--gray);
    padding: 16px;
    border-radius: var(--border-radius);
}

.order-items {
    margin-bottom: 16px;
}

.order-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.order-total {
    text-align: right;
    font-size: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--light-gray);
}

.place-order-btn {
    width: 100%;
    padding: 16px;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 24px;
    transition: var(--transition);
}

.place-order-btn:hover {
    background-color: #e00045;
}

/* Video Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    overflow-y: auto;
}

.modal-content {
    background-color: var(--secondary);
    margin: 20px auto;
    max-width: 1200px;
    width: 95%;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    color: var(--text);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
}

.video-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background-color: var(--dark);
}

#video-player {
    width: 100%;
    height: 100%;
    border: none;
}

#mini-player-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background-color: rgba(0, 0, 0, 0.7);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
}

#video-ad-container {
    width: 100%;
    padding: 20px;
    background-color: var(--dark);
    text-align: center;
    border-bottom: 1px solid var(--light-gray);
}

.video-info {
    padding: 20px;
}

#video-modal-title {
    font-size: 20px;
    margin-bottom: 12px;
}

.video-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    color: var(--text-secondary);
    font-size: 14px;
}

.video-actions {
    display: flex;
    gap: 16px;
    margin: 16px 0;
}

.action-btn {
    background-color: var(--gray);
    border: none;
    color: var(--text);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.action-btn.subscribe {
    width: auto;
    padding: 0 16px;
    border-radius: 20px;
}

.action-btn:hover {
    background-color: var(--light-gray);
}

.channel-info {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
    padding: 16px 0;
    border-top: 1px solid var(--light-gray);
    border-bottom: 1px solid var(--light-gray);
}

#channel-img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.channel-details {
    flex: 1;
}

#channel-name {
    font-size: 16px;
    margin-bottom: 4px;
}

#channel-subs {
    font-size: 14px;
    color: var(--text-secondary);
}

.subscribe-btn {
    padding: 10px 16px;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.subscribe-btn:hover {
    background-color: #e00045;
}

#video-description {
    margin: 16px 0;
    white-space: pre-line;
    line-height: 1.6;
}

.suggested-videos {
    padding: 20px;
}

.suggested-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

/* Mini Player */
.mini-player {
    display: none;
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 300px;
    height: 180px;
    background-color: var(--dark);
    border-radius: 8px;
    box-shadow: var(--shadow);
    z-index: 1000;
    overflow: hidden;
}

.mini-player.active {
    display: block;
}

.mini-player-content {
    position: relative;
    width: 100%;
    height: 100%;
}

#mini-player-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

#close-mini-player, #expand-mini-player {
    position: absolute;
    background-color: rgba(0, 0, 0, 0.7);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

#close-mini-player {
    top: 10px;
    right: 10px;
}

#expand-mini-player {
    top: 10px;
    right: 45px;
}

/* Product Detail Modal */
.product-detail {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px;
}

@media (min-width: 768px) {
    .product-detail {
        grid-template-columns: 1fr 1fr;
    }
}

.product-detail-image img {
    width: 100%;
    max-height: 500px;
    object-fit: contain;
    border-radius: var(--border-radius);
}

.product-detail-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.product-detail-title {
    font-size: 24px;
    margin-bottom: 10px;
}

.product-detail-rating {
    color: var(--shop-star);
    margin-bottom: 15px;
}

.product-detail-price {
    font-size: 22px;
    font-weight: bold;
    color: var(--primary);
}

.product-detail-description {
    line-height: 1.6;
    margin-bottom: 20px;
}

.add-to-cart-detail, .buy-now-detail {
    padding: 12px 20px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.add-to-cart-detail {
    background-color: var(--primary);
    color: white;
    margin-bottom: 10px;
}

.add-to-cart-detail:hover {
    background-color: #e00045;
}

.buy-now-detail {
    background-color: var(--monetization-green);
    color: white;
}

.buy-now-detail:hover {
    background-color: #00b247;
}

/* Order Confirmation Modal */
.order-confirmation {
    text-align: center;
    padding: 40px 20px;
}

.order-confirmation i {
    font-size: 60px;
    color: var(--primary);
    margin-bottom: 20px;
}

.order-confirmation h2 {
    margin-bottom: 16px;
}

.order-confirmation p {
    margin-bottom: 8px;
    color: var(--text-secondary);
}

#order-id {
    font-weight: bold;
    color: var(--primary);
}

.continue-shopping-btn {
    padding: 12px 24px;
    background-color: var(--gray);
    color: var(--text);
    border: none;
    border-radius: var(--border-radius);
    font-size: 16px;
    cursor: pointer;
    margin-top: 24px;
    transition: var(--transition);
}

.continue-shopping-btn:hover {
    background-color: var(--light-gray);
}

/* Monetization Modal */
.monetization-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

.monetization-form h2 {
    margin-bottom: 20px;
    color: var(--primary);
}

.monetization-form p {
    margin-bottom: 15px;
    line-height: 1.6;
}

/* Withdrawal Modal */
.withdrawal-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

.withdrawal-form h2 {
    margin-bottom: 20px;
    color: var(--primary);
}

/* Call Modals */
.call-container, .incoming-call, .active-call {
    max-width: 400px;
    margin: 0 auto;
    padding: 20px;
    text-align: center;
}

#start-call-btn, #accept-call-btn {
    padding: 12px 24px;
    background-color: var(--call-green);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 16px;
    cursor: pointer;
    margin: 10px;
    transition: var(--transition);
}

#reject-call-btn, #end-call-btn {
    padding: 12px 24px;
    background-color: var(--call-red);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 16px;
    cursor: pointer;
    margin: 10px;
    transition: var(--transition);
}

#start-call-btn:hover, #accept-call-btn:hover {
    background-color: #388E3C;
}

#reject-call-btn:hover, #end-call-btn:hover {
    background-color: #D32F2F;
}

.call-buttons {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

#call-status {
    margin-top: 15px;
    padding: 10px;
    border-radius: var(--border-radius);
}

.call-timer {
    font-size: 24px;
    margin: 15px 0;
    font-family: monospace;
}

/* Loading and Error States */
.loading {
    text-align: center;
    padding: 40px;
    font-size: 18px;
    color: var(--text-secondary);
}

.error {
    color: #ff6b6b;
    text-align: center;
    padding: 20px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .video-grid, .playstore-grid, .books-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
}

@media (max-width: 992px) {
    .search-section {
        width: 40%;
    }
    
    .top-nav-right {
        gap: 8px;
    }
}

@media (max-width: 768px) {
    .top-nav {
        padding: 10px;
    }
    
    .menu-btn {
        display: block;
    }
    
    .side-nav {
        transform: translateX(-100%);
    }
    
    .side-nav.visible {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .search-section {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: 100%;
        padding: 10px;
        background-color: var(--dark);
        z-index: 90;
    }
    
    .search-section.visible {
        display: flex;
    }
    
    .bottom-nav {
        display: flex;
        justify-content: space-around;
    }
    
    .video-grid, .playstore-grid, .books-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .profile-header {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-info {
        text-align: center;
    }
    
    .profile-stats {
        justify-content: center;
    }
    
    .tabs {
        overflow-x: auto;
    }
    
    .tab-btn {
        white-space: nowrap;
    }
    
    .short-card {
        height: 65vh;
    }
    
    .cart-indicator {
        bottom: 70px;
        right: 10px;
        width: 50px;
        height: 50px;
    }
    
    .cart-indicator i {
        font-size: 20px;
    }
    
    .cart-indicator span {
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .forecast-container {
        grid-template-columns: 1fr;
    }
    
    .short-card {
        height: 60vh;
    }
    
    .upload-box {
        padding: 20px;
    }
    
    .upload-box i {
        font-size: 48px;
    }
    
    .upload-box p {
        font-size: 16px;
    }
    
    .analytics-stats {
        grid-template-columns: 1fr 1fr;
    }
    
    .call-buttons {
        flex-direction: column;
    }
    
    #accept-call-btn, #reject-call-btn {
        width: 100%;
        margin: 5px 0;
    }
}