/* --- CSS Variables --- */
:root {
    /* New "Superman 2025" Light Theme */
    --primary-color: #f8f9fa;
    --secondary-color: #ffffff;
    --secondary-color-rgb: 255, 255, 255;
    --accent-color: #e9ecef;
    --text-color: #1a1a1a;
    --highlight-color: #00529b; /* Heroic Blue */
    --highlight-color-rgb: 0, 82, 155;
    --shadow-color-light: rgba(0, 0, 0, 0.05);
    --shadow-color-dark: rgba(0, 0, 0, 0.15);
    --border-radius-main: 16px;
    --transition-speed: 0.3s;

    /* Glassmorphism Variables */
    --glass-bg-light: rgba(255, 255, 255, 0.75);
    --glass-border-light: rgba(255, 255, 255, 0.7);
    --glass-bg-dark: rgba(28, 28, 28, 0.75);
    --glass-border-dark: rgba(255, 255, 255, 0.1);

    /* Alert & Status Colors */
    --alert-warning-color: #ffc107;
    --alert-danger-color: #d92e2e; /* Superman Red */
    --hazard-safe-color: #198754;
    --hazard-low-risk-color: #0dcaf0;
    --hazard-moderate-risk-color: #ffc107;
    --hazard-high-risk-color: #d92e2e;
}

body.dark-theme {
    /* New "The Batman" Dark Theme */
    --primary-color: #101010;
    --secondary-color: #1c1c1c;
    --secondary-color-rgb: 28, 28, 28;
    --accent-color: #2a2a2a;
    --text-color: #f0f0f0;
    --highlight-color: #e02424; /* Vengeance Red */
    --highlight-color-rgb: 224, 36, 36;
    --shadow-color-light: rgba(0, 0, 0, 0.2);
    --shadow-color-dark: rgba(0, 0, 0, 0.4);

    /* Alert & Status Colors */
    --alert-warning-color: #ffc107;
    --alert-danger-color: #e02424;
    --hazard-safe-color: #28a745;
    --hazard-low-risk-color: #20c997;
    --hazard-moderate-risk-color: #ffc107;
    --hazard-high-risk-color: #e02424;
}

/* --- Global Styles --- */
html {
    box-sizing: border-box;
    scroll-behavior: smooth;
}
*, *:before, *:after {
    box-sizing: inherit;
    transition: background-color var(--transition-speed), color var(--transition-speed), border-color var(--transition-speed), box-shadow var(--transition-speed);
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--primary-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    text-align: center;
    /* Superman 2025 Theme */
    background-image: url('https://images3.alphacoders.com/137/thumb-1920-1379856.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    transition: background-color var(--transition-speed), color var(--transition-speed), background-image 0.5s ease-in-out;
}

body.dark-theme {
    /* The Batman Theme */
    background-image: url('https://images.wallpapersden.com/image/download/batman-cool-the-dark-knight_bmZpaWyUmZqaraWkpJRqbWdprWhna2k.jpg');
}

body.device-view-active {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    overflow: hidden;
}

#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* --- Navigation Bar (Solid Color) --- */
.top-nav {
    background-color: var(--secondary-color);
    border-bottom: 1px solid var(--accent-color);
    padding: 0.5rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px var(--shadow-color-dark);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.top-nav .logo {
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
}
.top-nav .logo:hover {
    transform: scale(1.05);
}

.top-nav .logo svg {
    height: 40px;
    width: auto;
}
.top-nav .logo text {
    fill: var(--text-color);
}
.top-nav .logo #logoGradient stop:first-child {
    stop-color: var(--highlight-color);
}
.top-nav .logo #logoGradient stop:last-child {
    stop-color: var(--highlight-color);
    stop-opacity: 0.7;
}


.top-nav .nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
}

.top-nav .nav-links li {
    position: relative;
}

.top-nav .nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    font-size: 1rem;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background-color 0.3s, color 0.3s;
    border-radius: 8px;
}

.top-nav .nav-links a:hover {
    background-color: var(--primary-color);
    color: var(--highlight-color);
}

.top-nav .nav-links .fa-chevron-down {
    font-size: 0.7em;
    transition: transform 0.3s;
}

.top-nav .nav-links li:hover .fa-chevron-down {
    transform: rotate(180deg);
}

