/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

@font-face {
    font-family: "Font Awesome 6 Free";
    font-style: normal;
    font-weight: 900;
    font-display: swap;
    src: url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/webfonts/fa-solid-900.woff2") format("woff2");
}

@font-face {
    font-family: "Font Awesome 6 Free";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/webfonts/fa-regular-400.woff2") format("woff2");
}

@font-face {
    font-family: "Font Awesome 6 Brands";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/webfonts/fa-brands-400.woff2") format("woff2");
}

button,
a,
.nav-link,
.icon-btn,
.profile-btn,
.menu-toggle,
.category-btn,
.date-btn,
.trending-btn,
.calendar-btn,
.read-story-btn,
.login-modal-close,
.calendar-modal-close,
.search-close,
.sidebar-close {
    -webkit-tap-highlight-color: transparent;
    outline: none;
    -webkit-touch-callout: none;
    user-select: none;
}

/* Prevent horizontal overflow */
*,
*::before,
*::after {
    max-width: 100%;
}

img,
video,
canvas,
iframe {
    max-width: 100%;
    height: auto;
    overflow: hidden;
}

:root {
    --bg-primary: #0a0e27;
    --bg-secondary: #141b3d;
    --text-primary: #ffffff;
    --text-secondary: #b8b8b8;
    --accent-red: #e63946;
    --accent-blue: #3b82f6;
    --border-color: #1e2746;
    --hover-bg: #1a1f3d;
}

html {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
    height: 100%;
    background-color: #050A18;
    scrollbar-gutter: stable;
}

/* Hide native scrollbar on html completely */
html::-webkit-scrollbar {
    display: none !important;
    width: 0px !important;
}

html {
    -ms-overflow-style: none !important;
    scrollbar-width: none !important;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #050a18;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
    position: relative;
    scrollbar-gutter: stable;
}

body.dashboard-page-active .categories-section,
body.dashboard-page-active .date-section {
    display: none !important;
}

body.settings-page-active .categories-section,
body.settings-page-active .date-section {
    display: none !important;
}

body.affiliate-page-active .categories-section,
body.affiliate-page-active .date-section {
    display: none !important;
}

body.ticker-active .main-content {
    padding-bottom: 4.5rem;
}

/* Hide native scrollbar completely - we use custom scrollbar */
body::-webkit-scrollbar {
    display: none !important;
    width: 0px !important;
}

body {
    -ms-overflow-style: none !important;
    scrollbar-width: none !important;
}

/* Ensure body is still scrollable and receives scroll events */
body {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    height: auto;
    min-height: 100vh;
}

/* Ensure document can scroll */
html, body {
    scroll-behavior: auto;
}

/* Custom scrollbar container for fixed thumb height */
.custom-scrollbar-container {
    position: fixed;
    right: 0;
    top: 0;
    width: 6px;
    height: 100vh;
    background: #050a18;
    z-index: 9999;
    pointer-events: none;
    display: block !important;
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1; /* Visible by default on desktop */
}

.custom-scrollbar-thumb {
    position: absolute;
    right: 0;
    top: 0;
    width: 6px;
    background: #94a3b8;
    border-radius: 6px;
    max-height: 70px;
    min-height: 20px;
    pointer-events: all;
    cursor: grab;
    transition: background 0.3s ease;
    will-change: transform;
    transform: translateY(0);
}

/* On mobile, completely disable all transitions during scrolling */
@media (max-width: 771px) {
    .custom-scrollbar-thumb.scrolling {
        transition: none !important;
    }
    
    .custom-scrollbar-thumb {
        transition: background 0.3s ease;
    }
}

/* Mobile: Completely hide scrollbar */
@media (max-width: 771px) {
    .custom-scrollbar-container {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }
}

.custom-scrollbar-thumb:active {
    cursor: grabbing;
}

.custom-scrollbar-thumb:hover {
    background: #cbd5e1;
}


main {
    overflow-x: hidden;
    overflow-y: visible;
    width: 100%;
    max-width: 100%;
    padding-top: 55px;
    background-color: #050A18;
}

/* Header Styles */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 99999;
    background-color: #0a1020;
    border-bottom: 1px solid var(--border-color);
    padding: 0;
    height: 55px;
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.header-container {
    max-width: 100%;
    margin: 0;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.header-nav {
    display: none;
    align-items: center;
    gap: 1.5rem;
    flex: 1;
}

.header-nav .nav-link {
    color: #e2e8f0;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.35rem 0.2rem;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}

.header-nav .nav-link.active {
    color: #ffffff;
    border-bottom-color: #e31d38;
}

@media (min-width: 772px) {
    .header-container {
        padding: 0 155px;
        max-width: 100%;
        margin: 0;
    }
}

@media (min-width: 900px) {
    .menu-toggle {
        display: none !important;
        margin: 0 !important;
    }

    .sidebar,
    .sidebar-overlay {
        display: none !important;
    }

    .header-nav {
        display: flex;
        justify-content: center;
        justify-self: center;
    }

    .header-container {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
        justify-content: initial;
        padding: 0 155px;
    }

    .logo {
        margin-right: 1.5rem;
        margin-left: 0;
        justify-self: start;
    }

    .header-actions {
        margin-left: auto;
        justify-self: end;
    }

    .header-nav .nav-link {
        border-bottom-color: transparent;
        border: none;
        transition: color 0.2s, transform 0.2s;
        background: transparent !important;
        border-radius: 0;
    }

    .header-nav .nav-link:hover {
        color: #e31d38;
        transform: scale(1.05);
        background: transparent !important;
    }

    .header-nav .nav-link.active {
        color: #e31d38;
        border-bottom-color: transparent;
        transform: scale(1.05);
        background: transparent !important;
    }

    .header-nav .nav-link,
    .header-nav .nav-link:hover,
    .header-nav .nav-link.active {
        border: none !important;
        box-shadow: none !important;
        outline: none !important;
        background: transparent !important;
    }
}

.menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    z-index: 1001;
    transition: opacity 0.2s;
    margin-left: 40px;
}

.menu-toggle:hover {
    opacity: 1;
}

.menu-toggle:hover .menu-icon {
    color: #ffffff;
}

.menu-icon {
    width: 24px;
    height: 24px;
    display: block;
    color: #cbd5e1;
    filter: none !important;
    mix-blend-mode: normal !important;
}

.logo {
    display: flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    height: 42px;
    min-width: 120px;
    position: relative;
    z-index: 10;
    visibility: visible !important;
    opacity: 1 !important;
    overflow: visible !important;
    padding: 5px 0;
}

.logo-image {
    height: 100%;
    max-height: 42px;
    width: auto;
    max-width: 190px;
    object-fit: contain;
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.1)) drop-shadow(0 0 6px rgba(255, 255, 255, 0.08)) !important;
    mix-blend-mode: normal !important;
    opacity: 1 !important;
    display: block;
    visibility: visible !important;
    -webkit-filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.1)) drop-shadow(0 0 6px rgba(255, 255, 255, 0.08)) !important;
    image-rendering: auto;
    pointer-events: none;
    overflow: visible !important;
    position: relative;
}

@media (min-width: 772px) {
    .logo {
        height: 52px;
    }
    
    .logo-image {
        max-height: 52px;
    }
}

.header-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-right: 40px;
}

.icon-btn {
    background: none;
    border: none;
    color: #cbd5e1;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: opacity 0.2s;
}

.icon-btn svg {
    color: #cbd5e1;
    stroke: #cbd5e1;
}

.icon-btn:hover {
    opacity: 1;
}

.icon-btn:hover svg {
    color: #ffffff;
    stroke: #ffffff;
}

.profile-btn {
    position: relative;
    gap: 0px !important;
    background-color: rgb(0 0 0 / 0%);
    border-radius: 25px;
    padding: 6px 10px;
    transition: background-color 0.2s;
}

.profile-btn:hover {
    background-color: rgb(255 255 255 / 0.2);
}

