/*
Theme Name: BLACK NEON
Theme URI: https://sudahbisa.com
Author: Al Amin
Author URI: https://sudahbisa.com
Description: Fast and responsive WordPress theme For Adsense
Version: 1.2
*/

/* Plugin protection - completely isolate theme styles */
/* Only apply theme styles to specific theme containers */

/* Disable theme styles for any plugin-related elements */
[class*="plugin"] *,
[id*="plugin"] *,
[class*="elementor"] *,
[class*="vc_"] *,
[class*="wpforms"] *,
[class*="contact-form"] *,
[class*="shortcode"] *,
.wp-block *,
[class*="widget"]:not(.widget) *,
[class*="popup"] *,
[class*="modal"] *,
[class*="overlay"] *,
[id*="wpcf7"] *,
[class*="wpcf7"] *,
[class*="mc4wp"] * {
    all: revert !important;
    font-family: inherit !important;
    color: inherit !important;
    background: inherit !important;
    box-sizing: content-box !important;
}

/* Global box-sizing fix - only for theme content */
body:not(.wp-admin):not(.wp-login) #main-content *, 
body:not(.wp-admin):not(.wp-login) header *,
body:not(.wp-admin):not(.wp-login) footer *,
body:not(.wp-admin):not(.wp-login) #main-content *::before, 
body:not(.wp-admin):not(.wp-login) #main-content *::after {
    box-sizing: border-box;
}

body:not(.wp-admin) html {
    overflow-x: hidden;
}

/* Frontend-only body styling */
body:not(.wp-admin):not(.wp-login) {
    background: #000;
    color: #2bf011;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    box-sizing: border-box;
}

header {
    background: #000;
    border-bottom: 1px solid #2bf011;
    padding: 15px 0;
}

.logo h1 {
    margin: 0;
    font-size: 24px;
}

nav {
    background: #000;
}

.main-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
}

.main-menu li a {
    color: #2bf011;
    padding: 14px 16px;
    display: block;
    text-decoration: none;
}

.main-menu li a:hover {
    background: #111;
}

#main-content {
    display: flex;
    gap: 20px;
    margin: 20px 0;
}

.content {
    flex: 3;
}

#sidebar {
    flex: 1;
}

footer {
    background: #000;
    color: #2bf011;
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
}

.post-title {
    margin: 0 0 10px;
}

.post-meta {
    font-size: 14px;
    color: #888;
}

.menu-toggle {
    position: absolute;
    top: 15px;
    left: auto;
    right: 15px;
    z-index: 9999;
    width: auto;
    display: none;
}

/* Fix main content centering */
#main-content.container {
    margin-left: auto;
    margin-right: auto;
}

.content {
    margin: 0 auto;
}

