/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    color: #fff;
    min-height: 100vh;
    padding-bottom: 80px;
    line-height: 1.6;
}

/* Header Styles */
.header {
    background: rgba(22, 33, 62, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(67, 97, 238, 0.3);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.logo {
    font-size: 22px;
    font-weight: 700;
    color: #4cc9f0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo i {
    color: #f72585;
    font-size: 26px;
}

.user-balance {
    background: linear-gradient(90deg, #f72585, #7209b7);
    padding: 8px 15px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(247, 37, 133, 0.4);
    transition: transform 0.3s ease;
}

.user-balance:hover {
    transform: translateY(-2px);
}

/* Container */
.container {
    padding: 20px;
    max-width: 100%;
    margin: 0 auto;
}

/* Welcome Section */
.welcome-section {
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.1), rgba(76, 201, 240, 0.1));
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 25px;
    border: 1px solid rgba(76, 201, 240, 0.2);
}

.welcome-section h2 {
    font-size: 24px;
    margin-bottom: 8px;
    color: #4cc9f0;
}

.welcome-section p {
    color: #b8b8d1;
    font-size: 14px;
}

/* Stats Container - OLD VERSION (Keep if needed for reference) */
.stats-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.stat-card {
    background: rgba(22, 33, 62, 0.7);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    border: 1px solid rgba(67, 97, 238, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #4cc9f0;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 13px;
    color: #b8b8d1;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Progress Section */
.progress-section {
    background: rgba(22, 33, 62, 0.7);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 25px;
}

.progress-section h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    color: #4cc9f0;
}

.progress-bar {
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #f72585, #7209b7);
    border-radius: 5px;
    transition: width 0.5s ease;
}

.progress-text {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #b8b8d1;
}

/* Actions Container */
.actions-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.action-btn {
    background: rgba(67, 97, 238, 0.9);
    border: none;
    border-radius: 15px;
    padding: 20px 10px;
    color: white;
    font-weight: 600;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
}

.action-btn:hover {
    background: rgba(67, 97, 238, 1);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.4);
}

.action-btn i {
    font-size: 24px;
    margin-bottom: 8px;
}

.action-btn.withdraw {
    background: linear-gradient(90deg, #f72585, #7209b7);
}

.action-btn.invite {
    background: linear-gradient(90deg, #4cc9f0, #4361ee);
}

/* Friday Banner */
.friday-banner {
    background: linear-gradient(135deg, #ff9e00, #ff0000);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 158, 0, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(255, 158, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 158, 0, 0); }
}

.friday-content h3 {
    font-size: 20px;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.friday-content p {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 10px;
}

.bonus-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.friday-btn {
    background: white;
    color: #ff0000;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.3s ease;
}

.friday-btn:hover {
    transform: translateX(5px);
}

/* Section Title */
.section-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-title i {
    margin-right: 10px;
    color: #f72585;
}

.view-all {
    font-size: 14px;
    color: #4cc9f0;
    text-decoration: none;
}

/* Videos Grid */
.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.video-card {
    background: rgba(22, 33, 62, 0.7);
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid rgba(67, 97, 238, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.video-card.watched {
    opacity: 0.7;
}

.video-thumb {
    height: 150px;
    background: linear-gradient(135deg, #0f3460, #1a1a2e);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.video-thumb i {
    font-size: 50px;
    color: rgba(76, 201, 240, 0.5);
}

.featured-badge, .friday-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(247, 37, 133, 0.9);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.friday-badge {
    background: rgba(255, 158, 0, 0.9);
}

.video-info {
    padding: 15px;
}

.video-info h4 {
    font-size: 16px;
    margin-bottom: 10px;
    line-height: 1.4;
}

.video-meta {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #b8b8d1;
    margin-bottom: 15px;
}

.btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(90deg, #4361ee, #3a56d4);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn:hover {
    background: linear-gradient(90deg, #3a56d4, #2e46c8);
}

.watched-btn {
    background: #38b000 !important;
    cursor: not-allowed;
}

/* Leaderboard */
.leaderboard {
    background: rgba(22, 33, 62, 0.7);
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 30px;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background 0.3s ease;
}

.leaderboard-item:hover {
    background: rgba(67, 97, 238, 0.1);
}

.leaderboard-item:last-child {
    border-bottom: none;
}

.rank {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #f72585, #7209b7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    margin-right: 15px;
}

.user-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #4cc9f0, #4361ee);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-details span {
    font-size: 12px;
    color: #b8b8d1;
}

.user-earnings {
    font-weight: 700;
    color: #4cc9f0;
    font-size: 16px;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(22, 33, 62, 0.98);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-around;
    padding: 12px 0;
    border-top: 1px solid rgba(67, 97, 238, 0.3);
    z-index: 1000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #b8b8d1;
    font-size: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 5px;
    border-radius: 10px;
}

.nav-item.active {
    color: #4cc9f0;
    background: rgba(76, 201, 240, 0.1);
}

.nav-item i {
    font-size: 20px;
    margin-bottom: 4px;
}

/* Alert Messages */
.alert {
    padding: 15px 20px;
    border-radius: 10px;
    margin: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.alert.success {
    background: rgba(76, 201, 240, 0.2);
    border-left: 4px solid #4cc9f0;
}

.alert.error {
    background: rgba(247, 37, 133, 0.2);
    border-left: 4px solid #f72585;
}

.alert .close {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 20px;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Empty State */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
}

.empty-state i {
    font-size: 60px;
    color: rgba(76, 201, 240, 0.3);
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #4cc9f0;
}

.empty-state p {
    color: #b8b8d1;
}

/* Page Header */
.page-header {
    margin-bottom: 25px;
}

.page-header h2 {
    font-size: 24px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #4cc9f0;
}

.page-header p {
    color: #b8b8d1;
    font-size: 14px;
}

/* Stats Bar */
.stats-bar {
    display: flex;
    background: rgba(22, 33, 62, 0.7);
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 25px;
}

.stat-item-old {
    flex: 1;
    text-align: center;
    padding: 0 10px;
}

.stat-item-old:not(:last-child) {
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-label-old {
    display: block;
    font-size: 12px;
    color: #b8b8d1;
    margin-bottom: 5px;
}

.stat-value-old {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: #4cc9f0;
}

/* Special Offer */
.special-offer {
    background: linear-gradient(135deg, #ff9e00, #ff0000);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.offer-icon i {
    font-size: 30px;
}

.offer-content {
    flex: 1;
}

.offer-content h4 {
    font-size: 18px;
    margin-bottom: 5px;
}

.offer-content p {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 5px;
}

.offer-content small {
    font-size: 12px;
    opacity: 0.8;
}

.offer-bonus {
    background: rgba(255, 255, 255, 0.2);
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 20px;
    font-weight: 700;
}

/* Video Filters */
.video-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.filter-btn {
    padding: 10px 20px;
    background: rgba(22, 33, 62, 0.7);
    border: 1px solid rgba(67, 97, 238, 0.3);
    border-radius: 25px;
    color: #b8b8d1;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.filter-btn.active {
    background: linear-gradient(90deg, #4361ee, #3a56d4);
    color: white;
    border-color: #4361ee;
}

/* Detailed Video Cards */
.videos-grid.detailed {
    grid-template-columns: 1fr;
}

.video-card.detailed {
    display: flex;
    flex-direction: column;
}

.video-header {
    padding: 10px 15px;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    gap: 10px;
}

.badge {
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.badge.featured {
    background: rgba(247, 37, 133, 0.9);
}

.badge.friday {
    background: rgba(255, 158, 0, 0.9);
}

.duration {
    margin-left: auto;
    font-size: 12px;
    color: #b8b8d1;
}

.video-card.detailed .video-thumb {
    height: 200px;
}

.video-body {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.video-desc {
    font-size: 14px;
    color: #b8b8d1;
    margin-bottom: 15px;
    flex: 1;
}

.video-earnings {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.earning-amount {
    display: flex;
    align-items: center;
    gap: 8px;
}

.earning-amount strong {
    font-size: 20px;
    color: #4cc9f0;
}

.earning-amount small {
    font-size: 12px;
    color: #b8b8d1;
}

/* Info Section */
.info-section {
    margin-top: 40px;
}

.info-section h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    color: #4cc9f0;
}

.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.info-card {
    background: rgba(22, 33, 62, 0.7);
    border-radius: 15px;
    padding: 25px 20px;
    text-align: center;
    border: 1px solid rgba(67, 97, 238, 0.3);
}

.info-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #f72585, #7209b7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
}

.info-icon i {
    font-size: 24px;
}

.info-card h4 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #4cc9f0;
}

.info-card p {
    font-size: 14px;
    color: #b8b8d1;
}

/* Responsive Design */
@media (max-width: 480px) {
    .stats-container {
        grid-template-columns: 1fr;
    }
    
    .actions-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .friday-banner {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .leaderboard-item {
        padding: 12px 15px;
    }
    
    .video-earnings {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
}

@media (max-width: 360px) {
    .actions-container {
        grid-template-columns: 1fr;
    }
    
    .video-filters {
        flex-wrap: wrap;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-success {
    color: #4cc9f0 !important;
}

.text-danger {
    color: #f72585 !important;
}

.text-warning {
    color: #ff9e00 !important;
}

.mt-3 {
    margin-top: 15px;
}

.mb-3 {
    margin-bottom: 15px;
}

.mt-5 {
    margin-top: 25px;
}

.mb-5 {
    margin-bottom: 25px;
}

.p-3 {
    padding: 15px;
}

.p-4 {
    padding: 20px;
}

.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100px;
}

.loading i {
    font-size: 40px;
    color: #4cc9f0;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* =========================================== */
/* Stats Grid View - Responsive Grid Layout   */
/* =========================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin: 25px 0;
    padding: 0 10px;
}

.stat-item {
    border-radius: 18px;
    padding: 22px 15px;
    display: flex;
    align-items: center;
    color: white;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
    border: 2px solid rgba(255, 255, 255, 0.25);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    min-height: 100px;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: 0.6s;
}

.stat-item:hover::before {
    left: 100%;
}

.stat-item:hover {
    transform: translateY(-7px) scale(1.03);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

/* আকর্ষণীয় ও ভাইব্র্যান্ট রং স্কিম - Option 1 */
.stat-item.earnings {
    background: linear-gradient(135deg, #FF006E 0%, #FFA400 100%);
    background: linear-gradient(135deg, #FF512F 0%, #DD2476 100%);
    border-color: rgba(255, 255, 255, 0.4);
}

.stat-item.videos {
    background: linear-gradient(135deg, #4776E6 0%, #8E54E9 100%);
    background: linear-gradient(135deg, #1A2980 0%, #26D0CE 100%);
    border-color: rgba(255, 255, 255, 0.4);
}

.stat-item.level {
    background: linear-gradient(135deg, #00C9FF 0%, #92FE9D 100%);
    background: linear-gradient(135deg, #11998E 0%, #38EF7D 100%);
    color: white;
    border-color: rgba(255, 255, 255, 0.4);
}

.stat-item.referrals {
    background: linear-gradient(135deg, #DA22FF 0%, #9733EE 100%);
    background: linear-gradient(135deg, #FC466B 0%, #3F5EFB 100%);
    border-color: rgba(255, 255, 255, 0.4);
}

/* আকর্ষণীয় ও ভাইব্র্যান্ট রং স্কিম - Option 2 (Uncomment to use) */
/*
.stat-item.earnings {
    background: linear-gradient(135deg, #FF0000 0%, #FF8000 100%);
    border-color: rgba(255, 255, 255, 0.4);
}

.stat-item.videos {
    background: linear-gradient(135deg, #00FF80 0%, #00BFFF 100%);
    border-color: rgba(255, 255, 255, 0.4);
}

.stat-item.level {
    background: linear-gradient(135deg, #FF00FF 0%, #8000FF 100%);
    border-color: rgba(255, 255, 255, 0.4);
}

.stat-item.referrals {
    background: linear-gradient(135deg, #FFFF00 0%, #FF8000 100%);
    border-color: rgba(255, 255, 255, 0.4);
}
*/

/* আকর্ষণীয় ও ভাইব্র্যান্ট রং স্কিম - Option 3 (Uncomment to use) */
/*
.stat-item.earnings {
    background: linear-gradient(135deg, #FF416C 0%, #FF4B2B 100%);
    border-color: rgba(255, 255, 255, 0.4);
}

.stat-item.videos {
    background: linear-gradient(135deg, #36D1DC 0%, #5B86E5 100%);
    border-color: rgba(255, 255, 255, 0.4);
}

.stat-item.level {
    background: linear-gradient(135deg, #FF8008 0%, #FFC837 100%);
    border-color: rgba(255, 255, 255, 0.4);
}

.stat-item.referrals {
    background: linear-gradient(135deg, #834D9B 0%, #D04ED6 100%);
    border-color: rgba(255, 255, 255, 0.4);
}
*/

/* বাটনের আইকন স্টাইল */
.stat-icon {
    font-size: 28px;
    margin-right: 15px;
    background: rgba(255, 255, 255, 0.3);
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    border: 2px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.stat-content {
    flex: 1;
    z-index: 1;
}

.stat-value {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 6px;
    text-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.stat-label {
    font-size: 14px;
    opacity: 0.95;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.3px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* গ্লো ইফেক্ট */
.stat-item {
    animation: gentleGlow 3s ease-in-out infinite alternate;
}

@keyframes gentleGlow {
    0% {
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
    }
    100% {
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
    }
}

/* Tablet devices */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .stat-item {
        padding: 20px 12px;
        border-radius: 16px;
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 24px;
        margin-right: 12px;
    }
    
    .stat-value {
        font-size: 22px;
    }
    
    .stat-label {
        font-size: 13px;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 0 8px;
    }
    
    .stat-item {
        padding: 18px 10px;
        border-radius: 14px;
        border-width: 2px;
        min-height: 90px;
    }
    
    .stat-icon {
        width: 45px;
        height: 45px;
        font-size: 22px;
        margin-right: 10px;
    }
    
    .stat-value {
        font-size: 20px;
    }
    
    .stat-label {
        font-size: 12px;
    }
}

/* Extra small mobile devices */
@media (max-width: 360px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .stat-item {
        padding: 16px 8px;
        border-radius: 12px;
        min-height: 85px;
    }
    
    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
        margin-right: 8px;
    }
    
    .stat-value {
        font-size: 18px;
    }
    
    .stat-label {
        font-size: 11px;
    }
}

/* Landscape orientation */
@media (max-height: 500px) and (orientation: landscape) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
    }
    
    .stat-item {
        padding: 12px 8px;
        min-height: 70px;
    }
    
    .stat-icon {
        width: 35px;
        height: 35px;
        font-size: 18px;
        margin-right: 8px;
    }
    
    .stat-value {
        font-size: 16px;
    }
    
    .stat-label {
        font-size: 10px;
    }
}

/* High contrast for better visibility */
.stat-item {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* For light colored backgrounds where text might need to be dark */
.stat-item[style*="color: #333"] .stat-value,
.stat-item[style*="color:#333"] .stat-value,
.stat-item[style*="color: #333"] .stat-label,
.stat-item[style*="color:#333"] .stat-label {
    color: #222;
    text-shadow: 0 1px 3px rgba(255, 255, 255, 0.5);
}