.profile-btn:hover svg,
.profile-btn:hover .arrow-down {
    color: #ffffff;
    stroke: #ffffff;
}

.arrow-down {
    width: 24px;
    height: 24px;
    color: #cbd5e1;
    stroke: #cbd5e1;
    margin-left: -4px;
}

.profile-btn svg:not(.arrow-down) {
    width: 24px;
    height: 24px;
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: -300px;
    top: 0;
    width: 215px;
    height: 100vh;
    background-color: #090e1d7a;
    backdrop-filter: blur(17px);
    z-index: 9999;
    transition: left 0.3s ease;
    padding: 0;
    border-right: 1px solid #222734;
    display: flex;
    flex-direction: column;
}

.sidebar.active {
    left: 0;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 10px 9px 25px;
    border-bottom: 1px solid #272c39;
}

.sidebar-title {
    color: #cbd5e1;
    font-size: 1rem;
    font-weight: 600;
}

.sidebar-close {
    background: none;
    border: none;
    color: #ffffff;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
}

.sidebar-close:hover {
    opacity: 0.7;
}

.sidebar-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    flex: 1;
    overflow-y: auto;
}

.sidebar-content .sidebar-admin-link {
    margin-top: auto;
}

.sidebar-profile {
    height: 60px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 1.5rem;
    border-top: 1px solid #272c39;
    background-color: #090e1d7a;
}

.sidebar-profile-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-red) 0%, #c1121f 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-profile-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.sidebar-profile-name {
    color: #cbd5e1;
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.sidebar-profile-badge {
    color: #94a3b8;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.2;
}

.nav-link {
    color: #cbd5e1;
    text-decoration: none;
    padding: 0.875rem 1rem;
    border-radius: 8px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border: 1px solid transparent;
    background-color: transparent;
}

.nav-link:hover {
    background-color: #475569;
    border-color: transparent;
}

.nav-link.active {
    background-color: #351224;
    border: 1px solid #e31d38;
    color: #fff;
}

.nav-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9990;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Search Overlay */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 100000;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 6rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    pointer-events: none;
}

.search-overlay::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.98), rgba(0, 0, 0, 0));
    pointer-events: none;
    z-index: 99998;
}

.search-overlay::-webkit-scrollbar {
    width: 8px;
}

.search-overlay::-webkit-scrollbar-track {
    background: #0b1222;
}

.search-overlay::-webkit-scrollbar-thumb {
    background-color: #1e293b;
    border-radius: 999px;
    border: 2px solid #0b1222;
}

.search-overlay::-webkit-scrollbar-thumb:hover {
    background-color: #334155;
}

.search-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    display: flex;
}

.search-container {
    width: 90%;
    max-width: 600px;
    position: relative;
    margin: 0 auto;
    top: 0;
    z-index: 100001;
}

.search-input {
    width: 100%;
    padding: 1.5rem;
    font-size: 1.5rem;
    background-color: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    outline: none;
}

.search-input:focus {
    border-color: var(--accent-red);
}

.search-close {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 2rem;
    cursor: pointer;
    padding: 0.5rem;
}

.search-results {
    width: 90%;
    max-width: 1100px;
    margin: 2rem auto 3rem;
    position: relative;
    z-index: 100000;
    padding-bottom: 1rem;
    display: block;
}


@media (min-width: 772px) {
    .search-container {
        position: sticky;
        top: -75px;
    }
}

.search-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    z-index: 100000;
}

.search-results .article-card {
    height: 100%;
}

.search-results .article-card:hover {
    border-color: #e31d38;
    box-shadow: 0 0 0 1px rgba(227, 29, 56, 0.4);
}

@media (max-width: 771px) {
    .search-overlay {
        padding-top: 0;
        align-items: stretch;
        overflow: hidden;
        height: 100vh;
        min-height: 100vh;
    }

    .search-overlay::before {
        z-index: 0;
    }

    .search-container {
        position: sticky;
        top: 0;
        width: 100%;
        max-width: none;
        padding: 1rem 1rem 0.75rem;
        background-color: #0a1020;
        border-bottom: none;
        display: flex;
        align-items: center;
        gap: 0.75rem;
        z-index: 100002;
    }

    .search-input {
        flex: 1;
        padding: 1rem 1.25rem;
        font-size: 1.1rem;
        background-color: transparent;
    }

    .search-close {
        position: static;
        transform: none;
        padding: 0.25rem;
    }

    .search-results {
        position: relative;
        width: 100%;
        max-width: none;
        margin-top: 0;
        padding: 0.75rem 1rem 1.5rem;
        box-sizing: border-box;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        z-index: 100001;
        display: block;
        visibility: visible;
        background-color: rgba(10, 16, 32, 0.92);
        pointer-events: auto;
        flex: 1;
    }

    .search-results::before {
        content: '';
        position: absolute;
        inset: 0;
        background-color: rgba(10, 16, 32, 0.92);
        z-index: -1;
    }

    .search-results-grid {
        grid-template-columns: 1fr;
        position: relative;
        z-index: 100001;
    }

    .search-results .article-card {
        flex-direction: row;
        align-items: stretch;
        gap: 0.75rem;
        position: relative;
        padding: 0;
        min-height: 90px;
    }

    .search-results .article-image-wrapper {
        width: 110px;
        height: 90px;
        flex-shrink: 0;
        border-radius: 0.5rem 0 0 0.5rem;
        padding-left: 28px;
    }

    .search-results .article-category-tag {
        top: 0;
        left: 0;
        bottom: 0;
        height: 100%;
        width: 22px;
        display: flex;
        align-items: center;
        justify-content: center;
        writing-mode: vertical-rl;
        text-orientation: mixed;
        padding: 0;
        font-size: 0.6rem;
        border-radius: 0.5rem 0 0 0.5rem;
        letter-spacing: 0.3px;
        white-space: nowrap;
    }

    .search-results .article-headline {
        font-size: 0.9rem;
    }

    .search-results .article-content {
        padding: 0.5rem 0.6rem;
    }

    .search-results .article-excerpt {
        display: none;
    }

    .search-results .article-headline {
        font-size: 0.85rem;
        line-height: 1.2;
        max-height: 2.4em;
        overflow: hidden;
    }

    .search-results .article-meta {
        font-size: 0.7rem;
    }
}

.search-empty {
    color: #94a3b8;
    text-align: center;
    margin-top: 1.5rem;
}

/* Main Content */
.main-content {
    max-width: 100%;
    margin: 0;
    padding: 4.5rem 1.5rem;
    overflow-x: visible;
    overflow-y: visible;
    width: 100%;
    box-sizing: border-box;
}

@media (min-width: 772px) {
    .main-content {
        padding: 4.5rem 155px;
        max-width: 100%;
        margin: 0;
    }
}

/* Categories Section */
.categories-section {
    margin-top: -0.5rem;
    margin-bottom: 8px;
    padding: 5px 0 1rem 0;
    overflow-x: visible;
    overflow-y: visible;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    border-bottom: 1px solid rgb(255 255 255 / 0.1);
}

@media (min-width: 772px) {
    .categories-section {
        width: calc(100% + 310px);
        max-width: calc(100% + 310px);
        margin-left: -155px;
        margin-right: -155px;
        padding-left: 0;
        padding-right: 0;
        margin-top: -18px;
        margin-bottom: 8px;
        padding: 5px 0 4px 0;
    }
}

