/* Dark Theme Global Overrides */
body.dark-theme {
    background: #121212 url(https://u-roleplay.com/gtav/Themes/urp/images/siyahbg.png) no-repeat fixed center center / cover !important;
    color: #e0e0e0;
}

/* ==========================================================================
   Links & Text
   ========================================================================== */

body.dark-theme a:link,
body.dark-theme a:visited {
    color: #d0d0d0;
}

body.dark-theme a:hover {
    color: #f5f5f5 !important;
    text-decoration: none;
}

body.dark-theme h1,
body.dark-theme h2,
body.dark-theme h3,
body.dark-theme h4,
body.dark-theme h5,
body.dark-theme h6 {
    color: #f5f5f5 !important;
}

body.dark-theme .smalltext,
body.dark-theme .middletext,
body.dark-theme .normaltext {
    color: #d0d0d0;
}

/* ==========================================================================
   Containers & Content Boxes
   ========================================================================== */
body.dark-theme .windowbg,
body.dark-theme .roundframe,
body.dark-theme .information,
body.dark-theme .description,
body.dark-theme .description_board,
body.dark-theme .plainbox,
body.dark-theme #recent_posts_content {
    background-color: #1e1e1e !important;
    border-color: #333 !important;
    color: #e0e0e0 !important;
}

body.dark-theme .windowbg2 {
    background-color: #232323 !important;
    border-color: #333 !important;
    color: #e0e0e0 !important;
}

body.dark-theme .windowbg3 {
    background-color: #2a2a2a !important;
    border-color: #333 !important;
    color: #e0e0e0 !important;
}

body.dark-theme .approvebg {
    background-color: #3e2727 !important;
    color: #e0e0e0 !important;
}

body.dark-theme .stickybg,
body.dark-theme .stickybg2 {
    background-color: #2c2525 !important;
    color: #e0e0e0 !important;
}

body.dark-theme .lockedbg,
body.dark-theme .lockedbg2 {
    background-color: #25252c !important;
    color: #e0e0e0 !important;
}

/* ==========================================================================
   Headers, Bars & Titles
   ========================================================================== */
body.dark-theme .catbg,
body.dark-theme .catbg2,
body.dark-theme tr.catbg th,
body.dark-theme tr.catbg td,
body.dark-theme .titlebg,
body.dark-theme .titlebg2,
body.dark-theme tr.titlebg th,
body.dark-theme tr.titlebg td,
body.dark-theme .title_barIC>.titlebg {
    background: #2c2c2c !important;
    color: #fff !important;
    border-color: #444 !important;
    box-shadow: none !important;
}

body.dark-theme .catbg a,
body.dark-theme .titlebg a {
    color: #fff !important;
}

/* ==========================================================================
   Navigation, Menus & Breadcrumbs
   ========================================================================== */
body.dark-theme .navigate_section {
    background: #1e1e1e;
    border: 1px solid #333;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

body.dark-theme .navigate_section ul li {
    color: #e0e0e0 !important;
}

body.dark-theme .navigate_section ul li a {
    color: #b0b0b0 !important;
}

body.dark-theme .navigate_section ul li a:hover {
    color: #fff !important;
}

body.dark-theme .navigate_section ul li:last-child span {
    color: #bd414b !important;
    font-weight: bold;
}

/* Dropdown Menus */
body.dark-theme .dropmenu li a {
    background: #252525 !important;
    color: #e0e0e0 !important;
    border: 1px solid #333 !important;
}

body.dark-theme .dropmenu li a:hover,
body.dark-theme .dropmenu li:hover>a,
body.dark-theme .dropmenu li>a.active {
    background: #bd414b !important;
    color: #fff !important;
    border-color: #bd414b !important;
}

body.dark-theme #topnav>li>a.firstlevel.active {
    color: #bd414b !important;
    border-bottom-color: #bd414b !important;
    text-shadow: 0 0 10px rgba(189, 65, 75, 0.3) !important;
}

