@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --bg-dark: #121212;
    --card-dark: #1E1E1E;
    --skyblue: #87CEEB;
    --red: #FF4136;
    --green: #2ECC40;
    --text-primary: #FFFFFF;
    --text-secondary: #A0A0A0;
    --border-color: rgba(255, 255, 255, 0.1);
    
    --facebook: #1877F2;
    --google: #DB4437;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; }

body.light-theme {
    --bg-dark: #F0F2F5;
    --card-dark: #FFFFFF;
    --text-primary: #1A1A1A;
    --text-secondary: #6B7280;
    --border-color: rgba(0, 0, 0, 0.1);
    background-image: linear-gradient(135deg, rgba(218,165,32,0.05) 0%, rgba(135,206,235,0.05) 33%, rgba(255,65,54,0.05) 66%, rgba(46,204,64,0.05) 100%);
}

body {
    background-color: var(--bg-dark);
    /* Golden, Skyblue, Red, Green Premium Gradient overlay */
    background-image: linear-gradient(135deg, rgba(218,165,32,0.15) 0%, rgba(135,206,235,0.15) 33%, rgba(255,65,54,0.15) 66%, rgba(46,204,64,0.15) 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding: 0;
    overflow-x: hidden; 
}

/* Helpers */
.text-skyblue { color: var(--skyblue); }
.text-red { color: var(--red); }
.text-green { color: var(--green); }
.bg-red { background-color: rgba(255, 65, 54, 0.1); }
.bg-green { background-color: rgba(46, 204, 64, 0.1); }
.bg-skyblue { background-color: rgba(135, 206, 235, 0.1); }

.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 0.5rem; }
.d-block { display: block; width: 100%; }