/* Mobile Menu Enhancement */
@media (max-width: 768px) {
    /* Ensure no horizontal overflow - frontend only */
    body:not(.wp-admin) html, 
    body:not(.wp-admin) {
        max-width: 100vw;
        overflow-x: hidden;
    }
    
    .container {
        width: 100%;
        max-width: 100%;
        padding-left: 15px;
        padding-right: 15px;
        margin: 0 auto;
        box-sizing: border-box;
    }
    
    #main-content {
        flex-direction: column;
        gap: 15px;
        margin: 15px 0;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    header {
        padding: 10px 0;
    }
    
    header .container {
        position: relative;
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .logo h1 {
        font-size: 18px;
        margin: 0;
        flex-grow: 1;
    }
    
    nav {
        position: relative;
    }
    
    .main-menu {
        flex-direction: column;
        background: #000;
        width: 100%;
        max-width: 100%;
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 1000;
        border: 1px solid #2bf011;
        margin-top: 5px;
        box-shadow: 0 2px 5px rgba(43, 240, 17, 0.3);
        box-sizing: border-box;
    }
    
    .main-menu.active {
        display: flex;
    }
    
    .menu-toggle {
        position: relative;
        top: 0;
        right: 0;
        z-index: 9999;
        display: block;
        background: transparent;
        color: #2bf011;
        padding: 8px 12px;
        font-size: 14px;
        border: 1px solid #2bf011;
        cursor: pointer;
        border-radius: 3px;
        white-space: nowrap;
    }
    
    .menu-toggle:hover {
        background: #2bf011;
        color: #000;
    }
    
    .main-menu li {
        width: 100%;
    }
    
    .main-menu li a {
        padding: 15px 16px;
        border-bottom: 1px solid #333;
        display: block;
        width: 100%;
        box-sizing: border-box;
        font-size: 16px;
    }
    
    .main-menu li:last-child a {
        border-bottom: none;
    }
    
    #sidebar {
        margin-top: 20px;
    }
    
    .content {
        margin-bottom: 20px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    #sidebar {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    /* Better text readability on mobile */
    body {
        font-size: 16px;
        line-height: 1.5;
    }
    
    body:not(.wp-admin) h1 {
        font-size: 20px;
        line-height: 1.3;
        margin-bottom: 15px;
    }
    
    body:not(.wp-admin) h2 {
        font-size: 18px;
        line-height: 1.3;
        margin: 15px 0 10px 0;
    }
    
    body:not(.wp-admin) h3 {
        font-size: 16px;
        line-height: 1.3;
        margin: 10px 0 8px 0;
    }
    
    .entry-content {
        font-size: 15px;
        line-height: 1.6;
        width: 100%;
        max-width: 100%;
        word-wrap: break-word;
        overflow-wrap: break-word;
        box-sizing: border-box;
    }
    
    /* Ensure all media elements don't overflow */
    img, video, iframe, embed, object {
        max-width: 100%;
        height: auto;
        box-sizing: border-box;
    }
    
    /* Fix any potentially wide elements */
    pre, code {
        max-width: 100%;
        overflow-x: auto;
        word-wrap: break-word;
        box-sizing: border-box;
    }
    
    .entry-title {
        margin-bottom: 15px;
        font-size: 18px;
        line-height: 1.3;
    }
    
    .entry-meta {
        margin-bottom: 15px;
        font-size: 13px;
    }
    
    .widget {
        margin-bottom: 20px;
    }
    
    .widget h3 {
        font-size: 16px;
        margin-bottom: 10px;
    }
    
    .widget ul li {
        padding: 4px 0;
    }
    
    .widget ul li a {
        font-size: 14px;
        line-height: 1.3;
    }
    
    /* Fix container padding on very small screens - handled separately */
}

/* Very small screens */
@media (max-width: 480px) {
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .logo h1 {
        font-size: 16px;
    }
    
    .menu-toggle {
        font-size: 12px;
        padding: 6px 8px;
    }
    
    .entry-title {
        font-size: 16px;
    }
    
    body:not(.wp-admin) h1 {
        font-size: 18px;
    }
    
    body:not(.wp-admin) h2 {
        font-size: 16px;
    }
    
    /* Even more compact spacing for very small screens (excluding single posts) */
    .archive article,
    .home article,
    .search article {
        margin-bottom: 15px;
        padding-bottom: 10px;
    }
    
    .archive .entry-header,
    .home .entry-header,
    .search .entry-header {
        margin-bottom: 8px;
    }
    
    .archive .entry-content,
    .home .entry-content,
    .search .entry-content {
        margin-bottom: 10px;
    }
    
    .archive .entry-content p,
    .home .entry-content p,
    .search .entry-content p {
        margin-bottom: 10px;
    }
    
    #main-content {
        margin: 10px 0;
        gap: 10px;
    }
    
    #sidebar {
        margin-top: 15px;
    }
    
    .widget {
        margin-bottom: 15px;
    }
    
    /* Keep single posts comfortable even on very small screens */
    .single #main-content {
        margin: 15px 0;
        gap: 15px;
    }
}

/* Links styling - only for frontend */
body:not(.wp-admin) a, 
body:not(.wp-admin) a:visited, 
.main-menu li a {
    color: #2bf011 !important;
}

body:not(.wp-admin) a:hover, 
.main-menu li a:hover {
    color: #2bf011 !important;
    text-decoration: none;
}

body:not(.wp-admin) a, 
body:not(.wp-admin) a:visited, 
body:not(.wp-admin) a:hover, 
.main-menu li a, 
.main-menu li a:hover {
    text-decoration: none !important;
}

.category-label {
    color: #00ff00;
    background-color: #000;
    border: 1px solid #00ff00;
    padding: 2px 5px;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
    border-radius: 2px;
}

/* Heading styles - only for frontend */
body:not(.wp-admin) h1 {
    font-size: 24px;
}

body:not(.wp-admin) h2 {
    font-size: 20px;
    color: #2bf011;
    margin: 20px 0 10px 0;
}