.categories-container {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 1rem;
    position: relative;
    padding: 0 40px;
    padding-left: 80px;
    overflow-x: visible;
    overflow-y: visible;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

@media (min-width: 772px) {
    .categories-container {
        padding: 0 155px;
        padding-left: 155px;
    }
}

.categories-wrapper {
    display: flex;
    align-items: center;
    flex: 1;
    position: relative;
    overflow-x: visible;
    overflow-y: hidden;
    min-height: 50px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.categories-scroll {
    display: flex;
    gap: 0.75rem;
    flex: 1;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0.25rem 0;
    padding-left: 2rem;
    padding-right: 2rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    width: 100%;
    scroll-snap-type: x proximity;
    overscroll-behavior-x: contain;
    scroll-padding: 0;
    will-change: scroll-position;
}

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

.categories-fade-left,
.categories-fade-right {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 60px;
    pointer-events: none;
    z-index: 100;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: 100%;
    min-height: 50px;
}

.categories-fade-left {
    left: 0;
    background: linear-gradient(to right, #050a18 0%, rgba(5, 10, 24, 0.8) 50%, transparent 100%);
}

.categories-fade-right {
    right: 0;
    background: linear-gradient(to left, #050a18 0%, rgba(5, 10, 24, 0.8) 50%, transparent 100%);
    transform: translateX(0);
}

.trending-btn {
    background-color: transparent;
    border: 1px solid #94a3b8;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    box-shadow: none;
    position: relative;
    margin: 0;
    padding: 0;
    overflow: visible;
    transition: all 0.2s;
}

.trending-btn.active {
    background-color: rgba(227, 29, 56, 0.2);
    border: 1px solid #e31d38;
    box-shadow: 0 0 8px rgba(227, 29, 56, 0.5), 0 0 12px rgba(227, 29, 56, 0.3);
}

.trending-btn .hot-icon {
    width: 18px;
    height: 18px;
    stroke: #94a3b8;
    stroke-width: 3;
    fill: #94a3b8;
    filter: none;
    transition: stroke 0.2s, fill 0.2s, filter 0.2s;
}

.trending-btn.active .hot-icon {
    stroke: #e31d38;
    fill: #e31d38;
    filter: drop-shadow(0 0 2px rgba(227, 29, 56, 0.6));
}

.category-btn {
    background-color: transparent;
    border: 1px solid #94a3b8;
    color: #94a3b8;
    padding: 0.75rem 1.5rem;
    border-radius: 24px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.2s;
    flex-shrink: 0;
    text-transform: uppercase;
}

.category-btn:hover {
    background-color: rgba(148, 163, 184, 0.1);
    border-color: #94a3b8;
}

.category-btn.active {
    background-color: transparent;
    border-color: var(--accent-red);
    color: var(--accent-red);
}

/* Date Section */
.date-section {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 1.5rem;
    overflow-x: visible;
    overflow-y: visible;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    position: relative;
    border-bottom: 1px solid rgb(255 255 255 / 0.1);
    padding-bottom: 0.75rem;
}

.date-wrapper {
    display: flex;
    align-items: center;
    flex: 1;
    position: relative;
    overflow-x: visible;
    overflow-y: visible;
    margin-right: 0;
}

@media (min-width: 772px) {
    .date-wrapper {
        margin-right: 60px; /* Space for calendar button (44px width + 100px from right) */
        max-width: calc(100% - 60px);
    }

    .date-section {
        padding-bottom: 8px;
    }
}

.date-container {
    display: flex;
    gap: 0.5rem;
    flex: 1;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    user-select: none;
    scroll-snap-type: x proximity;
    overscroll-behavior-x: contain;
    will-change: scroll-position;
    padding-left: 1rem;
    padding-right: 1rem;
}

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

.date-container {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.date-fade-left,
.date-fade-right {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 60px;
    pointer-events: none;
    z-index: 10;
    display: block;
    visibility: visible;
    opacity: 1;
}

.date-fade-left {
    left: 0;
    background: linear-gradient(to right, #050a18 0%, rgba(5, 10, 24, 0.8) 50%, transparent 100%);
}

.date-fade-right {
    right: 0;
    background: linear-gradient(to left, #050a18 0%, rgba(5, 10, 24, 0.8) 50%, transparent 100%);
    transform: translateX(0);
}

.date-btn {
    background-color: transparent;
    border: 1px dashed #94a3b8;
    color: #ffffff;
    padding: 0.375rem 0.625rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    white-space: nowrap;
    transition: all 0.2s;
    flex-shrink: 0;
    min-width: 60px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.125rem;
}

.date-btn:hover {
    background-color: transparent;
    border-color: #94a3b8;
}

.date-btn.active {
    background-color: transparent;
    border: 1px solid #e31d38;
    box-shadow: 0 0 0 1px rgba(227, 29, 56, 0.35);
}

.date-btn.past-date {
    border: 1px dashed #94a3b8;
}

.date-btn.past-date.active {
    border: 1px solid #e31d38;
}

.date-btn .day {
    display: block;
    font-weight: 400;
    font-size: 0.7rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    line-height: 1.2;
}

.current-date-dot {
    display: inline-block;
    width: 5px;
    height: 5px;
    background-color: #e31d38;
    border-radius: 50%;
    margin-left: 3px;
    vertical-align: middle;
    animation: pulseDot 2s ease-in-out infinite;
}

@keyframes pulseDot {
    0%, 100% {
        background-color: #e31d38;
        transform: scale(1);
        opacity: 1;
    }
    50% {
        background-color: #ff0000;
        transform: scale(1.2);
        opacity: 1;
    }
}

.date-btn .date {
    display: block;
    font-weight: 700;
    font-size: 0.9rem;
    color: #ffffff;
    margin-top: 0;
    line-height: 1.2;
}

.calendar-btn {
    background-color: transparent;
    border: 1px solid #94a3b8;
    color: #94a3b8;
    padding: 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    margin-left: 0;
    position: absolute;
    right: 0;
    z-index: 10;
}

@media (min-width: 772px) {
    .calendar-btn {
        /* right: 100px; */
    }
}

.calendar-btn:hover {
    background-color: transparent;
    border-color: #94a3b8;
}

.calendar-btn.active {
    background-color: rgba(227, 29, 56, 0.2);
    border: 1px solid #e31d38;
    box-shadow: 0 0 8px rgba(227, 29, 56, 0.5), 0 0 12px rgba(227, 29, 56, 0.3);
}

.calendar-icon {
    width: 18px;
    height: 18px;
    color: #94a3b8;
    stroke: #94a3b8;
    transition: all 0.2s;
}

.calendar-btn:hover .calendar-icon {
    color: #ffffff;
    stroke: #ffffff;
}

.calendar-btn.active .calendar-icon {
    color: #e31d38;
    stroke: #e31d38;
    filter: drop-shadow(0 0 2px rgba(227, 29, 56, 0.6));
}

/* Content Wrapper */
.content-wrapper {
    min-height: 60vh;
    background-color: #050A18;
}

/* Latest News Section */
.latest-news-section {
    width: 100%;
    max-width: 100%;
}

.latest-news-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 2rem;
    width: 100%;
    max-width: 100%;
}

.affiliate-section .latest-news-header {
    align-items: center;
}

.affiliate-wallet {
    margin-left: auto;
}

.affiliate-wallet-field {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.4rem 0.5rem;
    border-radius: 10px;
}

.wallet-input {
    background-color: #0f172a;
    border: 1px solid #94a3b8;
    border-radius: 8px;
    padding: 0.4rem 0.5rem;
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

.affiliate-wallet-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background-color: #e31d38;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #0a1020;
    font-size: 0.95rem;
}

.affiliate-wallet-value {
    font-weight: 700;
    color: #e2e8f0;
    font-size: 1rem;
}

.red-bar {
    width: 4px;
    height: 40px;
    background-color: var(--accent-red);
    border-radius: 2px;
    flex-shrink: 0;
    margin-top: 0;
}

.latest-news-title-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.05rem;
}

.latest-news-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
}

.article-count {
    color: #94a3b8;
    font-size: 0.875rem;
    font-weight: 600;
}

/* Featured Article */
.featured-article {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 3rem;
    min-height: 500px;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    width: 100%;
    max-width: 100%;
}

.featured-image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 500px;
}

.featured-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    position: absolute;
    top: 0;
    left: 0;
}

.featured-overlay {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.5) 50%, transparent 100%);
    padding: 2rem;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.featured-tags {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0;
    flex-wrap: wrap;
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    z-index: 2;
}

.tag {
    padding: 0.5rem 1rem;
    border-radius: 7px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.tag.top-story {
    background-color: #e31d38;
    color: #ffffff;
    box-shadow: 0 0 8px rgba(227, 29, 56, 0.5);
}

.tag.category {
    background-color: #3b82f6;
    color: #ffffff;
}

.featured-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.featured-headline {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
    color: #ffffff;
}

.featured-excerpt-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.featured-vertical-stroke {
    width: 3px;
    height: 1.6em;
    background-color: #e31d38;
    flex-shrink: 0;
    margin-top: 0.2em;
    border-radius: 2px;
}

.featured-description {
    font-size: 1rem;
    color: #ffffff;
    margin: 0;
    line-height: 1.6;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
    flex: 1;
}

.featured-footer-mobile {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}


.time-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #e31d38;
    font-size: 0.75rem;
    font-weight: 700;
}

.time-indicator i {
    color: #e31d38;
    font-size: 0.875rem;
}

.time-text {
    color: #ffffff;
    font-weight: 700;
}

.read-story-btn {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 0.75rem 1.5rem;
    border-radius: 24px;
    cursor: pointer;
    font-weight: 700;
    font-size: 2.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.read-story-btn i {
    font-size: 0.9em;
}
    gap: 0.5rem;
    transition: all 0.2s;
    backdrop-filter: blur(10px);
}

.read-story-btn:hover {
    background-color: var(--accent-red);
    border-color: var(--accent-red);
    box-shadow: 0 0 20px rgba(230, 57, 70, 0.5);
}

/* Articles Grid */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

@media (min-width: 772px) {
    .latest-news-header {
        align-items: flex-start;
    }

    .red-bar {
        height: auto;
        align-self: stretch;
    }

    .articles-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
        justify-content: flex-start;
        width: 100%;
        max-width: 100%;
    }
    
    .article-card {
        width: 100%;
        max-width: 100%;
    }

    .read-story-btn {
        background-color: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
        color: #ffffff;
        padding: 0.75rem 1.5rem;
        border-radius: 24px;
        cursor: pointer;
        font-weight: 400;
        font-size: 17px;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
}

/* Saved Article Bookmark Button */
.saved-article-bookmark-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
    padding: 0;
}