/* Responsive App Wrapper */
.mobile-app {
    width: 100%; /* Flexible Width */
    max-width: 100%; /* No fixed limit */
    min-height: 100vh;
    background: transparent;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Views */
.view {
    display: none;
    flex: 1;
    width: 100%;
    min-height: 100vh;
    background: transparent;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 24px;
    animation: fadeIn 0.4s ease forwards;
}
.active-view { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* AUTHENTICATION VIEW */
#auth-view {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-bottom: 50px;
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}
.auth-header h1 { font-size: 28px; font-weight: 700; }
.auth-header p { color: var(--text-secondary); margin-top: 5px; }

.input-group {
    background-color: var(--card-dark);
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    border: 1px solid var(--border-color);
}
.input-group i { color: var(--text-secondary); font-size: 18px; margin-right: 12px; width: 20px; text-align: center; }
.input-group input, .input-group select { 
    background: transparent; 
    border: none; 
    color: white; 
    font-size: 16px; 
    width: 100%; 
    outline: none; 
    appearance: none;
    -webkit-appearance: none;
}
.input-group select option { background: var(--bg-dark); color: white; }
.input-group input::placeholder { color: #888; }

.btn {
    border: none; border-radius: 12px; padding: 15px; font-size: 16px; font-weight: 600; cursor: pointer; transition: 0.2s;
}
.btn-primary { background-color: var(--skyblue); color: #000; }
.btn-primary:active { transform: scale(0.98); opacity: 0.9; }

.divider {
    display: flex; align-items: center; margin: 25px 0; color: #555;
}
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: #333; }
.divider span { padding: 0 15px; font-size: 14px; }

.btn-social { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; margin-bottom: 15px; color: white; }
.btn-facebook { background-color: var(--facebook); }
.btn-google { background-color: var(--google); }

.auth-toggle-text { text-align: center; color: var(--text-secondary); margin-top: 20px; font-size: 14px; }
.auth-toggle-text span { color: var(--skyblue); font-weight: 600; cursor: pointer; }

/* DASHBOARD VIEW */
#dashboard-view {
    padding: 0; /* Remove padding for header and scrollable body */
    display: flex;
    flex-direction: column;
    height: 100%;
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    background-color: var(--bg-dark);
    border-bottom: 1px solid var(--border-color);
}
.user-greeting { display: flex; align-items: center; gap: 15px; }
.user-greeting .greeting { font-size: 13px; color: var(--text-secondary); }
.user-greeting h3 { font-size: 18px; font-weight: 600; }
.icon-btn { background: transparent; border: none; color: var(--text-secondary); font-size: 20px; cursor: pointer; }

.content-scrollable {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    padding-bottom: 90px;
}

/* Widgets */
.widget {
    background-color: var(--card-dark);
    border-radius: 20px;
    padding: 20px;
}
.weather-card {
    background: linear-gradient(135deg, rgba(135,206,235,0.1) 0%, rgba(30,30,30,1) 100%);
    border: 1px solid rgba(135,206,235,0.2);
}
.weather-top { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 5px; }
.weather-temp { display: flex; justify-content: center; align-items: center; gap: 10px; width: 100%; border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 15px; margin-bottom: 5px; }
.weather-temp h1 { font-size: 4.5rem; font-weight: 700; margin: 0; line-height: 1; }
.weather-desc { text-align: center; width: 100%; }
.weather-desc p { font-size: 18px; font-weight: 500; margin: 0; }
.weather-desc small { color: var(--text-secondary); font-size: 12px; }

.prediction-header h3 { font-size: 18px; display: flex; align-items: center; gap: 10px; margin-bottom: 5px; }
.prediction-header p { font-size: 14px; color: var(--text-secondary); }

.insight-card {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    border-left: 4px solid var(--skyblue);
}
.insight-icon {
    width: 40px; height: 40px; border-radius: 12px; background: rgba(135,206,235,0.15);
    display: flex; justify-content: center; align-items: center; font-size: 18px; color: var(--skyblue); flex-shrink: 0;
}
.insight-content h4 { font-size: 15px; margin-bottom: 5px; }
.insight-content p { font-size: 13px; line-height: 1.5; color: #ccc; }

.section-title { font-size: 16px; margin-bottom: 15px; color: #FFF; font-weight: 600; }

.trends-list { display: flex; flex-direction: column; gap: 12px; }
.trend-item {
    background-color: var(--card-dark); padding: 16px; border-radius: 16px; display: flex; justify-content: space-between; align-items: center;
}
.trend-left { display: flex; align-items: center; gap: 15px; }
.trend-icon {
    width: 45px; height: 45px; border-radius: 12px; display: flex; justify-content: center; align-items: center; font-size: 20px;
}
.trend-info h5 { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.trend-info p { font-size: 12px; color: var(--text-secondary); max-width: 170px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trend-badge {
    padding: 6px 12px; border-radius: 20px; font-weight: 700; font-size: 13px;
}

/* Skeleton loader */
.trend-skeleton { height: 75px; background: var(--card-dark); border-radius: 16px; animation: pulse 1.5s infinite; }
@keyframes pulse { 0% { opacity: 0.6; } 50% { opacity: 0.3; } 100% { opacity: 0.6; } }

/* Bottom Nav */
.bottom-nav {
    position: fixed; bottom: 0; left: 0; width: 100%; background-color: var(--card-dark);
    display: flex; justify-content: space-around; padding: 15px 10px 20px 10px; border-top: 1px solid rgba(255,255,255,0.05);
    z-index: 1000;
}
.bottom-nav .nav-item { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--text-secondary); cursor: pointer; font-size: 18px; transition: 0.2s; }
.bottom-nav .nav-item span { font-size: 11px; font-weight: 500; }
.bottom-nav .nav-item.active { color: var(--skyblue); }
.bottom-nav .nav-item:active { transform: scale(0.9); }

/* Toast */
.toast {
    position: absolute; bottom: 85px; left: 50%; transform: translateX(-50%); background: white; color: black;
    padding: 12px 24px; border-radius: 30px; font-weight: 600; font-size: 14px; opacity: 0; pointer-events: none; transition: 0.3s;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3); z-index: 1000; white-space: nowrap;
}
.toast.show { opacity: 1; transform: translate(-50%, -10px); }

/* Verification & Biometric */
.code-box {
    width: 45px;
    height: 55px;
    background: var(--card-dark);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: white;
    font-size: 24px;
    text-align: center;
    font-weight: 600;
}
.code-box:focus {
    border-color: var(--skyblue);
    outline: none;
    box-shadow: 0 0 5px var(--skyblue);
}

.biometric-container {
    display: flex; justify-content: center; align-items: center;
}
.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: var(--skyblue);
    box-shadow: 0 0 10px var(--skyblue);
    opacity: 0;
}
.scanning .scan-line {
    animation: scan 1.5s infinite ease-in-out;
    opacity: 1;
}
.scanning #fingerprint-icon {
    opacity: 1;
    color: var(--green);
}
@keyframes scan {
    0% { top: 0; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

/* Image 2 - Modern Frosted Glass Components */
.weather-card, .widget, .nav-settings {
    background: rgba(255, 255, 255, 0.1); /* Semi-transparent background */
    backdrop-filter: blur(20px);         /* Frosted glass effect */
    -webkit-backdrop-filter: blur(20px); /* Safari support */
    border-radius: 24px;                 /* Smooth rounded corners */
    border: 1px solid rgba(255, 255, 255, 0.2); /* Thin, soft border */
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    padding: 24px;
    color: white;
}

#weather-temp {
    font-size: 5rem;
    font-weight: 700;
    letter-spacing: -2px;
}

/* Image 3 - Clean White Auth Card */
.auth-card {
    background: #ffffff !important;
    border-radius: 24px !important;
    padding: 40px 30px !important;
    width: 100% !important;
    max-width: 450px !important;
    margin: 20px auto !important;
    color: #111111 !important;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2) !important;
    text-align: center;
    box-sizing: border-box;
    display: block;
}
.auth-title { font-weight: 700; font-size: 24px; margin-bottom: 8px; color: #111 !important; }
.auth-subtitle { color: #6e6d7a !important; font-size: 14px; margin-bottom: 25px; line-height: 1.4; }

.btn-google {
    background: #fff !important; 
    border: 1px solid #e7e7e9 !important; 
    border-radius: 999px !important;
    color: #0d0c22 !important; 
    font-weight: 600; 
    padding: 14px !important; 
    width: 100% !important;
    display: flex; 
    justify-content: center; 
    align-items: center; 
    gap: 10px;
    cursor: pointer; 
    transition: 0.2s;
    font-size: 15px;
}
.btn-google:hover { border-color: #d1d1d4 !important; background: #f9f9f9 !important; }

.auth-divider {
    display: flex; align-items: center; text-align: center; margin: 25px 0; color: #6e6d7a; font-size: 12px; font-weight: 500;
}
.auth-divider::before, .auth-divider::after {
    content: ''; flex: 1; border-bottom: 1px solid #e7e7e9;
}
.auth-divider::before { margin-right: 15px; }
.auth-divider::after { margin-left: 15px; }

.auth-input {
    width: 100% !important; 
    padding: 14px 16px !important; 
    border: 1px solid #e7e7e9 !important; 
    border-radius: 12px !important;
    font-size: 15px !important; 
    outline: none !important; 
    transition: 0.2s; 
    background: #fff !important; 
    color: #111 !important;
    margin-bottom: 15px !important;
    box-sizing: border-box;
    display: block !important;
}
.auth-input::placeholder { color: #a0a0a0 !important; }
.auth-input:focus { border-color: #0d0c22 !important; }

label.auth-label {
    font-size: 13px !important; 
    font-weight: 600 !important; 
    color: #0d0c22 !important; 
    margin-top: 5px !important; 
    margin-bottom: 8px !important;
    display: block !important;
}

.checkbox-group {
    max-height: 180px; 
    overflow-y: auto; 
    border: 1px solid #e7e7e9 !important; 
    border-radius: 12px !important; 
    padding: 15px !important; 
    margin-bottom: 20px !important; 
    background: #fafafa !important;
    box-sizing: border-box;
}
.checkbox-group label {
    display: flex !important; 
    align-items: center !important; 
    margin-bottom: 12px !important; 
    color: #111 !important; 
    font-size: 14px !important;
    font-weight: 500 !important;
    cursor: pointer;
}
.checkbox-group input[type="checkbox"] {
    margin-right: 12px !important;
    width: 18px !important;
    height: 18px !important;
    accent-color: #0d0c22 !important;
    display: inline-block !important;
}

.btn-continue {
    background: #0d0c22 !important; 
    color: #fff !important; 
    border-radius: 999px !important; 
    padding: 16px !important; 
    width: 100% !important;
    font-size: 16px !important;
    font-weight: 600 !important; 
    cursor: pointer; 
    border: none !important; 
    margin-top: 10px !important; 
    transition: 0.2s;
    display: block !important;
}
.btn-continue:hover { background: #565564 !important; }

/* Cookie Consent & Terms Banner */
.cookie-banner {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: var(--card-dark);
    border-top: 1px solid var(--border-color);
    padding: 15px 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 15px;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.5);
}
.cookie-banner p { margin: 0; color: #ccc; }
.cookie-banner .btn { width: auto; padding: 10px 40px; }

/* Responsive Grid Implementation */
.content-scrollable {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Tablets (481px to 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    .content-scrollable {
        display: grid;
        grid-template-columns: 48% 48%; /* Flexible percentages */
        gap: 4%;
        padding: 0 2%;
    }
    .prediction-header, .section-title, .weather-card {
        grid-column: 1 / -1; /* Stretch across all columns */
    }
    .widget {
        margin-top: 0 !important;
        margin-bottom: 20px;
    }
    #auth-view, #verification-view, #biometric-view {
        align-items: center;
    }
    #login-form, #register-form {
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }
}

/* Desktop (769px and above) - 3 Column Grid */
@media (min-width: 769px) {
    .content-scrollable {
        display: grid;
        grid-template-columns: 32% 34% 32%; /* Flexible percentages */
        gap: 1%;
        align-items: start;
        padding: 20px 5%;
    }
    .prediction-header, .section-title {
        grid-column: 1 / -1; 
    }
    .app-header {
        padding: 20px 5%;
    }
    .bottom-nav {
        /* Adapt bottom nav to top/side or keep centered on desktop */
        position: fixed;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        width: 50%;
        border-radius: 30px;
        border: 1px solid var(--border-color);
    }
    #auth-view, #verification-view, #biometric-view {
        align-items: center;
        justify-content: flex-start;
        flex-direction: column;
        padding-top: 10vh;
    }
    .auth-header { text-align: center; width: 100%; }
    #login-form, #register-form {
        width: 400px;
        margin: 0 auto;
    }
}

/* Settings Menu Layout */
.settings-dropdown {
    position: fixed; top: 0; right: 0; bottom: 0; left: 0;
    background: var(--bg-dark); z-index: 2000;
    display: flex; flex-direction: column;
    animation: slideUp 0.3s ease forwards;
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

.settings-header {
    display: flex; justify-content: space-between; align-items: center; padding: 20px 24px;
    border-bottom: 1px solid var(--border-color); background: var(--card-dark);
}
.settings-header h4 { font-size: 18px; font-weight: 600; margin:0; }

.settings-scroll-area {
    flex: 1; overflow-y: auto; padding: 24px; padding-bottom: 50px;
}

.settings-group { margin-bottom: 25px; }
.settings-group label {
    display: block; font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.5px;
}

.setting-item {
    display: flex; align-items: center; background: var(--card-dark);
    padding: 16px; border-radius: 16px; border: 1px solid var(--border-color);
    margin-bottom: 10px; cursor: pointer; position: relative;
    transition: 0.2s;
}
.setting-item:active { transform: scale(0.98); }

.setting-icon {
    width: 40px; height: 40px; border-radius: 12px; display: flex; justify-content: center; align-items: center;
    font-size: 18px; margin-right: 15px; color: #fff; flex-shrink: 0;
}

.setting-text { flex: 1; display: flex; flex-direction: column; }
.setting-text span { font-size: 15px; font-weight: 600; color: var(--text-primary); }
.setting-text small { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }

.settings-select {
    background: transparent; border: none; color: var(--text-secondary); padding: 0;
    font-size: 12px; width: 100%; outline: none; margin-top: 2px; cursor: pointer;
}
.settings-select option { background: var(--card-dark); color: var(--text-primary); }

/* =========================================
   COMPONENTS: Modal, News, Ticker
   ========================================= */

/* Recommendation Modal */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6); backdrop-filter: blur(5px);
    z-index: 3000; display: flex; justify-content: center; align-items: flex-end;
    animation: fadeIn 0.2s;
}
.modal-content {
    background: var(--bg-dark); width: 100%; border-radius: 24px 24px 0 0;
    max-height: 80vh; overflow-y: auto; padding-bottom: 20px;
    border-top: 1px solid var(--border-color);
    animation: slideUp 0.3s forwards;
}
.modal-header {
    display: flex; justify-content: space-between; align-items: center; padding: 20px 24px;
    border-bottom: 1px solid var(--border-color); background: var(--card-dark); position:sticky; top:0; z-index:10;
}

/* News Slider Widget */
.news-widget { padding: 0 !important; overflow: hidden; position: relative; }
.news-container { display: flex; transition: transform 0.8s ease-in-out; }
.news-slide { min-width: 100%; padding: 15px; display: flex; flex-direction: column; gap: 15px; }
.news-item {
    text-decoration: none; color: var(--text-primary); background: rgba(0,0,0,0.2);
    padding: 15px; border-radius: 12px; border: 1px solid var(--border-color); cursor: pointer;
}
.news-item h5 { font-size: 14px; margin-bottom: 5px; color:var(--skyblue); line-height:1.4; }
.news-item p { font-size: 12px; color: var(--text-secondary); margin:0; }

/* Dynamic Exchange Ticker */
.ticker-widget {
    padding: 0 !important;
    overflow: hidden;
    white-space: nowrap;
    display: flex;
    align-items: center;
    height: 52px;
    cursor: default;
}
.ticker-scroll {
    display: inline-block;
    padding-left: 100%;
    /* 100s = extremely professional, high-end slow crawl */
    animation: marquee 100s linear infinite;
    will-change: transform;
}
/* ✋ Professional Pause on Hover */
.ticker-widget:hover .ticker-scroll {
    animation-play-state: paused;
}
.ticker-track {
    display: inline-flex;
    align-items: center;
    gap: 36px;
    padding: 14px 0;
}
.ticker-node {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.2px;
    font-family: 'Inter', sans-serif;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    transition: all 0.2s ease;
}
.ticker-node b {
    font-weight: 700;
    color: var(--text-primary);
}

@keyframes marquee {
    0%   { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-100%, 0, 0); }
}

/* Payment Module Cards */
.payment-card {
    background: #fff; border: 1px solid #e7e7e9; border-radius: 12px;
    padding: 20px 10px; text-align: center; cursor: pointer; transition: 0.2s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02); display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.payment-card:hover { border-color: var(--skyblue); transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,0.05); }
.payment-card h6 { margin: 10px 0 3px 0; font-size: 13px; font-weight: 700; color: #111; line-height:1; }
.payment-card small { font-size: 10px; color: #6e6d7a; line-height: 1.2; padding:0 5px; }

/* PayWithToken Modal Design */
.pwt-tab { flex:1; text-align:center; padding-bottom:10px; color:#6e6d7a; font-weight:500; cursor:pointer; font-size: 14px; transition:0.2s; }
.pwt-tab.active { border-bottom:2px solid #302d84; font-weight:600; color:#302d84; }
.pwt-tab:hover:not(.active) { color:#111; }

/* Critical Layout Fix for Settings Dropdown Empty Navigation Frame */
.settings-dropdown {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: var(--bg-dark);
    z-index: 2000;
    flex-direction: column; overflow: hidden;
}
.settings-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px 24px; border-bottom: 1px solid var(--border-color); background: var(--bg-dark);
}
.settings-header h4 { font-size: 18px; font-weight: 600; margin: 0; }
.settings-scroll-area {
    flex: 1; overflow-y: auto; padding: 24px; padding-bottom: 110px; background: var(--bg-dark);
}
.settings-group { margin-bottom: 25px; }
.settings-group label {
    display: block; font-size: 13px; color: var(--text-secondary); margin-bottom: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;
}
.setting-item {
    display: flex; align-items: center; gap: 15px; background: var(--card-dark);
    padding: 16px; border-radius: 12px; margin-bottom: 10px; cursor: pointer; transition: 0.2s;
}
.setting-item:active { transform: scale(0.98); }
.setting-icon {
    width: 40px; height: 40px; border-radius: 10px; display: flex; justify-content: center; align-items: center; font-size: 18px; flex-shrink: 0;
}
.setting-text { flex: 1; }
.setting-text span { display: block; font-size: 15px; font-weight: 600; margin-bottom: 3px; color: var(--text-primary); }
.setting-text small { display: block; font-size: 12px; color: var(--text-secondary); }

/* ══════════════════════════════════════════════════════
   REAL-TIME NEWS FEED STYLES
════════════════════════════════════════════════════════ */

/* LIVE badge in header */
.news-live-badge {
    display: inline-flex; align-items: center; gap: 4px;
    background: rgba(255,65,54,0.15); color: #FF4136;
    font-size: 10px; font-weight: 700; letter-spacing: 1px;
    padding: 3px 8px; border-radius: 20px; margin-left: 8px;
    vertical-align: middle; border: 1px solid rgba(255,65,54,0.3);
    animation: livePulse 2s infinite;
}
.news-live-badge i { font-size: 7px; }
@keyframes livePulse {
    0%,100% { opacity: 1; }
    50%      { opacity: 0.6; }
}

/* Widget overflow container */
.news-widget { overflow: hidden; position: relative; }
.news-container {
    display: flex; transition: transform 0.6s cubic-bezier(0.25,0.46,0.45,0.94);
    width: 100%;
}
.news-slide {
    display: flex; gap: 10px; min-width: 100%; padding: 2px;
}

/* Individual news card */
.news-item {
    flex: 1; background: var(--card-dark);
    border-radius: 14px; overflow: hidden;
    text-decoration: none; color: var(--text-primary);
    border: 1px solid var(--border-color);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex; flex-direction: column;
}
.news-item:active { transform: scale(0.98); }
.news-item.news-local  { border-left: 3px solid var(--green); }
.news-item.news-global { border-left: 3px solid var(--skyblue); }

/* Article image */
.news-img-wrap { width: 100%; height: 90px; overflow: hidden; }
.news-img-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Article body */
.news-body { padding: 10px 11px 11px; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.news-tag {
    display: inline-block; font-size: 9px; font-weight: 700; letter-spacing: 0.5px;
    background: rgba(135,206,235,0.12); color: var(--skyblue);
    padding: 2px 7px; border-radius: 20px; align-self: flex-start;
}
.news-item h5 {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--text-primary);
    margin: 4px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.news-item p {
    font-size: 11.5px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.news-meta {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--border-color);
}
.news-source, .news-time {
    font-size: 9px; color: var(--text-secondary); display: flex; align-items: center; gap: 3px;
}
.news-source { max-width: 55%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Skeleton loader */
.news-loading {
    display: flex; gap: 10px; width: 100%; padding: 2px;
}
.news-skeleton-card {
    flex: 1; background: var(--card-dark); border-radius: 14px;
    padding: 12px; display: flex; flex-direction: column; gap: 8px;
    border: 1px solid var(--border-color);
}
.ns-tag, .ns-title, .ns-desc, .ns-meta {
    border-radius: 6px; background: linear-gradient(90deg,
        rgba(255,255,255,0.04) 25%,
        rgba(255,255,255,0.1) 50%,
        rgba(255,255,255,0.04) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.6s infinite;
}
.ns-tag  { height: 14px; width: 55%; }
.ns-title { height: 40px; width: 100%; }
.ns-desc  { height: 24px; width: 90%; }
.ns-meta  { height: 12px; width: 80%; }
@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Error state */
.news-error {
    width: 100%; text-align: center; padding: 24px 16px;
    color: var(--text-secondary); display: flex; flex-direction: column;
    align-items: center; gap: 8px;
}
.news-error i { font-size: 28px; color: rgba(255,65,54,0.5); }
.news-error p { font-size: 13px; }
.news-error a { color: var(--skyblue); text-decoration: none; }

/* ── Exchange Ticker Extras ────────────────────────────────────── */
.ticker-divider {
    color: #FFD700 !important;
    font-size: 10px !important;
    font-weight: 700;
    letter-spacing: 1px;
    opacity: 0.85;
    padding: 0 8px !important;
    white-space: nowrap;
}

