/* ==========================
   RESET & BASE STYLES
========================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    overscroll-behavior-y: auto;
}

html::-webkit-scrollbar {
    display: none;
}

:root {
    --primary: #39d377;
    --primary-dark: #39d377;
    --primary-light: #4fdb87;

    --text-dark: #222;
    --text-light: #666;
    --bg-light: #f0f2f5;
    --bg-white: #ffffff;
    --bg-hovar: #dfe2e1;
    --border-color: #e0e0e0;
    
    --bg-body: linear-gradient(
        180deg,
        #ffffff 0%,
        rgba(68, 189, 158, 0.1) 50%,
        #ffffff 100%
    );
}

html[data-theme="dark"] {
    --text-dark: #eee;
    --text-light: #aaa;
    --bg-light: #374151;
    --bg-white: #4b5563;
    --bg-hovar: #3f4a5a;
    --border-color: #9df8c1;
    
    /* Gradient background for dark mode */
    --bg-body: linear-gradient(
        180deg,
        #1f2937 0%,
        rgba(57, 211, 119, 0.15) 50%,
        #1f2937 100%
    );
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: var(--bg-body);
    background-attachment: fixed; /* Fixed background */
    color: var(--text-dark);
    transition: background-color 200ms, color 200ms;
    min-height: 100vh;
}