body:not(.wp-admin) h3 {
    font-size: 18px;
    color: #2bf011;
    margin: 15px 0 10px 0;
}

.entry-title {
    color: #2bf011;
    margin: 0 0 10px 0;
}

.entry-title a {
    color: #2bf011 !important;
    text-decoration: none !important;
}

.entry-title a:hover {
    color: #2bf011 !important;
}

.entry-meta {
    font-size: 14px;
    color: #888;
    margin-bottom: 15px;
}

.entry-content {
    margin-bottom: 20px;
}

.widget {
    background: transparent;
    padding: 0;
    margin-bottom: 30px;
    border: none;
}

.widget h3 {
    color: #2bf011;
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: bold;
}

.widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget ul li {
    padding: 8px 0;
    border-bottom: none;
}

.widget ul li:last-child {
    border-bottom: none;
}

.widget ul li a {
    color: #2bf011 !important;
    text-decoration: none !important;
    line-height: 1.4;
}

.widget ul li a:hover {
    color: #2bf011 !important;
    text-decoration: underline !important;
}

/* Post navigation */
.navigation {
    margin: 20px 0;
}

.nav-links {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.nav-previous,
.nav-next {
    flex: 1;
    max-width: 48%;
}

.nav-previous a,
.nav-next a {
    background: #111;
    border: 1px solid #2bf011;
    color: #2bf011 !important;
    padding: 15px;
    text-decoration: none !important;
    display: block;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.4;
    border-radius: 5px;
}

.nav-previous a:hover,
.nav-next a:hover {
    background: #2bf011;
    color: #000 !important;
}

.nav-subtitle {
    display: block;
    font-size: 12px;
    font-weight: normal;
    opacity: 0.8;
    margin-bottom: 5px;
}

.nav-title {
    display: block;
    font-size: 14px;
    font-weight: bold;
    line-height: 1.3;
}

/* Comments */
.comments-area {
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid #2bf011;
}

.comment-list {
    list-style: none;
    padding: 0;
}

.comment {
    background: #111;
    border: 1px solid #2bf011;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 5px;
}

.comment-meta {
    color: #888;
    font-size: 14px;
    margin-bottom: 10px;
}

.comment-author {
    color: #2bf011;
    font-weight: bold;
}

/* Comment form styling */
.comment-respond {
    margin-top: 25px;
}

.comment-reply-title {
    color: #2bf011;
    font-size: 18px;
    margin-bottom: 15px;
}

.comment-form-comment textarea,
.comment-form-author input,
.comment-form-email input,
.comment-form-url input {
    background: #111;
    border: 1px solid #2bf011;
    color: #2bf011;
    padding: 10px;
    width: 100%;
    border-radius: 3px;
    font-family: inherit;
}

.comment-form-comment textarea:focus,
.comment-form-author input:focus,
.comment-form-email input:focus,
.comment-form-url input:focus {
    border-color: #2bf011;
    outline: none;
    box-shadow: 0 0 5px rgba(43, 240, 17, 0.3);
}

.form-submit input {
    background: #111;
    border: 1px solid #2bf011;
    color: #2bf011;
    padding: 10px 20px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
}

.form-submit input:hover {
    background: #2bf011;
    color: #000;
}

/* Table styling */
.entry-content table,
.content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    border: 1px solid #2bf011;
    background: #111;
}

.entry-content table th,
.entry-content table td,
.content table th,
.content table td {
    padding: 12px 15px;
    text-align: left;
    border: 1px solid #333;
    color: #2bf011;
}

.entry-content table th,
.content table th {
    background: #000;
    font-weight: bold;
    color: #2bf011;
    border-bottom: 2px solid #2bf011;
}

.entry-content table tr:nth-child(even),
.content table tr:nth-child(even) {
    background: rgba(43, 240, 17, 0.05);
}

.entry-content table tr:hover,
.content table tr:hover {
    background: rgba(43, 240, 17, 0.1);
}

/* Responsive tables */
@media (max-width: 768px) {
    .entry-content table,
    .content table {
        font-size: 14px;
        overflow-x: auto;
        display: block;
        white-space: nowrap;
    }
    
    .entry-content table th,
    .entry-content table td,
    .content table th,
    .content table td {
        padding: 8px 10px;
        min-width: 100px;
    }
}

/* Article spacing */
article {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #333;
}

article:last-child {
    border-bottom: none;
}