/* Dropdown Menu (Glassmorphism) */
.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--glass-bg-light);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    min-width: 200px;
    box-shadow: 0 8px 16px var(--shadow-color-dark);
    z-index: 1;
    list-style: none;
    padding: 0.5rem 0;
    border-radius: 0 0 var(--border-radius-main) var(--border-radius-main);
    border: 1px solid var(--glass-border-light);
    border-top: none;
}
body.dark-theme .dropdown-content {
    background-color: var(--glass-bg-dark);
    border: 1px solid var(--glass-border-dark);
    border-top: none;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content li a {
    padding: 0.75rem 1.5rem;
    width: 100%;
    justify-content: flex-start;
}

/* --- Switcher Controls in Navbar --- */
.switcher-controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.switcher-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.switcher-controls h4 {
    margin: 0;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem;
    color: var(--highlight-color);
}

.device-switcher, .theme-switcher {
    display: flex;
    background-color: var(--primary-color);
    border-radius: 5px;
    padding: 2px;
    border: 1px solid var(--accent-color);
}

.switcher-controls button {
    background: transparent;
    border: none;
    color: var(--text-color);
    padding: 0.4rem 0.6rem;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.switcher-controls button.active {
    background: var(--highlight-color);
    color: white;
    box-shadow: 0 2px 8px rgba(var(--highlight-color-rgb), 0.3);
}

/* --- Banner Styling --- */
.banner-container {
    max-width: 1600px; /* Match main content width */
    margin: 2rem auto 0; /* Center and provide spacing, remove bottom margin */
    padding: 2rem;
    background-color: var(--glass-bg-light);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-radius: var(--border-radius-main);
    box-shadow: 0 10px 30px var(--shadow-color-dark);
    border: 1px solid var(--glass-border-light);
}

body.dark-theme .banner-container {
    background-color: var(--glass-bg-dark);
    border: 1px solid var(--glass-border-dark);
}

.banner-slider {
    position: relative;
    margin: 0 auto;
}


.banner-slider img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius-main);
    box-shadow: 0 8px 25px var(--shadow-color-dark);
    background-color: #e9ecef;
    transition: opacity 0.3s ease-in-out; /* Added for smooth image transition */
}

.banner-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.3);
    color: white;
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5; /* Ensure arrows are above indicators/play-pause button */
}

.banner-arrow:hover {
    background-color: rgba(0, 0, 0, 0.7);
    transform: translateY(-50%) scale(1.1);
}

.banner-arrow.left {
    left: 1rem;
}

.banner-arrow.right {
    right: 1rem;
}

/* Banner Controls & Indicators */
.banner-controls {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 1rem;
    background-color: rgba(var(--secondary-color-rgb), 0.7);
    backdrop-filter: blur(5px);
    border-radius: 20px;
    padding: 0.5rem 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 6; /* Ensure controls are above other elements */
}

.banner-indicators {
    display: flex;
    gap: 0.5rem;
}

.banner-indicator {
    width: 10px;
    height: 10px;
    background-color: rgba(0, 0, 0, 0.5); /* Default for light theme */
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}
body.dark-theme .banner-indicator { /* For dark theme */
    background-color: rgba(255, 255, 255, 0.5);
}

.banner-indicator.active {
    background-color: var(--highlight-color);
    transform: scale(1.2);
    border-color: white;
}

.banner-play-pause {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.3s, transform 0.2s;
}

.banner-play-pause:hover {
    color: var(--highlight-color);
    transform: scale(1.1);
}


/* --- Userbar Styling --- */
.userbar-container {
    max-width: 1600px; /* Match other main containers */
    margin: 2rem auto; /* Spacing above and below, aligned with others horizontally */
    padding: 1rem 2rem;
    background-color: var(--glass-bg-light);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-radius: var(--border-radius-main);
    box-shadow: 0 10px 30px var(--shadow-color-dark);
    border: 1px solid var(--glass-border-light);
}

body.dark-theme .userbar-container {
    background-color: var(--glass-bg-dark);
    border: 1px solid var(--glass-border-dark);
}

.userbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
}

.user-info .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--highlight-color);
}

.user-actions {
    display: flex;
    gap: 0.5rem;
}

.user-action-btn {
    color: var(--text-color);
    background-color: var(--secondary-color);
    border: 1px solid var(--accent-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s;
}

.user-action-btn:hover {
    background-color: var(--highlight-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px var(--shadow-color-dark);
}


/* --- Main Layout Grid System --- */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr 1fr;
    grid-template-areas: "left-col middle-col right-col";
    gap: 2rem;
    padding: 2rem;
    max-width: 1600px;
    margin: 0 auto 2rem;
    align-items: start;
    transition: grid-template-columns 0.3s ease;
    background-color: var(--glass-bg-light);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-radius: var(--border-radius-main);
    box-shadow: 0 10px 30px var(--shadow-color-dark);
    border: 1px solid var(--glass-border-light);
}

body.dark-theme .dashboard-grid {
    background-color: var(--glass-bg-dark);
    border: 1px solid var(--glass-border-dark);
}

.left-column { grid-area: left-col; }
.middle-column {
    grid-area: middle-col;
    min-width: 0; /* Prevents grid column from expanding to fit wide content */
}
.right-column { grid-area: right-col; }

.widget-container {
    margin-bottom: 2rem;
}

/* Glassmorphism for Widgets */
.container, .widget {
    background-color: rgba(255, 255, 255, 0.85); /* Slightly more opaque for better readability inside the grid */
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    padding: 1.5rem;
    border-radius: var(--border-radius-main);
    box-shadow: 0 5px 20px var(--shadow-color-light); /* Softer shadow for nested elements */
    border: 1px solid var(--glass-border-light);
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
    position: relative;
}
body.dark-theme .container, body.dark-theme .widget {
    background-color: rgba(28, 28, 28, 0.85);
    border: 1px solid var(--glass-border-dark);
}


.container:hover, .widget:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 45px var(--shadow-color-dark);
}