/* Notification Toast Animation */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Page Transition */
.page-enter {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* ==========================
   MAIN CONTENT AREA
========================== */
.main-bg {
    margin: 10px;
    box-sizing: border-box;
}

/* PC/Tablet styles */
@media (min-width: 768px) {
    .main-bg {
        margin: 20px 50px;
    }
}

/* Optional: Extra large screens */
@media (min-width: 1200px) {
    .main-bg {
        max-width: 1200px;
        margin: 20px auto; /* center on very large screens */
        padding: 10px 20px;
    }
    
}
.main-content {
 
    padding: 16px;
    height: 100% auto;
    width: 100%;
    
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    
    /* Scroll functionality */
    overflow-y: auto;
    overflow-x: hidden;
}

/* Hide scrollbars but keep functionality */
.main-content::-webkit-scrollbar {
    display: none;
}

.main-content {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

/* ==========================
   WELCOME SECTION
========================== */
.welcome-section {
    background: var(--bg-white);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 15px;
    border: 1px solid var(--border-color);
    text-align: center;
    
}

[data-theme="dark"] .welcome-section {
    box-shadow: 2px 4px 4px rgba(56, 153, 129, 0.1);

}



.update-box {
    text-align: center;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: rgba(40, 255, 173, 0.05);
}

.update-text {
    color: var(--text-dark);
    font-weight: 500;
    margin-bottom: 15px;
}

.update-button {
    background-color: var(--primary);
    color: #fff;
    font-weight: bold;
    padding: 8px 16px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 200ms ease;
}

.update-button:hover {
    filter: brightness(0.92);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(40, 194, 255, 0.3);
}

/* ==========================
   DARK MODE STYLES
========================== */
html[data-theme="dark"] .welcome-section {
    background-color: #374151;
    color: #f9fafb;
}

/* ==========================
   RESPONSIVE DESIGN
========================== */
@media (min-width: 768px) {
    .main-bg {
        margin: 10px auto;
    }
    
    .main-content {
        padding: 20px;
        max-width: 1200px;
        margin-left: auto;
        margin-right: auto;
    }

}











/* Main container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 10px;
}

/* Text loop container */
.text-loop-container {
    background: linear-gradient(90deg, #2c3e50, #39d377);
    color: white;
    padding: 15px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}

/* Static text (left side) */
.static-text {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 1rem;
    padding-right: 15px;
    border-right: 2px solid rgba(255, 255, 255, 0.3);
}

.static-text i {
    color: var(--primary);
    font-size: 1.2rem;
    min-width: 20px;
    text-align: center;
}

/* Infinite loop wrapper */
.infinite-loop-wrapper {
    flex: 1;
    overflow: hidden;
    position: relative;
    height: 30px;
}

/* Infinite loop animation */
.infinite-loop {
    display: flex;
    position: absolute;
    white-space: nowrap;
    animation: scrollText 20s linear infinite;
    top: 0;
    left: 0;
    align-items: center;
    height: 100%;
}

/* Individual text items */
.text-item {
    display: inline-flex;
    align-items: center;
    padding: 0 20px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    position: relative;
    white-space: nowrap;
    height: 100%;
}

.text-item:not(:last-child)::after {
    content: "•";
    position: absolute;
    right: -5px;
    top: 50%;
    transform: translateY(-50%);
    color: #f72f0b;
    font-size: 20px;
    font-weight: bold;
    opacity: 0.7;
}

/* Animation for all devices */
@keyframes scrollText {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Ensure seamless loop */
.infinite-loop::after {
    content: attr(data-text);
    display: inline-flex;
    align-items: center;
    padding-left: 20px;
}

/* Hover effect - pause on hover */
.text-loop-container:hover .infinite-loop {
    animation-play-state: paused;
}

/* Tablet and smaller screens */
@media (max-width: 768px) {
    .container {
        padding: 12px 8px;
    }
    
    .text-loop-container {
        padding: 12px;
        gap: 6px;
        border-radius: 8px;
    }
    
    .static-text {
        font-size: 0.95rem;
        padding-right: 6px;
        gap: 4px;
    }
    
    .static-text i {
        font-size: 1.1rem;
    }
    
    .infinite-loop-wrapper {
        height: 26px;
    }
    
    .text-item {
        font-size: 0.92rem;
        padding: 0 16px;
    }
    
    .text-item:not(:last-child)::after {
        font-size: 18px;
        right: -3px;
    }
    
    .infinite-loop {
        animation: scrollText 18s linear infinite;
    }
}

/* Mobile phones - FIXED LAYOUT */
@media (max-width: 480px) {
    .container {
        padding: 10px 5px;
        margin: 10px auto !important;
    }
    
    .text-loop-container {
        padding: 10px;
        gap: 6px;
        border-radius: 8px;
        flex-direction: row; /* সবসময় row রাখুন */
        align-items: center;
        height: auto;
        min-height: 50px; /* নূন্যতম উচ্চতা */
    }
    
    .static-text {
        border-right: 2px solid rgba(255, 255, 255, 0.3);
        border-bottom: none;
        padding-right: 2px;
        padding-bottom: 0;
        width: auto;
        justify-content: flex-start;
        font-size: 0.85rem; /* আরও ছোট ফন্ট */
        gap: 4px;
        flex-shrink: 0;
        min-width: 70px; /* বড় অপটির জন্য মিনিমাম প্রস্থ */
    }
    
    .static-text span {
        display: inline-block;
        max-width: 80px; /* বড় অপটির টেক্সট প্রস্থ সীমিত */
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .static-text i {
        font-size: 0.9rem;
        flex-shrink: 0;
    }
    
    .infinite-loop-wrapper {
        height: 24px;
        min-width: 0;
        flex: 1;
        overflow: hidden;
        display: flex;
        align-items: center;
    }
    
    .text-item {
        font-size: 0.85rem; /* আরও ছোট ফন্ট */
        padding: 0 12px;
        height: 24px;
        display: inline-flex;
        align-items: center;
    }
    
    .text-item:not(:last-child)::after {
        font-size: 16px;
        right: -2px;
    }
    
    /* Ensure text stays in one line */
    .infinite-loop {
        animation: scrollText 25s linear infinite;
        white-space: nowrap;
        display: flex;
        align-items: center;
        height: 100%;
        top: 0;
        left: 0;
    }
    
    /* Fix for vertical alignment */
    .text-loop-container {
        align-items: center !important;
    }
}



/* Alternative mobile fix - যদি উপরেরটা কাজ না করে */
@media (max-width: 480px) {
    /* Alternative approach */
    .text-loop-container {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
    }
    
    .static-text {
        order: 1;
        width: auto !important;
        flex: 0 0 auto !important;
    }
    
    .infinite-loop-wrapper {
        order: 2;
        flex: 1;
        min-width: 0;
    }
}

/* Ensure vertical alignment on all devices */
.text-loop-container,
.static-text,
.infinite-loop-wrapper,
.infinite-loop,
.text-item {
    display: flex;
    align-items: center;
}

/* For devices that support hover */
@media (hover: hover) {
    .text-loop-container:hover .infinite-loop {
        animation-play-state: paused;
    }
}

/* For touch devices */
@media (hover: none) and (pointer: coarse) {
    .text-loop-container:active .infinite-loop {
        animation-play-state: paused;
    }
}

/* Fix for iOS Safari */
@supports (-webkit-touch-callout: none) {
    .infinite-loop-wrapper {
        -webkit-overflow-scrolling: touch;
    }
    
    .infinite-loop {
        -webkit-font-smoothing: antialiased;
    }
}

/* Mobile emergency fix - যদি সবকিছু ব্যর্থ হয় */
@media (max-width: 480px) {
    .text-loop-container {
        position: relative;
        z-index: 1;
    }
    
    .infinite-loop-wrapper {
        position: relative;
        z-index: 2;
    }
    
    /* Force text to stay in same line */
    .static-text, 
    .infinite-loop,
    .text-item {
        line-height: 1.2 !important;
        vertical-align: middle !important;
    }
}