body.dark-theme .dropmenu li ul {
    background: #1e1e1e;
    border: 1px solid #333;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

/* GTA V Forum Button Dark Theme */
body.dark-theme .gtav-forum-btn:hover,
body.dark-theme .gtav-forum-btn:hover * {
    color: #bd414b !important;
    border-color: #bd414b !important;
}

/* Button Lists */
body.dark-theme .buttonlist li a {
    background: #252525 !important;
    color: #e0e0e0 !important;
    border: 1px solid #333 !important;
    box-shadow: none;
}

body.dark-theme .buttonlist li a:hover {
    background: #333 !important;
    color: #fff !important;
    border-color: #444 !important;
}

body.dark-theme .buttonlist li a.active {
    background: #bd414b !important;
    color: #fff !important;
    border-color: #bd414b !important;
}

/* ==========================================================================
   Forms & Inputs
   ========================================================================== */
body.dark-theme input[type="text"],
body.dark-theme input[type="password"],
body.dark-theme input[type="search"],
body.dark-theme input[type="email"],
body.dark-theme textarea,
body.dark-theme select {
    background: #121212 !important;
    color: #fff !important;
    border: 1px solid #444 !important;
}

body.dark-theme input:focus,
body.dark-theme textarea:focus,
body.dark-theme select:focus {
    border-color: #bd414b !important;
    outline: none;
}

body.dark-theme button,
body.dark-theme .button_submit,
body.dark-theme .button_reset {
    background: #333 !important;
    color: #e0e0e0;
    border: 1px solid #444;
    background-image: none;
}

body.dark-theme button:hover,
body.dark-theme .button_submit:hover,
body.dark-theme .button_reset:hover {
    background: #bd414b;
    color: #fff;
    border-color: #bd414b;
}

/* ==========================================================================
   Tables & Lists
   ========================================================================== */
body.dark-theme table.table_grid {
    border-color: #333 !important;
}

body.dark-theme .haber-card {
    background: #1a1a1a !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6) !important;
}

body.dark-theme .haber-title {
    color: #eeeeee !important;
}

body.dark-theme .haber-description {
    color: #bbbbbb !important;
}

body.dark-theme .haber-date {
    color: #999999 !important;
}

body.dark-theme .recent-message-card {
    background: #232323 !important;
}

body.dark-theme .ads-wrapper {
    background: #1e1e1e !important;
}

body.dark-theme .ads-card {
    background: #232323 !important;
}

body.dark-theme .ads-badge {
    background: #2a2a2a !important;
    color: #e0e0e0 !important;
}

body.dark-theme .stat-pill {
    background: #232323 !important;
    color: #dddddd !important;
}

body.dark-theme #last-ads {
    background: #1e1e1e !important;
    border: 1px solid #333 !important;
}

body.dark-theme #forum-stats {
    background: #1e1e1e !important;
    border: 1px solid #333 !important;
}

body.dark-theme #online-users-section {
    background: #1e1e1e !important;
    border: 1px solid #333 !important;
    padding: 6px !important;
    border-radius: 4px;
}

body.dark-theme #online-users-section .inline.stats {
    color: #e0e0e0 !important;
}

body.dark-theme .merddz-nick h4 {
    color: inherit !important;
}

body.dark-theme .merddz-nick h4 a:not([style]) {
    color: inherit !important;
}

body.dark-theme .merddz-nick h4 a[style] *,
body.dark-theme .merddz-nick h4 a span[style] {
    color: inherit !important;
}

body.dark-theme a.merddz-user-link,
body.dark-theme a.merddz-user-link:link,
body.dark-theme a.merddz-user-link:visited,
body.dark-theme a.merddz-user-link:hover,
body.dark-theme a.merddz-user-link:active {
    color: inherit;
}

body.dark-theme .fa-solid.fa-comments,
body.dark-theme .fa-comments {
    color: #fff !important;
}

body.dark-theme .fa-solid.fa-clipboard,
body.dark-theme .fa-clipboard {
    color: #fff !important;
}

body.dark-theme .uframe {
    background-image: url(https://u-roleplay.com/forum/Themes/urp/images/backblack.png?v=20260111) !important;
}

body.dark-theme .moderators-label {
    color: #ffffff !important;
    font-weight: 600;
}

body.dark-theme p.desc,
body.dark-theme .desc,
body.dark-theme .description_board {
    color: #cfcfcf !important;
}

/* Override conflicting white background from index.css */
body.dark-theme #upshrinkHeaderIC>div,
body.dark-theme #upshrinkHeaderIC>p {
    background-color: transparent !important;
    color: #e0e0e0 !important;
}