.container {
    padding: 2rem 3rem;
}

.widget {
    text-align: left;
}

/* Widget Reloading State */
.widget.reloading::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(var(--secondary-color-rgb), 0.8);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    z-index: 5;
    border-radius: var(--border-radius-main);
}
.widget.reloading::after {
    content: 'Reloading...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--highlight-color);
    z-index: 6;
    animation: pulse 1.5s infinite;
}


.widget h3 {
    font-family: 'Orbitron', sans-serif;
    color: var(--highlight-color);
    margin-top: 0;
    border-bottom: 1px solid var(--glass-border-light);
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.1rem;
}
body.dark-theme .widget h3 {
    border-bottom: 1px solid var(--glass-border-dark);
}

.widget h3 i {
    font-size: 1em;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(var(--highlight-color-rgb), 0.1);
    border-radius: 50%;
}

.widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget ul li {
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.widget ul li a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s;
}

.widget ul li a:hover {
    color: var(--highlight-color);
}

.widget ul li i {
    color: var(--highlight-color);
    width: 15px;
    text-align: center;
}

/* Specific styling for news widget list items */
.widget.news-widget ul li {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Align items to the left */
    gap: 0.75rem; /* Space between items */
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px dashed var(--accent-color);
}

.widget.news-widget ul li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.widget.news-widget ul li strong {
    font-size: 1.1rem; /* Slightly larger title */
    color: var(--text-color);
    font-weight: 600; /* Make title bolder */
    width: 100%; /* Ensure it takes full width */
}

.widget.news-widget ul li img {
    width: 100%; /* Full width of the list item */
    height: auto; /* Maintain aspect ratio */
    max-height: 180px; /* Optional: constrain image height */
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 5px var(--shadow-color-light);
}

.widget.news-widget ul li p {
    font-size: 0.9em;
    color: #888;
    margin: 0;
    line-height: 1.5;
}
body.dark-theme .widget.news-widget ul li p {
    color: #bbb;
}

.widget.news-widget ul li a {
    font-size: 0.85em;
    color: var(--highlight-color);
    text-decoration: none;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: color 0.3s, background-color 0.3s, box-shadow 0.3s;
    padding: 5px 10px;
    border: 1px solid var(--highlight-color);
    border-radius: 5px;
    background-color: transparent;
}

.widget.news-widget ul li a:hover {
    color: white;
    background-color: var(--highlight-color);
    box-shadow: 0 2px 8px rgba(var(--highlight-color-rgb), 0.3);
}

.widget.news-widget ul li a i {
    font-size: 0.8em;
    transition: color 0.3s;
}

.widget.news-widget ul li a:hover i {
    color: white;
}


.widget .update-date {
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
}

.widget p {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0.5rem 0;
}

.widget p i {
    color: var(--highlight-color);
}

/* Overriding glass effect for specific widgets */
.advertisement, .music-player, .radio-player-widget {
    background-color: var(--primary-color) !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}

.advertisement {
    padding: 1rem;
    border: 2px dashed var(--accent-color);
    border-radius: var(--border-radius-main);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.advertisement.ad-box { min-height: 250px; }
.advertisement.ad-skyscraper { min-height: 600px; }
.advertisement.ad-banner-medium {
    min-height: 90px;
    width: 100%;
    max-width: 728px;
    margin-left: auto;
    margin-right: auto;
}

.advertisement p {
    margin: 0;
    color: var(--text-color);
    font-style: italic;
}

.main-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 3rem;
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: var(--text-color);
    opacity: 0.8;
}

.countdown {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 2rem;
    perspective: 1000px;
}

.time-box {
    background-color: rgba(var(--secondary-color-rgb), 0.2);
    padding: 1rem;
    border-radius: var(--border-radius-main);
    min-width: 90px;
    border: 1px solid var(--glass-border-light);
    margin: 0.5rem;
    box-shadow: inset 0 2px 4px var(--shadow-color-light), 0 5px 10px var(--shadow-color-light);
}
body.dark-theme .time-box {
    border: 1px solid var(--glass-border-dark);
}

.time-box span {
    display: block;
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--highlight-color);
    transition: transform 0.5s;
    transform-style: preserve-3d;
}

.time-box span.flip {
    transform: rotateX(360deg);
}

.progress-container {
    margin-bottom: 2rem;
}

.progress-bar {
    background-color: rgba(var(--secondary-color-rgb), 0.2);
    border-radius: 10px;
    padding: 5px;
    border: 1px solid var(--glass-border-light);
    box-shadow: inset 0 1px 3px var(--shadow-color-light);
}
body.dark-theme .progress-bar {
    border: 1px solid var(--glass-border-dark);
}