/* Optimize entry content spacing */
.entry-content p {
    margin-bottom: 15px;
}

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
    margin-top: 20px;
    margin-bottom: 10px;
}

.entry-content h1:first-child,
.entry-content h2:first-child,
.entry-content h3:first-child,
.entry-content h4:first-child,
.entry-content h5:first-child,
.entry-content h6:first-child {
    margin-top: 0;
}

/* Page links styling */
.page-links {
    margin: 20px 0;
    color: #2bf011;
}

.page-links a {
    background: #111;
    border: 1px solid #2bf011;
    color: #2bf011 !important;
    padding: 5px 10px;
    margin: 0 5px;
    text-decoration: none !important;
    border-radius: 3px;
}

.page-links a:hover {
    background: #2bf011;
    color: #000 !important;
}

/* Pagination styling */
.pagination {
    margin: 30px 0;
    text-align: center;
}

.pagination a, .pagination span {
    background: #111;
    border: 1px solid #2bf011;
    color: #2bf011 !important;
    padding: 8px 12px;
    margin: 0 3px;
    text-decoration: none !important;
    border-radius: 3px;
    display: inline-block;
}

.pagination a:hover {
    background: #2bf011;
    color: #000 !important;
}

.pagination .current {
    background: #2bf011;
    color: #000 !important;
}

/* Single post specific optimizations */
.single .content {
    max-width: none;
}

.single article {
    margin-bottom: 20px;
}

.single .entry-content {
    font-size: 16px;
    line-height: 1.7;
}

.single .entry-content p {
    margin-bottom: 18px;
}

.single .entry-content h1,
.single .entry-content h2,
.single .entry-content h3,
.single .entry-content h4,
.single .entry-content h5,
.single .entry-content h6 {
    margin-top: 25px;
    margin-bottom: 15px;
}

/* Mobile optimizations for single posts */
@media (max-width: 768px) {
    .single .container {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .single #main-content {
        gap: 25px;
    }
    
    .single .content {
        width: 100%;
        max-width: 100%;
        flex: 4;
    }
    
    .single .entry-content {
        font-size: 16px;
        line-height: 1.6;
    }
    
    .single .entry-content p {
        margin-bottom: 16px;
    }
    
    .single .entry-title {
        font-size: 20px;
        line-height: 1.3;
        margin-bottom: 15px;
    }
    
    .single .entry-meta {
        margin-bottom: 18px;
    }
}

/* Very small mobile for single posts */
@media (max-width: 480px) {
    .single .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .single .entry-content {
        font-size: 15px;
    }
    
    .single .entry-title {
        font-size: 18px;
    }
}