body.dark-theme hr {
    background-color: #444 !important;
    height: 1px !important;
    border: 0 !important;
}

/* Ensure subject and desc text is readable */
body.dark-theme .subject,
body.dark-theme .desc {
    color: #e0e0e0 !important;
}

body.dark-theme table.table_grid td,
body.dark-theme table.table_list td,
body.dark-theme table.table_grid th {
    border-color: #333 !important;
}

body.dark-theme tr.windowbg:hover,
body.dark-theme tr.windowbg2:hover {
    background-color: #2a2a2a !important;
}

/* ==========================================================================
   Posts, Messages & Quotes
   ========================================================================== */
body.dark-theme .post,
body.dark-theme .personalmessage {
    color: #ddd;
}

body.dark-theme .signature {
    border-top: 1px solid #333;
    color: #aaa;
}

body.dark-theme blockquote.bbc_standard_quote,
body.dark-theme blockquote.bbc_alternate_quote {
    background: #252525 !important;
    border: 1px solid #333 !important;
    color: #ccc !important;
}

body.dark-theme code.bbc_code {
    background: #181818 !important;
    border: 1px solid #333 !important;
    color: #a5d6a7 !important;
}

body.dark-theme .list_posts {
    border-color: #333;
}

/* ==========================================================================
   Miscellaneous
   ========================================================================== */
body.dark-theme hr #content {
    background-color: #333;
    color: #333;
    border-color: #333;
}

body.dark-theme .up_contain {
    border-color: #333;
}

body.dark-theme .board_row,
body.dark-theme .topic_row {
    border-color: #333;
}

/* Footer & Copyright areas */
body.dark-theme #footer_section {
    background-color: #121212;
    color: #888;
}

/* User Card/Profile Specifics */
body.dark-theme .visitor-container {
    background: #1e1e1e !important;
    border: 1px solid #333;
    color: #ccc;
}

/* Fix for #upshrinkHeaderIC white background issue */
body.dark-theme #upshrinkHeaderIC>div,
body.dark-theme #upshrinkHeaderIC>p {
    background-color: transparent !important;
    color: #e0e0e0 !important;
}

body.dark-theme hr {
    background-color: #333 !important;
    border-color: #333 !important;
}

/* Modern Profile & Character List Dark Mode Overrides */
body.dark-theme .ucp-card {
    background: #1e1e1e !important;
    border-color: #333 !important;
    box-shadow: none !important;
}

body.dark-theme .ucp-card-title {
    color: #e0e0e0 !important;
}

body.dark-theme .ucp-meta-item {
    background: #252525 !important;
    border-color: #333 !important;
}

body.dark-theme .ucp-meta-value {
    color: #fff !important;
}

body.dark-theme .ucp-card-img {
    border-color: #333 !important;
}

body.dark-theme .profile-card {
    background: #1e1e1e !important;
    border-color: #333 !important;
    color: #e0e0e0 !important;
}

/* ==========================================================================
   Server Statistics Icons - Dark Theme Visibility Fix
   ========================================================================== */
/* Fix icon visibility in dark theme for server statistics */
body.dark-theme .stat-pill i {
    color: #ffffff !important;
    background: #2a2a2a !important;
}

/* Specific icon color fixes for statistics section */
body.dark-theme .fa-house,
body.dark-theme .fa-solid.fa-house {
    color: #ffffff !important;
}

body.dark-theme .fa-store,
body.dark-theme .fa-solid.fa-store {
    color: #ffffff !important;
}

body.dark-theme .fa-car-side,
body.dark-theme .fa-solid.fa-car-side {
    color: #ffffff !important;
}

body.dark-theme .fa-sack-dollar,
body.dark-theme .fa-solid.fa-sack-dollar {
    color: #ffffff !important;
}

body.dark-theme .fa-shield,
body.dark-theme .fa-solid.fa-shield {
    color: #ffffff !important;
}