.progress-bar-fill {
    height: 20px;
    background: linear-gradient(90deg, var(--highlight-color), #00c6ff);
    border-radius: 5px;
    width: 0%;
    transition: width 0.5s ease-in-out;
}

.notify-section h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.notify-form {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.notify-form input {
    width: 60%;
    padding: 0.8rem;
    border-radius: 5px;
    border: 1px solid var(--glass-border-light);
    background-color: rgba(var(--secondary-color-rgb), 0.2);
    color: var(--text-color);
    font-size: 1rem;
    margin-right: 10px;
    transition: all 0.3s;
}
body.dark-theme .notify-form input {
    border: 1px solid var(--glass-border-dark);
}


.notify-form input:focus {
    outline: none;
    border-color: var(--highlight-color);
    box-shadow: 0 0 0 3px rgba(var(--highlight-color-rgb),0.25);
}

.notify-form button {
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    border: none;
    background-color: var(--highlight-color);
    color: #fff;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    animation: pulse 2s infinite;
}

.notify-form button:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(var(--highlight-color-rgb),0.4);
}

@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(var(--highlight-color-rgb),0.4); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(var(--highlight-color-rgb),0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(var(--highlight-color-rgb),0); }
}

#form-message {
    min-height: 24px;
    font-weight: bold;
}

.social-links {
    margin-top: 2rem;
}

.social-links a {
    color: var(--text-color);
    font-size: 1.5rem;
    margin: 0 1rem;
    transition: transform 0.3s, color 0.3s, text-shadow 0.3s;
}

.social-links a:hover {
    color: var(--highlight-color);
    transform: translateY(-5px);
    text-shadow: 0 0 15px var(--highlight-color);
}

/* --- Trailer Widget --- */
.trailer-category-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border-light);
    padding-bottom: 0.5rem;
}
body.dark-theme .trailer-category-tabs {
    border-bottom: 1px solid var(--glass-border-dark);
}

.trailer-category-tabs button {
    flex-grow: 1;
    background: transparent;
    border: none;
    color: var(--text-color);
    padding: 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
}
.trailer-category-tabs button:hover {
    background-color: rgba(var(--secondary-color-rgb), 0.1);
    color: var(--highlight-color);
}
.trailer-category-tabs button.active {
    background-color: var(--highlight-color);
    color: white;
}

.trailer-poster-carousel {
    width: 100%;
}

.poster-items {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 0.5rem 0;
    justify-content: space-around;
}
.poster-item {
    cursor: pointer;
    border-radius: 8-px;
    overflow: hidden;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    width: 30%;
    max-width: 150px;
    box-shadow: 0 4px 10px var(--shadow-color-light);
}
.poster-item:hover {
    transform: scale(1.05);
    border-color: var(--highlight-color);
    box-shadow: 0 8px 20px var(--shadow-color-dark);
}

.poster-item img {
    width: 100%;
    height: auto;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    display: block;
    background-color: var(--accent-color);
}

/* --- Trailer Popup --- */
#trailer-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    z-index: 11000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}
#trailer-popup-overlay.visible {
    display: flex;
    opacity: 1;
}
#trailer-popup-content {
    position: relative;
    width: 90%;
    max-width: 960px;
    background-color: var(--secondary-color);
    border-radius: var(--border-radius-main);
    box-shadow: 0 10px 40px var(--shadow-color-dark);
    padding: 1rem;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}
#trailer-popup-overlay.visible #trailer-popup-content {
    transform: scale(1);
}

#trailer-popup-close {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid white;
    background-color: var(--highlight-color);
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}
#trailer-popup-close:hover {
    transform: scale(1.1) rotate(90deg);
}
#trailer-popup-content .video-container {
    position: relative;
    padding-top: 56.25%; /* 16:9 */
    width: 100%;
    background-color: #000;
    border-radius: 10px;
    overflow: hidden;
}
#trailer-popup-content iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}


.poll-form .poll-option {
    margin-bottom: 0.5rem;
}

.poll-form button {
     width: 100%;
     padding: 0.6rem;
     margin-top: 0.5rem;
     background-color: var(--highlight-color);
     color: white;
     border: none;
     border-radius: 5px;
     cursor: pointer;
     transition: background-color 0.3s;
     box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}