.saved-article-bookmark-btn:hover {
    background-color: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

.saved-article-bookmark-btn svg {
    width: 20px;
    height: 20px;
}

.featured-bookmark-btn {
    width: 40px;
    height: 40px;
    top: 16px;
    right: 16px;
}

.featured-bookmark-btn svg {
    width: 24px;
    height: 24px;
}

.article-card {
    background-color: #0f172a;
    border-radius: 0.5rem;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    border: 1px solid #1e293b;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: none;
    box-shadow: none;
    border-color: #1e293b;
}

.article-image-wrapper {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: 0.5rem 0.5rem 0 0;
}

.article-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
}

.article-category-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    background-color: #3b82f6;
    color: #ffffff;
    padding: 0.375rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

.article-content {
    padding: 1rem;
    background-color: transparent;
}

.article-headline {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    color: #ffffff;
}

.article-excerpt {
    color: #94a3b8;
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.article-divider {
    width: 100%;
    height: 1px;
    background-color: #1e293b;
    margin-bottom: 0.75rem;
}

.article-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #94a3b8;
}

.article-source {
    color: #94a3b8;
}

.article-date {
    color: #94a3b8;
}

/* Loading State */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    font-size: 1.5rem;
    color: var(--text-secondary);
}

.loading::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.empty-state h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* Responsive Design */
@media (max-width: 771px) {
    html, body {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .sidebar {
        width: 230px;
        left: -230px;
    }

    .header {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .header-container {
        padding: 0 0.25rem !important;
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100% !important;
        position: relative;
    }

    .menu-toggle {
        margin-left: 0.25rem !important;
        position: relative;
        z-index: 2;
    }

    .header-actions {
        margin-right: 0.25rem !important;
        position: relative;
        z-index: 2;
    }

    .logo {
        height: 47px;
        width: 100%;
        min-width: 100%;
        justify-content: center;
        position: absolute;
        left: 0;
        right: 0;
        z-index: 1;
        margin: 0;
    }
    
    .logo-image {
        max-height: 47px !important;
        height: 47px !important;
        width: auto;
        max-width: 235px !important;
    }

    .main-content {
        padding: 4.1rem 8px;
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .latest-news-header {
        align-items: flex-start;
    }

    .red-bar {
        height: auto;
        align-self: stretch;
        margin-top: 0;
    }

    .latest-news-title {
        font-size: 1.5rem;
    }

    .latest-news-title-wrapper {
        gap: 0;
    }

    .featured-headline {
        font-size: 1.75rem;
    }

    .categories-section {
        padding: 0 2px !important;
        overflow-x: visible !important;
        overflow-y: visible !important;
        position: relative !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .categories-container {
        padding: 0 2px !important;
        padding-left: 20px !important;
        overflow-x: visible !important;
        overflow-y: visible !important;
        position: relative !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .trending-btn {
        overflow: visible !important;
        margin: 0 !important;
        margin-left: 8px !important;
        padding: 0 !important;
    }

    .categories-wrapper {
        overflow-x: visible !important;
        overflow-y: hidden !important;
        position: relative !important;
        width: 100% !important;
        max-width: 100% !important;
        min-height: 50px;
    }

    .categories-scroll {
        gap: 0.5rem;
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    .categories-fade-left,
    .categories-fade-right {
        width: 30px !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: absolute !important;
        height: 100% !important;
        min-height: 50px !important;
        top: 0 !important;
        bottom: 0 !important;
        z-index: 100 !important;
    }

    .categories-fade-left {
        left: 0 !important;
        background: linear-gradient(to right, #050a18 0%, rgba(5, 10, 24, 0.8) 50%, transparent 100%) !important;
    }

    .categories-fade-right {
        right: 0 !important;
        background: linear-gradient(to left, #050a18 0%, rgba(5, 10, 24, 0.8) 50%, transparent 100%) !important;
    }

    .featured-article {
        min-height: 400px;
    }

    .featured-overlay {
        padding: 1.5rem;
        justify-content: flex-end;
    }

    .featured-tags {
        top: 10px;
        left: 10px;
        margin-bottom: 0;
    }

    .featured-headline {
        font-size: 1.75rem;
        margin-top: 0;
    }

    .featured-description {
        -webkit-line-clamp: 2;
        font-size: 0.875rem;
    }

    .featured-excerpt-wrapper {
        gap: 0.75rem;
        margin-bottom: 0.75rem;
    }

    .featured-vertical-stroke {
        height: calc(0.875rem * 1.6 * 2 - 0.5rem);
        align-self: flex-start;
    }

    .featured-description {
        -webkit-line-clamp: 2;
        font-size: 0.875rem;
    }

    .featured-footer-mobile {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        flex-wrap: nowrap;
    }

    .featured-meta {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        flex-shrink: 0;
    }

    .read-story-btn {
        font-size: 1.75rem;
        padding: 0.625rem 1.25rem;
        margin: 0;
        flex-shrink: 0;
    }

    .featured-content {
        gap: 0.75rem;
    }

    .articles-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .category-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }

    .date-btn {
        padding: 0.25rem 0.5rem;
        min-width: 55px;
    }

    .date-btn .day {
        font-size: 0.65rem;
        line-height: 1;
        margin-bottom: 0;
    }

    .date-btn .date {
        font-size: 0.875rem;
        line-height: 1;
        margin-top: 0;
    }

    .date-section {
        margin-bottom: 1rem;
        padding-bottom: 0.5rem;
    }

    .date-container {
        gap: 0.375rem !important;
    }

    .date-wrapper {
        overflow-x: visible !important;
        overflow-y: visible !important;
        position: relative !important;
        width: 100% !important;
        max-width: calc(100% - 60px) !important;
        margin-right: 60px !important;
    }

    .date-container {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    .date-fade-left,
    .date-fade-right {
        width: 30px !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: absolute !important;
        height: 100% !important;
        top: 0 !important;
        bottom: 0 !important;
        z-index: 100 !important;
    }

    .date-fade-left {
        left: 0 !important;
        background: linear-gradient(to right, #050a18 0%, rgba(5, 10, 24, 0.8) 50%, transparent 100%) !important;
    }

    .date-fade-right {
        right: 0 !important;
        background: linear-gradient(to left, #050a18 0%, rgba(5, 10, 24, 0.8) 50%, transparent 100%) !important;
    }
}

@media (max-width: 480px) {
    html, body {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .featured-headline {
        font-size: 1.5rem;
    }

    .featured-description {
        font-size: 0.875rem;
    }

    .read-story-btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }

    .article-count {
        display: block;
    }

    .categories-section {
        padding: 0 2px !important;
        overflow-x: visible !important;
        overflow-y: visible !important;
        position: relative !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .categories-container {
        padding: 0 2px !important;
        padding-left: 30px !important;
        overflow-x: visible !important;
        overflow-y: visible !important;
        position: relative !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .trending-btn {
        margin-left: 15px !important;
    }
    
    .trending-btn {
        overflow: visible !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .categories-wrapper {
        overflow-x: visible !important;
        overflow-y: hidden !important;
        position: relative !important;
        width: 100% !important;
        max-width: 100% !important;
        min-height: 50px;
    }

    .categories-fade-left,
    .categories-fade-right {
        width: 20px !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: absolute !important;
        height: 100% !important;
        min-height: 50px !important;
        top: 0 !important;
        bottom: 0 !important;
        z-index: 100 !important;
    }

    .categories-fade-left {
        left: 0 !important;
        background: linear-gradient(to right, #050a18 0%, rgba(5, 10, 24, 0.8) 50%, transparent 100%) !important;
    }

    .categories-fade-right {
        right: 0 !important;
        background: linear-gradient(to left, #050a18 0%, rgba(5, 10, 24, 0.8) 50%, transparent 100%) !important;
    }
}

@media (max-width: 500px) {
    .categories-container {
        padding: 0 7px !important;
        overflow-x: visible !important;
        overflow-y: hidden !important;
        position: relative !important;
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* Fade in animation for content */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Login Modal */
.login-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.login-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.login-modal {
    background-color: #0a1020;
    border: 1px solid #1e293b;
    border-radius: 16px;
    padding: 2.5rem;
    max-width: 450px;
    width: 90%;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.login-modal-overlay.active .login-modal {
    transform: scale(1);
}

/* Payment Modal */
.payment-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.payment-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.payment-modal {
    background-color: #0a1020;
    border: 1px solid #1e293b;
    border-radius: 16px;
    padding: 2.5rem;
    max-width: 500px;
    width: 90%;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.pwa-modal {
    max-width: 480px;
}

.pwa-modal-body {
    display: grid;
    gap: 1rem;
    text-align: center;
}

.pwa-modal-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background-color: #0f172a;
    border: 1px solid #1e293b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.pwa-modal-icon img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.pwa-modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.pwa-cancel-btn {
    background-color: #0b1222;
    border: 1px solid #1e293b;
}

.payment-modal-overlay.active .payment-modal {
    transform: scale(1);
}

/* Splash Screen */
.splash-overlay {
    position: fixed;
    inset: 0;
    background-color: #0a1020;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    z-index: 120000;
}

.splash-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

.splash-overlay.is-fading {
    opacity: 0;
    visibility: hidden;
}

.splash-content {
    display: flex;
    align-items: center;
    justify-content: center;
}

.splash-content img {
    max-width: 240px;
    max-height: 240px;
    width: 60vw;
    height: auto;
}

.payment-methods {
    display: grid;
    gap: 0.75rem;
    margin-top: 1.25rem;
    justify-items: center;
}

.payment-method-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    border: 1px solid #1e293b;
    background-color: #0f172a;
    color: #e2e8f0;
    text-decoration: none;
    transition: border-color 0.2s, background-color 0.2s, transform 0.2s;
    width: 300px;
}

.payment-price-badge {
    position: absolute;
    top: -33px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #e31d38;
    color: #ffffff;
    font-weight: 700;
    font-size: 1rem;
    padding: 0.55rem 1.2rem;
    letter-spacing: 0.02em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    flex-direction: column;
    gap: 0.1rem;
}

.payment-price-badge small {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    opacity: 0.9;
}

.payment-settings-list {
    display: grid;
    gap: 1rem;
}

.payment-settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.5rem 0;
}

.toggle-switch {
    position: relative;
    width: 48px;
    height: 26px;
    display: inline-block;
    cursor: pointer;
    pointer-events: auto;
    z-index: 1;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #1e293b;
    border-radius: 999px;
    transition: background-color 0.2s;
    pointer-events: none;
}

.toggle-slider::before {
    content: "";
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    top: 3px;
    background-color: #94a3b8;
    border-radius: 50%;
    transition: transform 0.2s, background-color 0.2s;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: rgba(227, 29, 56, 0.4);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(22px);
    background-color: #e31d38;
}

.payment-method-card img {
    width: 85px;
    height: 40px;
    object-fit: contain;
    background-color: #ffffff;
    border-radius: 6px;
    padding: 8px 6px;
}

.payment-method-card:hover {
    border-color: #e31d38;
    background-color: #111827;
    transform: translateY(-1px);
}

@media (max-width: 771px) {
    .payment-method-card {
        display: flex;
        align-items: center;
        gap: 1rem;
        padding: 0.75rem 1rem;
        border-radius: 12px;
        border: 1px solid #1e293b;
        background-color: #0f172a;
        color: #e2e8f0;
        text-decoration: none;
        transition: border-color 0.2s, background-color 0.2s, transform 0.2s;
        width: 244px;
    }
}

.media-picker {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.media-preview {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 12px;
    border: 1px solid #1e293b;
    background-color: #0f172a;
    color: #94a3b8;
}

.media-preview img {
    width: 64px;
    height: 40px;
    object-fit: contain;
    background-color: #ffffff;
    border-radius: 6px;
    padding: 6px;
    display: none;
}

.media-preview.has-image img {
    display: block;
}

.media-preview.has-image span {
    display: none;
}

.affiliate-section .latest-news-title {
    font-size: 2rem;
}

.affiliate-grid {
    display: grid;
    gap: 1.25rem;
}

.affiliate-hero-card,
.affiliate-stat-card,
.affiliate-share-card,
.affiliate-tabs-card {
    background-color: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 18px;
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.35);
}

.affiliate-hero-card {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 1.5rem;
    padding: 1.75rem;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.5));
}

.affiliate-hero-content h2 {
    font-size: 1.75rem;
    margin: 0 0 0.5rem 0;
}

.affiliate-hero-content p {
    color: #94a3b8;
    margin: 0;
}

.affiliate-hero-media {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.affiliate-hero-image {
    width: 200px;
    height: 160px;
    border-radius: 18px;
    background: url("/media/refer-friend.webp") center/cover no-repeat;
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.35), 0 20px 40px rgba(0, 0, 0, 0.4);
}

.affiliate-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.affiliate-stat-card {
    padding: 1.25rem;
    display: grid;
    gap: 0.5rem;
}

.affiliate-stat-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(227, 29, 56, 0.18);
    color: #e31d38;
    font-size: 1.05rem;
}

.affiliate-stat-value {
    font-size: 1.35rem;
    font-weight: 700;
}

.affiliate-stat-label {
    color: #94a3b8;
    font-size: 0.85rem;
}

.affiliate-share-card {
    padding: 1.25rem;
}

.affiliate-status-card {
    background-color: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 16px;
    padding: 1.25rem;
    display: grid;
    gap: 0.75rem;
}

.affiliate-status-card h3 {
    margin: 0;
    color: #f8fafc;
    font-size: 1.1rem;
}

.affiliate-status-card p {
    margin: 0;
    color: #94a3b8;
    font-size: 0.9rem;
}

.affiliate-action-btn {
    background-color: #e31d38;
    color: #ffffff;
    border: none;
    border-radius: 999px;
    padding: 0.7rem 1.4rem;
    font-weight: 600;
    cursor: pointer;
    width: fit-content;
    transition: transform 0.2s, box-shadow 0.2s;
}

.affiliate-action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(227, 29, 56, 0.3);
}

.affiliate-action-btn:disabled {
    opacity: 0.7;
    cursor: default;
    transform: none;
    box-shadow: none;
}

.affiliate-share-card h3 {
    margin: 0 0 0.85rem 0;
}

.affiliate-share-input {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #0b1222;
    border-radius: 12px;
    border: 1px solid #1e293b;
    padding: 0.85rem 1rem;
    gap: 1rem;
}

.affiliate-share-input span {
    color: #e2e8f0;
    font-size: 0.9rem;
    word-break: break-all;
}

.affiliate-copy-btn {
    border: none;
    background-color: rgba(227, 29, 56, 0.15);
    color: #e31d38;
    border-radius: 10px;
    padding: 0.55rem 0.8rem;
    cursor: pointer;
}

.affiliate-copy-btn.copied {
    background-color: #16a34a;
    color: #ffffff;
}

.affiliate-tabs-card {
    padding: 1.25rem;
}

.affiliate-tabs {
    display: inline-flex;
    gap: 0.35rem;
    background-color: #0b1222;
    border-radius: 999px;
    padding: 0.35rem;
    border: 1px solid #1e293b;
    position: relative;
    z-index: 2;
}

.affiliate-tab {
    background: transparent;
    border: none;
    color: #94a3b8;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.8rem;
}

.affiliate-tab.active {
    background: #1f2937;
    color: #e2e8f0;
}

.affiliate-chart {
    height: 170px;
    margin-top: 1.25rem;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.35), rgba(5, 10, 24, 0.85));
    position: relative;
    overflow: hidden;
}

.affiliate-chart canvas {
    width: 100% !important;
    height: 100% !important;
}

.affiliate-demo-grid {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.affiliate-demo-card {
    background-color: #0b1222;
    border-radius: 14px;
    border: 1px solid #1e293b;
    padding: 0.85rem 1rem;
    display: grid;
    gap: 0.35rem;
}

.affiliate-demo-label {
    color: #94a3b8;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.affiliate-demo-value {
    font-size: 1rem;
    font-weight: 700;
    color: #e2e8f0;
}

.affiliate-panels-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.affiliate-panel-card {
    background-color: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 16px;
    padding: 1.25rem;
    display: grid;
    gap: 1rem;
}

.affiliate-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.affiliate-panel-header h3 {
    margin: 0;
    font-size: 1rem;
    color: #f8fafc;
}

.affiliate-panel-badge {
    background-color: rgba(227, 29, 56, 0.16);
    color: #e31d38;
    border-radius: 999px;
    padding: 0.2rem 0.7rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.affiliate-panel-list {
    display: grid;
    gap: 0.6rem;
}

.affiliate-list-item {
    background-color: #0b1222;
    border: 1px solid #1e293b;
    border-radius: 12px;
    padding: 0.75rem 0.9rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.affiliate-list-meta {
    display: grid;
    gap: 0.2rem;
}

.affiliate-list-title {
    font-size: 0.9rem;
    color: #e2e8f0;
    font-weight: 600;
}

.affiliate-list-subtitle {
    font-size: 0.75rem;
    color: #94a3b8;
}

.affiliate-list-amount {
    font-weight: 700;
    color: #e2e8f0;
    font-size: 0.9rem;
}

.affiliate-empty-state {
    margin: 0;
    color: #94a3b8;
    font-size: 0.85rem;
}

.affiliate-payout-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.affiliate-summary-label {
    display: block;
    color: #94a3b8;
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
}

.affiliate-summary-value {
    font-weight: 700;
    color: #e2e8f0;
    font-size: 1rem;
}

@media (max-width: 900px) {
    .affiliate-hero-card {
        grid-template-columns: 1fr;
    }

    .affiliate-hero-media {
        justify-content: center;
    }
}

@media (max-width: 771px) {
    .affiliate-hero-card {
        padding: 1.5rem;
    }

    .affiliate-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 0.85rem;
    }

    .affiliate-demo-grid {
        grid-template-columns: 1fr;
    }

    .affiliate-panels-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .affiliate-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 0.85rem;
    }
}
.media-modal {
    max-width: 760px;
}

.media-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.media-modal-header .login-modal-title,
.media-modal-header .login-modal-subtitle {
    text-align: left;
}

.media-modal-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.media-set-btn {
    padding: 0.6rem 1.25rem;
}

.media-library-canvas {
    background-color: #070b16;
    border: 1px solid #0f172a;
    border-radius: 16px;
    padding: 1.25rem;
}

.media-library-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
}

.splash-color-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.splash-color-picker {
    max-width: 120px;
    height: 44px;
    padding: 0.35rem;
}

.media-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid #1e293b;
    background-color: #0f172a;
    color: #e2e8f0;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s, transform 0.2s;
}

.media-card img {
    width: 100%;
    height: 90px;
    object-fit: contain;
    background-color: #ffffff;
    border-radius: 8px;
    padding: 8px;
}

.media-card span {
    font-size: 0.75rem;
    color: #94a3b8;
    text-align: center;
}

.media-card:hover {
    border-color: #e31d38;
    background-color: #111827;
    transform: translateY(-1px);
}

.media-card.is-selected {
    border-color: #e31d38;
    box-shadow: 0 0 0 2px rgba(227, 29, 56, 0.25);
}

.login-modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background-color: #1e293b;
    border: none;
    border-radius: 50%;
    color: #94a3b8;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
    z-index: 10;
    width: 32px;
    height: 32px;
}

.login-modal-close:hover {
    opacity: 0.7;
}

.login-modal-close svg {
    width: 20px;
    height: 20px;
    stroke: #94a3b8;
}

.login-modal-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    margin-top: 0;
    text-align: center;
}

@media (max-width: 771px) {
    .login-modal-title {
        font-size: 26px;
        font-weight: 700;
        color: var(--text-primary);
        margin-bottom: 0.5rem;
        margin-top: 0;
        text-align: center;
    }
}

.login-modal-subtitle {
    font-size: 1rem;
    color: #94a3b8;
    margin-bottom: 2rem;
    line-height: 1.5;
    text-align: center;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input {
    background-color: #0f172a !important;
    border: 1px solid #94a3b8;
    border-radius: 8px;
    padding: 0.875rem 1rem;
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
    width: 100%;
}

.form-input::placeholder {
    color: #94a3b8;
}

.form-input:focus {
    border-color: var(--accent-red);
}

.form-input:-webkit-autofill,
.form-input:-webkit-autofill:hover,
.form-input:-webkit-autofill:focus,
.form-input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #0f172a inset !important;
    -webkit-text-fill-color: var(--text-primary) !important;
    background-color: #0f172a !important;
}

.form-input:-moz-autofill {
    background-color: #0f172a !important;
    color: var(--text-primary) !important;
}

.login-submit-btn {
    background-color: var(--accent-red);
    color: var(--text-primary);
    border: none;
    border-radius: 8px;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    margin-top: 0.5rem;
}

.login-submit-btn:hover {
    background-color: #d62839;
    transform: translateY(-1px);
}

.login-submit-btn:active {
    transform: translateY(0);
}

.login-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.login-link {
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.login-link:hover {
    color: var(--text-primary);
}

.login-link-separator {
    color: #94a3b8;
    font-size: 0.875rem;
}

/* Blur background when modal is open */
body.modal-open,
html.modal-open {
    overflow: hidden !important;
    position: fixed;
    width: 100%;
    height: 100%;
}

body.search-open,
html.search-open {
    overflow: hidden !important;
    position: static;
    width: 100%;
    height: 100%;
}

@media (max-width: 771px) {
    body.modal-open,
    html.modal-open {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        overflow: hidden !important;
        -webkit-overflow-scrolling: touch;
    }

    body.search-open,
    html.search-open {
        position: static;
        top: auto;
        left: auto;
        right: auto;
        bottom: auto;
        overflow: hidden !important;
        -webkit-overflow-scrolling: touch;
    }
}

body.modal-open .main-content,
body.modal-open .header {
    filter: blur(4px);
    transition: filter 0.3s ease;
}

body.dashboard-modal-open .main-content,
body.dashboard-modal-open .header {
    filter: none;
}

/* Calendar Modal */
.calendar-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.calendar-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.calendar-modal {
    background-color: #0a1020;
    border: 1px solid #1e293b;
    border-radius: 16px;
    padding: 1.5rem;
    max-width: 400px;
    width: 90%;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.calendar-modal-overlay.active .calendar-modal {
    transform: scale(1);
}

.calendar-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: #1e293b;
    border: none;
    border-radius: 50%;
    color: #94a3b8;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    transition: opacity 0.2s;
    z-index: 20;
}

.calendar-modal-close:hover {
    opacity: 0.7;
}

.calendar-modal-close svg {
    width: 20px;
    height: 20px;
    stroke: #94a3b8;
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-top: 0.25rem;
    position: relative;
}

.calendar-nav-btn {
    background-color: transparent;
    border: none;
    color: #ffffff;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
    border-radius: 4px;
}

.calendar-nav-btn:hover {
    opacity: 0.7;
    background-color: rgba(255, 255, 255, 0.1);
}

.calendar-nav-btn svg {
    width: 16px;
    height: 16px;
    stroke: #ffffff;
}

.calendar-month-year {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.25rem;
    margin-bottom: 0.75rem;
}

.calendar-weekday {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: #ffffff;
    padding: 0.25rem 0;
    text-transform: uppercase;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.25rem;
    margin-bottom: 1rem;
    min-height: 240px;
    transition: opacity 0.2s ease;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8125rem;
    color: #ffffff;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s;
    background-color: transparent;
    border: none;
    padding: 0;
    min-height: 32px;
}

.calendar-day:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.calendar-day.other-month {
    color: #64748b;
    opacity: 0.5;
}

.calendar-day.selected {
    background-color: #e31d38;
    color: #ffffff;
    font-weight: 700;
}

.calendar-day.today {
    border: 1px solid #e31d38;
}

.calendar-day.today.selected {
    border: none;
}

.calendar-divider {
    width: 100%;
    height: 1px;
    background-color: #1e293b;
    margin-bottom: 0.75rem;
}

.calendar-jump-today {
    width: 100%;
    background-color: transparent;
    border: none;
    color: #e31d38;
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    padding: 0.5rem;
    transition: opacity 0.2s;
    text-align: center;
}

.calendar-jump-today:hover {
    opacity: 0.8;
}

/* Mobile Login Modal Styles */
@media (max-width: 771px) {
    .login-modal-subtitle {
        font-size: 1rem;
        color: #94a3b8;
        margin-bottom: 9px;
        line-height: 1.5;
        text-align: center;
    }

    .login-form {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .form-group {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }
}

/* Profile Modal Styles */
.profile-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.profile-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.profile-modal {
    background-color: #0a1020;
    border: 1px solid #1e293b;
    border-radius: 16px;
    padding: 2.5rem;
    max-width: 450px;
    width: 90%;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.profile-modal-overlay.active .profile-modal {
    transform: scale(1);
}

.profile-modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background-color: #1e293b;
    border: none;
    border-radius: 50%;
    color: #94a3b8;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
    z-index: 10;
    width: 32px;
    height: 32px;
}

.profile-modal-close:hover {
    opacity: 0.7;
}

.profile-modal-close svg {
    width: 20px;
    height: 20px;
    stroke: #94a3b8;
}

.profile-modal-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
}

.profile-modal-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-red) 0%, #c1121f 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 700;
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.profile-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    margin-top: 0.5rem;
}

.profile-modal-subtitle {
    font-size: 1rem;
    color: #94a3b8;
    margin: 0;
}

.profile-modal-badge {
    display: inline-block;
    background-color: #1e293b;
    color: #94a3b8;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0.5rem 0;
}

.profile-logout-btn {
    width: 100%;
    background-color: var(--accent-red);
    border: none;
    border-radius: 8px;
    color: var(--text-primary);
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: background-color 0.2s, transform 0.1s;
    margin-top: 1rem;
}

.profile-logout-btn:hover {
    background-color: #d62839;
    transform: translateY(-1px);
}

.profile-logout-btn:active {
    transform: translateY(0);
}

.profile-logout-btn svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

/* Share Article Modal Styles */
.share-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.share-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.share-modal {
    background-color: #0a1020;
    border: 1px solid #1e293b;
    border-radius: 16px;
    padding: 2.5rem;
    max-width: 450px;
    width: 90%;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.share-modal-overlay.active .share-modal {
    transform: scale(1);
}

.share-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.share-modal-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    text-align: left;
}

.share-modal-close {
    position: relative;
    top: 0;
    right: 0;
    background-color: #1e293b;
    border: none;
    border-radius: 50%;
    color: #94a3b8;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
    z-index: 10;
    width: 32px;
    height: 32px;
}

.share-modal-close:hover {
    opacity: 0.7;
}

.share-modal-close svg {
    width: 20px;
    height: 20px;
    stroke: #94a3b8;
}

.share-article-preview {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background-color: #0f172a;
    border-radius: 8px;
    border: 1px solid #1e293b;
}

.share-article-thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.share-article-heading {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.4;
    flex: 1;
}

.share-via-section {
    margin-bottom: 1.5rem;
}

.share-via-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
    text-align: left;
}

.share-social-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

.share-social-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #0f172a;
    border: 1px solid #1e293b;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1.25rem;
}

.share-social-icon:hover {
    background-color: #1e293b;
    border-color: #94a3b8;
    transform: translateY(-2px);
}

.share-social-icon i {
    color: #ffffff;
}

.share-copy-link-btn {
    width: 100%;
    background-color: var(--accent-red);
    color: var(--text-primary);
    border: none;
    border-radius: 8px;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    margin-top: 0.5rem;
}

.share-copy-link-btn:hover {
    background-color: #d62839;
    transform: translateY(-1px);
}

.share-copy-link-btn:active {
    transform: translateY(0);
}

.news-ticker {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 30px;
    background-color: #e31d38;
    color: #ffffff;
    display: none;
    align-items: center;
    overflow: hidden;
    z-index: 9998;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    line-height: 1;
}

body.ticker-active .news-ticker {
    display: flex;
}

.news-ticker-track {
    display: flex;
    align-items: center;
    gap: 0;
    width: var(--ticker-width, max-content);
    white-space: nowrap;
    animation: none;
    font-weight: 700;
    letter-spacing: 0.01em;
    flex-wrap: nowrap;
    will-change: transform;
    transform: translate3d(0, 0, 0);
}

.news-ticker-segment {
    display: inline-flex;
    align-items: center;
    gap: 6rem;
    padding-right: 6rem;
    min-width: max-content;
    flex-shrink: 0;
}

.news-ticker-item {
    display: inline-block;
    white-space: nowrap;
    line-height: 1;
    font-size: 0.85rem;
}

@keyframes ticker-scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(-1 * var(--ticker-distance, 50%)));
    }
}

.affiliate-ribbon {
    position: fixed;
/* Fixtures page */
.fixtures-section {
    padding: 1.5rem 1.5rem 2.5rem;
    max-width: 960px;
    margin: 0 auto;
}

.fixtures-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 1rem;
}

.fixtures-title-row {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.fixtures-title {
    font-size: 1.5rem;
    font-weight: 700;
}

.fixtures-subtitle {
    font-size: 0.9rem;
    color: #94a3b8;
}

.fixtures-content {
    background: #020617;
    border-radius: 18px;
    border: 1px solid #1e293b;
    padding: 1rem 1.3rem 1.4rem;
    min-height: 180px;
    margin-top: 0.75rem;
    box-shadow: 0 18px 28px rgba(15, 23, 42, 0.8);
}

.fixtures-loading {
    font-size: 0.9rem;
    color: #94a3b8;
}

/* League header + cards */
.fixtures-league-block {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.fixtures-league-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.fixtures-league-icon {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 30%, #f97316, #c026d3);
    flex-shrink: 0;
}

.fixtures-league-text {
    display: flex;
    flex-direction: column;
}

.fixtures-league-name {
    font-size: 0.9rem;
    font-weight: 700;
}

.fixtures-league-stage {
    font-size: 0.8rem;
    color: #64748b;
}

.fixtures-games-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.fixture-card {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 0.75rem;
    align-items: stretch;
    padding: 0.85rem 1rem;
    border-radius: 16px;
    background: #0b1220;
    border: 1px solid #1f2937;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.85);
}

.fixture-card-time {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: #e2e8f0;
}

.fixture-card-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.fixture-card-team {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.fixture-card-team-row {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.fixture-card-badge {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: #020617;
    border: 1px solid #1f2937;
}

.fixture-card-team-name {
    font-size: 0.88rem;
}

.fixture-card-score {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.35rem;
    font-size: 0.8rem;
}

.fixture-card-agg {
    color: #94a3b8;
}

.fixture-card-star {
    width: 26px;
    height: 26px;
    border-radius: 999px;
    border: 1px solid #1e293b;
    background: #020617;
    color: #e2e8f0;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.fixture-card-star:hover {
    border-color: #fbbf24;
    color: #fbbf24;
}
    right: 17px;
    top: 50%;
    transform: translateY(-50%) rotate(-90deg);
    transform-origin: right center;
    background-color: #e31d38;
    color: #ffffff;
    text-decoration: none;
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
    z-index: 120000;
    white-space: nowrap;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.affiliate-ribbon:hover {
    background-color: #ff2d4f;
}

body.article-page-active .affiliate-ribbon {
    opacity: 0;
    transform: translateY(-50%) translateX(40px) rotate(-90deg);
    pointer-events: none;
}

/* Mobile Share Modal Styles */
@media (max-width: 771px) {
    .share-modal {
        padding: 1.5rem;
    }
    
    .share-modal-title {
        font-size: 1.5rem;
    }
    
    .share-article-preview {
        padding: 0.75rem;
    }
    
    .share-article-thumbnail {
        width: 60px;
        height: 60px;
    }
    
    .share-article-heading {
        font-size: 0.8125rem;
    }
    
    .share-social-icon {
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
    }
}

/* Article Detail Page Styles */
.article-detail-page {
    min-height: 100vh;
    background-color: #050a18;
    padding-top: 0;
    margin: 0;
    width: 100%;
    max-width: 100%;
}

/* Hide main header and carousel when on article page */
body.article-page-active .header {
    display: none !important;
    visibility: hidden !important;
}

body.article-page-active .categories-section {
    display: none !important;
    visibility: hidden !important;
}

body.article-page-active .date-section {
    display: none !important;
    visibility: hidden !important;
}

/* Ensure date section displays correctly when not on article page */
.date-section {
    display: flex !important;
    align-items: center !important;
}

body.article-page-active .main-content {
    padding-top: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-bottom: 0 !important;
}

body.article-page-active #contentWrapper {
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}

body.article-page-active .article-detail-page {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Article Header Bar */
.article-header-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 55px;
    background-color: #0a1020;
    border-bottom: 1px solid var(--border-color);
    z-index: 99999;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.article-header-container {
    width: 100%;
    max-width: 100%;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

@media (min-width: 772px) {
    .article-header-container {
        max-width: 800px;
        margin: 0 auto;
        padding: 0 2rem;
    }
}

.article-close-btn {
    background: none;
    border: none;
    color: #ffffff;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
}

.article-close-btn:hover {
    opacity: 0.7;
}

.article-close-btn svg {
    width: 24px;
    height: 24px;
    stroke: #ffffff;
}

.article-category-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--accent-red);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

.article-header-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.article-action-btn {
    background: none;
    border: none;
    color: #ffffff;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
}

.article-action-btn:hover {
    opacity: 0.7;
}

.article-action-btn svg {
    width: 20px;
    height: 20px;
    stroke: #ffffff;
}

.article-action-btn.saved svg {
    fill: var(--accent-red);
    stroke: var(--accent-red);
}

.article-action-btn.saved {
    color: var(--accent-red);
}

/* Article Content */
.article-detail-content {
    max-width: 100%;
    padding: 2rem 1.5rem;
    padding-top: 3rem;
    background-color: #050a18;
    margin: 0;
}

@media (min-width: 772px) {
    .article-detail-content {
        max-width: 800px;
        margin: 0 auto;
        padding: 3rem 2rem;
    }
}

.article-detail-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.3;
    margin-bottom: 1rem;
    margin-top: 0;
}

@media (min-width: 772px) {
    .article-detail-title {
        font-size: 2.5rem;
        margin-top: 30px;
        margin-bottom: 1.5rem;
    }
}

.article-meta-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    font-size: 0.875rem;
}

.article-source-name {
    color: var(--accent-red);
    font-weight: 600;
}

.article-meta-separator {
    color: #94a3b8;
}

.article-date-text {
    color: #ffffff;
}

.article-image-container {
    width: 100%;
    margin-bottom: 2rem;
    border-radius: 12px;
    overflow: hidden;
}

.article-detail-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    object-position: top center;
    background-color: #0f172a;
}

/* Article Body */
.article-body {
    color: #ffffff;
    font-size: 1rem;
    line-height: 1.8;
}

.article-intro-paragraph {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 2rem;
    border-left: 4px solid var(--accent-red);
}

.article-intro-paragraph p {
    margin: 0;
    color: #ffffff;
    font-size: 1rem;
    line-height: 1.8;
}

.article-paragraph {
    margin-bottom: 1.5rem;
    color: #ffffff;
    font-size: 1rem;
    line-height: 1.8;
}

.article-paragraph:last-child {
    margin-bottom: 0;
}

@media (min-width: 772px) {
    .article-body {
        font-size: 1.125rem;
    }
    
    .article-intro-paragraph p {
        font-size: 1.125rem;
    }
    
    .article-paragraph {
        font-size: 1.125rem;
    }
}

/* Mobile Article Detail Styles */
@media (max-width: 771px) {
    .article-detail-page {
        padding-top: 55px;
    }
    
    .article-header-container {
        padding: 0 1rem;
    }
    
    .article-category-title {
        font-size: 0.8125rem;
    }
    
    .article-detail-content {
        padding: 2.6rem 1rem;
    }
    
    .article-detail-title {
        margin-top: 47px;
        font-size: 1.5rem;
        line-height: 1.3;
    }
    
    .article-meta-info {
        font-size: 0.8125rem;
        margin-bottom: 1.5rem;
    }
    
    .article-image-container {
        margin-bottom: 1.5rem;
        border-radius: 8px;
    }
    
    .article-intro-paragraph {
        padding-left: 1rem;
        border-left-width: 3px;
        margin-bottom: 1.5rem;
    }
    
    .article-paragraph {
        margin-bottom: 1.25rem;
        font-size: 0.9375rem;
    }
}