body.dark-theme .fa-hand-holding-medical,
body.dark-theme .fa-solid.fa-hand-holding-medical {
    color: #ffffff !important;
}

body.dark-theme .fa-user,
body.dark-theme .fa-solid.fa-user {
    color: #ffffff !important;
}

body.dark-theme .fa-users,
body.dark-theme .fa-solid.fa-users {
    color: #ffffff !important;
}

body.dark-theme .fa-database,
body.dark-theme .fa-solid.fa-database {
    color: #ffffff !important;
}

/* New Statistics Section Dark Theme Overrides */
body.dark-theme .lists-container {
    background: transparent;
}

body.dark-theme .stats-column {
    background: #1e1e1e !important;
    border-color: #333 !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

body.dark-theme .stats-header {
    background: #2c2c2c !important;
}

body.dark-theme .stats-header h3 {
    color: #f5f5f5 !important;
}

body.dark-theme .stats-table-wrapper {
    background: #1e1e1e;
}

body.dark-theme .stats-table th {
    background: rgba(255, 255, 255, 0.03);
    border-bottom-color: #333;
    color: #e0e0e0;
}

body.dark-theme .stats-table td {
    border-bottom-color: #333;
    color: #d0d0d0;
}

body.dark-theme .stats-table tr:hover {
    background: #252525 !important;
}

body.dark-theme .rank-pill {
    background: rgba(149, 117, 205, 0.15);
    color: #9575cd;
}

body.dark-theme .name-cell a {
    color: #e0e0e0;
}

body.dark-theme .name-cell a:hover {
    color: #9575cd;
}

/* ==========================================================================
   Section Titles & Headers - Dark Theme Fix
   ========================================================================== */
/* Fix "Son Reklamlar" and "Sunucu İstatistikleri" titles */
body.dark-theme .title_barIC .titlebg {
    background: #2c2c2c !important;
    color: #ffffff !important;
}

body.dark-theme .title_barIC .titlebg span {
    color: #ffffff !important;
}

body.dark-theme .title_barIC .titlebg i {
    color: #ffffff !important;
}

body.dark-theme .ie6_header {
    color: #ffffff !important;
}

/* ==========================================================================
   Server Statistics Section - Complete Fix
   ========================================================================== */
/* Fix stat pill backgrounds and text */
/* ==========================================================================
   Server Statistics Section - Dark Theme handled via CSS variables
   ========================================================================== */

/* ==========================================================================
   Recent Posts & News Slider - Dark Theme Fix
   ========================================================================== */
body.dark-theme .recent-message-card {
    background: #232323 !important;
    border: 1px solid #333;
    color: #e0e0e0 !important;
}

body.dark-theme .recent-message-card span,
body.dark-theme .recent-message-card strong,
body.dark-theme .recent-message-card dd {
    color: #e0e0e0 !important;
}

body.dark-theme .recent-message-card i {
    color: #cccccc !important;
}

body.dark-theme .recent-message-card a {
    color: #e0e0e0;
}

body.dark-theme .recent-message-card a:hover {
    color: #9575cd !important;
}

/* Fix News Slider Cards */
body.dark-theme .haber-card {
    background: #1e1e1e !important;
    border: 1px solid #333 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

body.dark-theme .haber-title {
    color: #e0e0e0 !important;
}

body.dark-theme .haber-description {
    color: #b0b0b0 !important;
}

body.dark-theme .haber-footer {
    border-top-color: #333 !important;
}

body.dark-theme .haber-date {
    color: #888 !important;
}

/* ==========================================================================
   Last Ads & Additional Fixes
   ========================================================================== */
body.dark-theme #last-ads {
    background: #1e1e1e !important;
}

body.dark-theme .ads-wrapper[style*="background: white"] {
    background: #1e1e1e !important;
}

/* ==========================================================================
   Additional Icon Fixes
   ========================================================================== */
body.dark-theme .fa-adversal,
body.dark-theme .fa-brands.fa-adversal {
    color: #ffffff !important;
}

body.dark-theme .fa-circle-info,
body.dark-theme .fa-solid.fa-circle-info {
    color: #ffffff !important;
}

body.dark-theme .fa-message,
body.dark-theme .fa-solid.fa-message {
    color: #ffffff !important;
}

body.dark-theme .fa-file,
body.dark-theme .fa-solid.fa-file {
    color: #ffffff !important;
}

body.dark-theme .fa-clock,
body.dark-theme .fa-solid.fa-clock {
    color: #ffffff !important;
}

body.dark-theme .fa-phone-volume,
body.dark-theme .fa-solid.fa-phone-volume {
    color: #ffffff !important;
}

/* ==========================================================================
   Bootstrap Dark Theme Compatibility
   ========================================================================== */
body.dark-theme .btn,
body.dark-theme .btn-link,
body.dark-theme .text-primary,
body.dark-theme a.text-primary,
body.dark-theme a:not([style]).text-primary,
body.dark-theme .page-link,
body.dark-theme .nav-link,
body.dark-theme .pagination .page-link {
    color: #e0e0e0 !important;
}

body.dark-theme .btn-primary,
body.dark-theme .btn-info,
body.dark-theme .btn-outline-primary:hover,
body.dark-theme .btn-outline-info:hover,
body.dark-theme .page-item.active .page-link,
body.dark-theme .badge-primary,
body.dark-theme .bg-primary {
    background: #bd414b !important;
    border-color: #bd414b !important;
    color: #fff !important;
}

body.dark-theme .btn-primary:hover,
body.dark-theme .btn-primary:focus,
body.dark-theme .btn-primary:active,
body.dark-theme .btn-info:hover,
body.dark-theme .btn-info:focus,
body.dark-theme .btn-info:active,
body.dark-theme .page-link:hover,
body.dark-theme .page-link:focus {
    background: #a83a43 !important;
    border-color: #a83a43 !important;
    color: #fff !important;
    box-shadow: none !important;
}

body.dark-theme .btn-outline-primary,
body.dark-theme .btn-outline-info,
body.dark-theme .page-link {
    background: #252525 !important;
    border-color: #444 !important;
}

body.dark-theme .btn-outline-primary,
body.dark-theme .btn-outline-primary:focus,
body.dark-theme .btn-outline-info,
body.dark-theme .btn-outline-info:focus,
body.dark-theme .btn-link:hover,
body.dark-theme .btn-link:focus,
body.dark-theme a.text-primary:hover,
body.dark-theme a.text-primary:focus {
    color: #fff !important;
    box-shadow: none !important;
    text-decoration: none;
}

/* ==========================================================================
   Section Headers (Dark Gradient in Dark Theme)
   ========================================================================== */
body.dark-theme .urp-section-header {
    background: linear-gradient(90deg, #2c2c2c, #1a1a1a) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
    border: 1px solid #333 !important;
}

body.dark-theme .urp-section-header.muted {
    background: linear-gradient(90deg, #222222, #111111) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
    border: 1px solid #2a2a2a !important;
}

body.dark-theme .urp-section-title {
    color: #e0e0e0 !important;
}

body.dark-theme .urp-section-header {
    background: #1a1a1a !important;
    border: 1px solid #333 !important;
}

body.dark-theme .urp-section-title {
    color: #e0e0e0 !important;
}

body.dark-theme .urp-section-title i {
    color: #ffffff !important;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
}

/* Modern Stats Buttons (Dark Mode) */
body.dark-theme .urp-stats-btn {
    background: rgba(255, 255, 255, 0.05);
    color: #aaaaaa !important;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

body.dark-theme .urp-stats-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Board Icons (Read/Unread Colors) */
body.dark-theme .board-left i.newi {
    color: #ffffff !important;
}

body.dark-theme .board-left i.oldi {
    color: #555555 !important;
}

/* BBCode Black Color Override for Dark Theme */
body.dark-theme .bbc_color[style*="color: black" i],
body.dark-theme .bbc_color[style*="color:black" i],
body.dark-theme .bbc_color[style*="color: #000" i],
body.dark-theme .bbc_color[style*="color:#000" i],
body.dark-theme .bbc_color[style*="rgb(0, 0, 0)" i],
body.dark-theme .bbc_color[style*="rgb(0,0,0)" i],
body.dark-theme span[style*="color: black" i],
body.dark-theme span[style*="color:black" i] {
    color: #ffffff !important;
}