.poll-form button:hover {
    opacity: 0.9;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.music-player, .radio-player-widget {
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: inset 0 2px 4px var(--shadow-color-light);
}
.music-player .song-info, .radio-player-widget .station-info {
    margin-bottom: 1rem;
}
.music-player .controls button, .radio-player-widget .controls button {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.2rem;
    margin: 0 0.5rem;
    cursor: pointer;
    transition: color 0.3s, transform 0.2s;
}
.music-player .controls button:hover, .radio-player-widget .controls button:hover {
    color: var(--highlight-color);
    transform: scale(1.1);
}

/* Radio Player Volume Control */
.radio-player-widget .volume-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.radio-player-widget .volume-control i {
    font-size: 1rem;
    color: var(--text-color);
}

.radio-player-widget .volume-control input[type="range"] {
    flex-grow: 1;
    -webkit-appearance: none;
    appearance: none;
    background: var(--accent-color);
    border-radius: 5px;
    height: 6px;
    outline: none;
    transition: opacity .2s;
    cursor: pointer;
}

.radio-player-widget .volume-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--highlight-color);
    cursor: pointer;
    box-shadow: 0 0 5px rgba(var(--highlight-color-rgb), 0.5);
}

.radio-player-widget .volume-control input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--highlight-color);
    cursor: pointer;
    box-shadow: 0 0 5px rgba(var(--highlight-color-rgb), 0.5);
}

.digital-clock-widget {
    text-align: center;
    padding: 1rem;
}

#digital-clock {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    color: var(--highlight-color);
    letter-spacing: 2px;
    text-shadow: 0 0 5px var(--highlight-color);
    font-variant-numeric: tabular-nums;
}

/* --- Calendar Widget (Updated) --- */
.widget.calendar-widget {
    padding: 0; /* Remove default padding to allow image to span full width */
    overflow: hidden; /* To contain the border-radius of the image */
    background-color: transparent !important; /* Override glass for this specific widget container */
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}

.calendar-image-container {
    width: 100%;
    height: 150px;
    overflow: hidden;
    position: relative;
    background-color: var(--accent-color);
    border-radius: var(--border-radius-main) var(--border-radius-main) 0 0;
}

.calendar-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Cover the area, cropping if necessary */
    transition: opacity 0.5s ease-in-out, transform 0.5s ease;
    opacity: 0; /* Start hidden for the fade-in animation */
    transform: scale(1.1); /* Start slightly zoomed in for a subtle effect */
}

.calendar-image-container img.loaded {
    opacity: 1;
    transform: scale(1); /* Animate to normal size */
}

.widget.calendar-widget:hover .calendar-image-container img.loaded {
    transform: scale(1.05); /* A subtle zoom on hover */
}

.calendar-content {
    padding: 1.5rem; /* Apply padding to the content area below the image */
    background-color: var(--glass-bg-light);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-radius: 0 0 var(--border-radius-main) var(--border-radius-main);
}
body.dark-theme .calendar-content {
    background-color: var(--glass-bg-dark);
}

.calendar-content h3 {
    margin-top: 0;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0 0.5rem;
}

.calendar-header h4 {
    margin: 0;
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    color: var(--text-color);
    flex-grow: 1;
    text-align: center;
}

.calendar-header button {
    background: transparent;
    border: none;
    color: var(--text-color);
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s, color 0.3s, transform 0.2s;
}

.calendar-header button:hover {
    background-color: var(--primary-color);
    color: var(--highlight-color);
    transform: scale(1.1);
}

.calendar-grid {
    display: grid;
    gap: 0.5rem;
    min-height: 250px; /* Give a fixed height to prevent layout shifts during month change */
    position: relative;
}

.calendar-days-header, .calendar-days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    gap: 0.5rem;
}

.calendar-days-header div {
    font-weight: bold;
    font-size: 0.8rem;
    color: var(--highlight-color);
    padding-bottom: 0.5rem;
    text-transform: uppercase;
}

.calendar-days-grid {
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
    transform: scale(1);
    opacity: 1;
}

/* Animation class for month transitions */
.calendar-days-grid.fade-out {
    opacity: 0;
    transform: scale(0.98);
}