/* Global mobile width controls - frontend only */
@media (max-width: 768px) {
    /* Ensure all elements respect viewport width - theme content only */
    body:not(.wp-admin):not(.wp-login) #main-content *,
    body:not(.wp-admin):not(.wp-login) header *,
    body:not(.wp-admin):not(.wp-login) footer * {
        max-width: 100%;
        box-sizing: border-box;
    }
    
    /* Fix any tables that might overflow - theme content only */
    body:not(.wp-admin):not(.wp-login) .entry-content table,
    body:not(.wp-admin):not(.wp-login) .content table {
        max-width: 100%;
        overflow-x: auto;
        display: block;
        white-space: nowrap;
    }
    
    /* Fix any wide text elements - frontend only */
    body:not(.wp-admin) h1, 
    body:not(.wp-admin) h2, 
    body:not(.wp-admin) h3, 
    body:not(.wp-admin) h4, 
    body:not(.wp-admin) h5, 
    body:not(.wp-admin) h6, 
    body:not(.wp-admin) p, 
    body:not(.wp-admin) div {
        max-width: 100%;
        word-wrap: break-word;
        overflow-wrap: break-word;
        box-sizing: border-box;
    }
    
    /* Ensure article elements don't overflow - frontend only */
    body:not(.wp-admin) article {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
}
    /* Optimize article content spacing on mobile (excluding single posts) */
    .archive .entry-header,
    .home .entry-header,
    .search .entry-header {
        margin-bottom: 12px;
    }
    
    .archive .entry-title,
    .home .entry-title,
    .search .entry-title {
        margin-bottom: 8px;
        line-height: 1.2;
    }
    
    .archive .entry-meta,
    .home .entry-meta,
    .search .entry-meta {
        margin-bottom: 12px;
        font-size: 12px;
    }
    
    .archive .entry-content,
    .home .entry-content,
    .search .entry-content {
        margin-bottom: 15px;
    }
    
    .archive .entry-content p,
    .home .entry-content p,
    .search .entry-content p {
        margin-bottom: 12px;
    }
    
    .archive .entry-content h1,
    .archive .entry-content h2,
    .archive .entry-content h3,
    .archive .entry-content h4,
    .archive .entry-content h5,
    .archive .entry-content h6,
    .home .entry-content h1,
    .home .entry-content h2,
    .home .entry-content h3,
    .home .entry-content h4,
    .home .entry-content h5,
    .home .entry-content h6,
    .search .entry-content h1,
    .search .entry-content h2,
    .search .entry-content h3,
    .search .entry-content h4,
    .search .entry-content h5,
    .search .entry-content h6 {
        margin-top: 15px;
        margin-bottom: 8px;
    }
    
    /* Reduce post navigation spacing */
    .post-navigation,
    .navigation {
        margin: 20px 0;
    }
    
    /* Optimize footer spacing */
    footer {
        margin-top: 25px;
        padding: 15px 0;
    }
    
    /* Optimize post navigation on mobile */
    .post-navigation,
    .navigation {
        margin: 20px 0;
    }
    
    .nav-links {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-previous,
    .nav-next {
        max-width: 100%;
        width: 100%;
    }
    
    .nav-previous a,
    .nav-next a {
        padding: 15px;
        font-size: 14px;
        text-align: left;
        min-height: auto;
    }
    
    .nav-subtitle {
        font-size: 11px;
        margin-bottom: 5px;
        opacity: 0.7;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    .nav-title {
        font-size: 14px;
        line-height: 1.3;
        font-weight: bold;
    }
    
    /* Stack navigation vertically on mobile */
    .nav-previous {
        order: 1;
    }
    
    .nav-next {
        order: 2;
    }
    
    /* Optimize page links */
    .page-links {
        margin: 15px 0;
        font-size: 14px;
    }
    
    .page-links a {
        padding: 4px 8px;
        font-size: 13px;
    }
    
    /* Optimize pagination */
    .pagination {
        margin: 20px 0;
    }
    
    .pagination a, .pagination span {
        padding: 6px 10px;
        font-size: 14px;
        margin: 0 2px;
    }
    
    /* Comment form mobile improvements */
    .comment-reply-title {
        font-size: 16px;
        margin-bottom: 12px;
    }
    
    .comment-form-comment textarea {
        min-height: 120px;
        font-size: 14px;
    }
    
    .comment-form-author input,
    .comment-form-email input,
    .comment-form-url input {
        font-size: 14px;
        padding: 12px;
        margin-bottom: 10px;
    }
    
    .form-submit {
        margin-top: 15px;
    }
    
    .form-submit input {
        padding: 12px 20px;
        font-size: 14px;
        width: auto;
        min-width: 120px;
    }
    
    /* Comments display mobile */
    .comment {
        padding: 12px;
        margin-bottom: 12px;
    }
    
    .comment-meta {
        font-size: 12px;
        margin-bottom: 8px;
    }
    
    .comment-content {
        font-size: 14px;
        line-height: 1.5;
    }
    
    /* Additional mobile optimizations */
    .entry-footer {
        margin-top: 20px;
    }
    
    /* Mobile page title improvements */
    .page-title {
        font-size: 18px;
        line-height: 1.3;
        margin-bottom: 15px;
    }
    
    .archive-description {
        font-size: 14px;
        line-height: 1.5;
        margin-bottom: 20px;
        opacity: 0.9;
    }
    
    /* Mobile search form */
    .search-form {
        margin: 20px 0;
    }
    
    .search-form input[type="search"] {
        background: #111;
        border: 1px solid #2bf011;
        color: #2bf011;
        padding: 12px;
        width: 100%;
        border-radius: 3px;
        font-size: 14px;
        margin-bottom: 10px;
    }
    
    .search-form input[type="submit"] {
        background: #111;
        border: 1px solid #2bf011;
        color: #2bf011;
        padding: 12px 20px;
        border-radius: 3px;
        cursor: pointer;
        font-size: 14px;
        width: 100%;
    }
    
    .search-form input[type="submit"]:hover {
        background: #2bf011;
        color: #000;
    }
}