.calendar-days-grid .day {
    font-size: 0.8rem;
    padding: 0.3rem 0;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.calendar-days-grid .day.other-month {
    color: #aaa;
    opacity: 0.5;
    cursor: default;
}

body.dark-theme .calendar-days-grid .day.other-month {
    color: #666;
}

.calendar-days-grid .day:not(.other-month):not(.today):hover {
    background-color: var(--accent-color);
    transform: scale(1.1);
}

/* Enhanced style for the current day */
.calendar-days-grid .day.today {
    background-color: var(--highlight-color);
    color: white !important; /* Ensure text is white */
    font-weight: bold;
    border-color: var(--highlight-color);
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(var(--highlight-color-rgb), 0.6);
    z-index: 2; /* Bring to front */
}

/* "TODAY" label above the current day */
.calendar-days-grid .day.today::before {
    content: 'TODAY';
    position: absolute;
    top: -12px;
    font-size: 0.5rem;
    background: var(--highlight-color);
    color: white;
    padding: 1px 4px;
    border-radius: 4px;
    font-weight: bold;
    animation: pulse-label 2s infinite;
}

@keyframes pulse-label {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.calendar-days-grid .day.selected {
    border-color: var(--highlight-color);
    background-color: var(--accent-color);
}


/* --- Weather Widget --- */
.weather-widget {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.city-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1rem;
    position: relative;
    padding-bottom: 1rem;
}

.city-tabs::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background-color: var(--glass-border-light);
}
body.dark-theme .city-tabs::after {
    background-color: var(--glass-border-dark);
}


.city-tabs button {
    background: transparent;
    border: none;
    color: var(--text-color);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
}

.city-tabs button:hover {
    background-color: rgba(var(--secondary-color-rgb), 0.1);
    color: var(--highlight-color);
}

.city-tabs button.active {
    color: var(--highlight-color);
    font-weight: bold;
}

.city-tabs button.active::after {
    content: '';
    position: absolute;
    bottom: -1rem; /* Position it over the main border-bottom */
    left: 15%;
    right: 15%;
    height: 3px;
    background-color: var(--highlight-color);
    border-radius: 2px;
    animation: slide-in 0.3s ease-out;
}

@keyframes slide-in {
    from {
        width: 0;
        left: 50%;
        right: 50%;
    }
    to {
        width: 70%;
        left: 15%;
        right: 15%;
    }
}

.weather-alarms {
    margin-bottom: 1rem;
}
.weather-alarm {
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    background-color: var(--alert-warning-color);
    color: #333;
    font-weight: bold;
    animation: pulse-alarm 2s infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.weather-alarm.active {
    display: flex;
}
.weather-alarm i {
    margin-right: 0.5rem;
}

@keyframes pulse-alarm {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}


.weather-main-info {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 2rem;
}

.weather-widget .weather-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.weather-widget .weather-icon i {
    font-size: 5rem;
    color: var(--highlight-color);
}

.weather-widget .temperature {
    font-size: 3.5rem;
    font-weight: bold;
    margin: 0;
    line-height: 1;
}

.weather-widget .weather-description {
    font-size: 1.2rem;
    color: #888;
    text-transform: capitalize;
}
body.dark-theme .weather-widget .weather-description {
    color: #bbb;
}

.weather-widget .high-low-temp {
    font-size: 1rem;
    color: #888;
}
body.dark-theme .weather-widget .high-low-temp {
    color: #bbb;
}

.weather-widget .location {
    font-size: 1.1rem;
    color: #888;
}
body.dark-theme .weather-widget .location {
    color: #bbb;
}

.weather-details {
    display: flex;
    gap: 1rem;
    font-size: 1rem;
}
.detail-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.detail-item i {
    color: var(--highlight-color);
    width: 20px;
    text-align: center;
}

.weather-widget .hazard-watch {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.8rem;
    padding-top: 1rem;
    border-top: 1px solid var(--glass-border-light);
    width: 100%;
}
body.dark-theme .weather-widget .hazard-watch {
    border-top: 1px solid var(--glass-border-dark);
}

.weather-widget .hazard-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    text-align: left;
    background-color: rgba(var(--secondary-color-rgb), 0.1);
    padding: 0.5rem;
    border-radius: 8px;
}
.weather-widget .hazard-item i {
    font-size: 1.2rem;
    color: var(--highlight-color);
    width: 20px;
    text-align: center;
}
.weather-widget .hazard-item .status {
    font-weight: bold;
}

.weather-widget .hazard-item .status.none { color: var(--hazard-safe-color); }
.weather-widget .hazard-item .status.low { color: var(--hazard-low-risk-color); }
.weather-widget .hazard-item .status.moderate { color: var(--hazard-moderate-risk-color); }
.weather-widget .hazard-item .status.high { color: var(--hazard-high-risk-color); }

.hourly-forecast-container {
    position: relative;
    width: 100%;
    padding: 1rem 0;
    border-top: 1px solid var(--glass-border-light);
    min-width: 0; /* Flexbox fix to prevent stretching */
}
body.dark-theme .hourly-forecast-container {
    border-top: 1px solid var(--glass-border-dark);
}

.hourly-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    background-color: rgba(var(--secondary-color-rgb), 0.8);
    border: 1px solid var(--accent-color);
    color: var(--text-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px var(--shadow-color-light);
}

.hourly-arrow:hover {
    background-color: var(--highlight-color);
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.hourly-arrow.left {
    left: -10px;
}

.hourly-arrow.right {
    right: -10px;
}


.weather-widget .hourly-forecast {
    width: 100%;
    overflow-x: scroll;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    scroll-behavior: smooth;
}

.weather-widget .hourly-forecast::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.weather-widget .hourly-items {
    display: flex;
    flex-wrap: nowrap;
    gap: 1rem;
    padding: 0 0.5rem;
}

.weather-widget .hourly-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    min-width: 80px;
    background-color: rgba(var(--secondary-color-rgb), 0.1);
    padding: 0.75rem 0.5rem;
    border-radius: 10px;
    border: 1px solid var(--glass-border-light);
}
body.dark-theme .weather-widget .hourly-item {
    border: 1px solid var(--glass-border-dark);
}
.weather-widget .hourly-item .time {
    font-weight: bold;
    font-size: 0.8rem;
}
.weather-widget .hourly-item i {
    font-size: 1.8rem;
    color: var(--highlight-color);
}
.weather-widget .hourly-item .temp {
    font-weight: bold;
    font-size: 1rem;
}
.weather-widget .hourly-item .description {
    font-size: 0.75rem;
    color: #888;
    text-transform: capitalize;
    white-space: normal;
    text-align: center;
}
body.dark-theme .weather-widget .hourly-item .description {
    color: #bbb;
}


/* --- Other Widgets --- */

.online-users-widget p {
    font-size: 1.5rem;
    font-weight: bold;
    text-align: center;
    margin: 1rem 0;
}
.online-users-widget p i { margin-right: 0.5rem; }

.forum-widget table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.forum-widget th, .forum-widget td {
    text-align: left;
    padding: 0.8rem; /* Increased padding */
    border-bottom: 1px solid var(--glass-border-light);
}
body.dark-theme .forum-widget th, body.dark-theme .forum-widget td {
    border-bottom: 1px solid var(--glass-border-dark);
}
.forum-widget th {
    background-color: rgba(var(--secondary-color-rgb), 0.1); /* Different background for header */
    color: var(--highlight-color);
}
.forum-widget tbody tr:hover {
    background-color: rgba(var(--secondary-color-rgb), 0.1); /* Hover effect for rows */
}

.tv-guide-widget ul li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0;
    border-bottom: 1px dashed var(--accent-color);
}
.tv-guide-widget ul li:last-child {
    border-bottom: none;
}
.tv-guide-widget ul li span {
    font-weight: bold;
    color: var(--highlight-color);
    min-width: 90px; /* Align time */
}

.quick-links-widget ul li {
    padding: 0.4rem 0;
    border-bottom: 1px dashed var(--accent-color);
}
.quick-links-widget ul li:last-child {
    border-bottom: none;
}
.quick-links-widget ul li a {
    display: block; /* Make links block level for better click area */
    padding: 5px 0;
}

.radio-player-widget .station-info {
    margin-bottom: 0.8rem;
}
.radio-player-widget .station-info p {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--text-color);
}

.events-calendar-widget ul li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.4rem 0;
    border-bottom: 1px dashed var(--accent-color);
}
.events-calendar-widget ul li:last-child {
    border-bottom: none;
}
.events-calendar-widget ul li span {
    font-weight: bold;
    color: var(--highlight-color);
    min-width: 70px; /* Align date */
}


.layout-controls .control-group {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9em;
}
.layout-controls label {
    min-width: 50px;
}
.layout-controls input[type="range"] {
    width: 100%;
}


.site-footer-bottom {
    padding: 1rem 0;
    background-color: var(--secondary-color);
    border-top: 1px solid var(--accent-color);
}

/* --- Device Viewport Wrapper --- */
.viewport-wrapper {
    transition: all 0.5s ease-in-out;
    width: 100%;
}

.viewport-wrapper.mobile, .viewport-wrapper.tablet {
    border: 8px solid #333;
    border-radius: 20px;
    box-shadow: 0 20px 50px var(--shadow-color-dark);
    margin: 1rem;
    overflow: hidden;
    position: relative;
}

.viewport-wrapper.mobile::before, .viewport-wrapper.tablet::before {
    content: '';
    position: absolute;
    top: 0px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 15px;
    background: #333;
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;
    z-index: 1001;
}

.viewport-wrapper.mobile > .page-content,
.viewport-wrapper.tablet > .page-content {
    height: 80vh;
    max-height: 800px;
    overflow-y: auto;
    background: var(--primary-color);
}

.viewport-wrapper.mobile { max-width: 414px; }
.viewport-wrapper.tablet { max-width: 768px; }
.viewport-wrapper.desktop { max-width: 100%; }

/* --- Scoped styles for device previews --- */
.viewport-wrapper.mobile .dashboard-grid,
.viewport-wrapper.tablet .dashboard-grid {
    display: flex;
    flex-direction: column;
    align-items: stretch; /* Stretch items to full width */
    padding: 1rem;
    gap: 1rem;
}

.viewport-wrapper.mobile .container,
.viewport-wrapper.tablet .container {
    padding: 1.5rem;
}

.viewport-wrapper.mobile .main-title { font-size: 2rem; }
.viewport-wrapper.tablet .main-title { font-size: 2.5rem; }

.viewport-wrapper.mobile .time-box {
    min-width: 60px;
    padding: 0.5rem;
}
.viewport-wrapper.mobile .time-box span { font-size: 1.5rem; }

/* --- Accessibility --- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}


/* --- Responsive Adjustments --- */
@media (max-width: 1200px) {
    .top-nav {
        justify-content: center;
    }
    .top-nav .nav-links {
        order: 2;
        width: 100%;
        justify-content: center;
        margin-top: 0.5rem;
    }
    .top-nav .switcher-controls {
        order: 1;
    }
    .dashboard-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "middle-col middle-col"
            "left-col right-col";
    }
}

@media (max-width: 992px) {
    .top-nav .nav-links a {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    .banner-container,
    .userbar-container,
    .dashboard-grid {
        margin-left: 1rem;
        margin-right: 1rem;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (max-width: 768px) {
    .top-nav {
        padding: 1rem;
        justify-content: space-between;
    }
    .top-nav .nav-links {
        display: none; /* Hide nav links for a potential mobile menu button */
    }
    .user-info span {
        display: none; /* Hide username on mobile */
    }

    .banner-container,
    .userbar-container,
    .dashboard-grid {
        margin-left: 0;
        margin-right: 0;
        border-radius: 0;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
        grid-template-areas:
            "middle-col"
            "left-col"
            "right-col";
    }
    .container {
        padding: 2rem 1.5rem;
    }
    .main-title {
        font-size: 2.2rem;
    }
    .notify-form {
        flex-direction: column;
        align-items: center;
    }
    .notify-form input {
        width: 100%;
        margin-right: 0;
        margin-bottom: 10px;
    }
    .notify-form button {
        width: 100%;
    }
}

/* --- New Top 10 Widget Styles --- */
.top-10-widget .top-10-category-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border-light);
    padding-bottom: 0.5rem;
}
body.dark-theme .top-10-widget .top-10-category-tabs {
    border-bottom: 1px solid var(--glass-border-dark);
}

.top-10-widget .top-10-category-tabs button {
    flex-grow: 1;
    background: transparent;
    border: none;
    color: var(--text-color);
    padding: 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
}
.top-10-widget .top-10-category-tabs button:hover {
    background-color: rgba(var(--secondary-color-rgb), 0.1);
    color: var(--highlight-color);
}
.top-10-widget .top-10-category-tabs button.active {
    background-color: var(--highlight-color);
    color: white;
}

.top-10-widget .top-10-list {
    list-style: decimal; /* Ordered list */
    padding-left: 1.5rem; /* Indent for numbers */
    display: flex; /* Use flex for horizontal layout of image/text */
    flex-direction: column; /* Stack items vertically */
    gap: 1rem; /* Space between list items */
}

.top-10-widget .top-10-list li {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    color: var(--text-color);
    display: flex; /* Use flex for image and content side-by-side */
    align-items: flex-start; /* Align image and text to the top */
    gap: 0.75rem; /* Space between image and content */
    opacity: 0; /* Start invisible */
    transform: translateY(10px); /* Start slightly below */
    transition: opacity 0.5s ease-out, transform 0.5s ease-out; /* Smooth transition */
    padding-bottom: 0.75rem; /* Add some padding below each item */
    border-bottom: 1px dashed var(--accent-color); /* Separator */
}

.top-10-widget .top-10-list li:last-child {
    border-bottom: none; /* No border for the last item */
    padding-bottom: 0;
}

.top-10-widget .top-10-list li.show-item {
    opacity: 1;
    transform: translateY(0);
}

.top-10-widget .top-10-list li img {
    width: 50px; /* Fixed width for thumbnail */
    height: 75px; /* Fixed height for thumbnail (aspect ratio 2:3) */
    object-fit: cover; /* Cover the area, cropping if necessary */
    border-radius: 8px; /* Rounded corners for images */
    flex-shrink: 0; /* Prevent image from shrinking */
    box-shadow: 0 2px 5px var(--shadow-color-light); /* Subtle shadow for images */
    margin-left: -1rem; /* Adjust to align with list numbering */
}

.top-10-widget .top-10-list li .top-10-item-content {
    display: flex;
    flex-direction: column;
    text-align: left; /* Ensure text is left-aligned */
}

.top-10-widget .top-10-list li strong {
    font-size: 1.05rem; /* Slightly larger title */
    color: var(--highlight-color);
    margin-bottom: 0.25rem;
    display: block; /* Ensure it takes its own line */
}

.top-10-widget .top-10-list li p {
    font-size: 0.85rem;
    color: var(--text-color);
    line-height: 1.4;
    margin: 0; /* Remove default paragraph margin */
}

/* Adjust list numbering for combined content */
.top-10-widget .top-10-list {
    counter-reset: top-10-counter; /* Initialize counter */
}

.top-10-widget .top-10-list li::before {
    content: counter(top-10-counter) ". "; /* Display counter */
    counter-increment: top-10-counter; /* Increment counter */
    font-weight: bold;
    color: var(--highlight-color);
    position: absolute;
    left: 0; /* Position the number */
    transform: translateX(-100%); /* Move it outside the list item content area */
    top: 0; /* Align with the top of the list item */
    font-size: 1.1rem;
}

.top-10-widget .top-10-list li {
    position: relative; /* Needed for absolute positioning of ::before */
    padding-left: 1.5rem; /* Make space for the number */
}
