/*!
Theme Name: Nexa Ai
Theme URI: http://huzefa.malim.site
Author: Huzefa malim
Author URI: http://huzefa.malim.site
Description: Description
Version: 1.0.0
Tested up to: 5.4
Requires PHP: 5.6
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: nexa-ai
Tags: custom-background, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready

This theme, like WordPress, is licensed under the GPL.
Use it to make something cool, have fun, and share what you've learned.

Nexa Ai is based on Underscores https://underscores.me/, (C) 2012-2020 Automattic, Inc.
Underscores is distributed under the terms of the GNU GPL v2 or later.

Normalizing styles have been helped along thanks to the fine work of
Nicolas Gallagher and Jonathan Neal https://necolas.github.io/normalize.css/
*/

/*--------------------------------------------------------------
>>> TABLE OF CONTENTS:
----------------------------------------------------------------
# Generic
	- Normalize
	- Box sizing
# Base
	- Typography
	- Elements
	- Links
	- Forms
## Layouts
# Components
	- Navigation
	- Posts and pages
	- Comments
	- Widgets
	- Media
	- Captions
	- Galleries
# plugins
	- Jetpack infinite scroll
# Utilities
	- Accessibility
	- Alignments

--------------------------------------------------------------*/

/*--------------------------------------------------------------
# Generic
--------------------------------------------------------------*/

/* Normalize
--------------------------------------------- */

/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */

/* Document
	 ========================================================================== */

/**
 * 1. Correct the line height in all browsers.
 * 2. Prevent adjustments of font size after orientation changes in iOS.
 */


* {
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    transition: background 0.5s ease, color 0.5s ease;
    background: #F5F5F5;
    max-width: 100%;
    overflow-x: hidden;
    font-size: clamp(14px, 2vw, 16px);
}

body.light-mode {
    color: #000000;
}

body.dark-mode {
    background: #272727;
    color: #FFFFFF;
}

body {
    scrollbar-width: thin;
    scrollbar-color: #286DF3 #FFFFFF00;
}
body::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
body::-webkit-scrollbar-track {
    background: #FFFFFF00;
    border-radius: 10px;
    transition: background 0.5s ease, color 0.5s ease;
}
body::-webkit-scrollbar-thumb {
    background: #DDDDDD;
    border-radius: 10px;
    border: 2px solid #EFEFEF;
    transition: background 0.5s ease, color 0.5s ease;
}
body::-webkit-scrollbar-thumb:hover {
    background: #286DF3;
}
body.dark-mode {
    scrollbar-color: #286DF3 #12121200;
}
body.dark-mode::-webkit-scrollbar-track {
    background: #12121200;
}
body.dark-mode::-webkit-scrollbar-thumb {
    background: #333333;
    border: 2px solid #272727;
}
body.dark-mode::-webkit-scrollbar-thumb:hover {
    background: #286DF3;
}

.header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
    width: 100%;
    max-width: 100%;
}

.logo {
    font-size: 1.5em;
    white-space: nowrap;
}

.live {
    background: #d93025;
    color: #FFFFFF;
    padding: 4px 8px;
    border-radius: 8px;
    margin-left: 5px;
}

.header-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 10px 20px;
    justify-content: flex-end;
    background: #F5F5F5;
    transition: background 0.5s ease;
    width: 100%;
    max-width: 100%;
}

body.dark-mode .header-buttons {
    background: #27272700;
}

.show-hide-btn, .action-btn {
    padding: 10px 20px;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    background: #FFFFFF;
    color: #000000;
    font-size: clamp(12px, 1.8vw, 16px);
    transition: background 0.5s ease, color 0.5s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.show-hide-btn:hover, .action-btn:hover {
    background: #286DF3 !important;
    color: #FFFFFF !important;
    transform: scale(1.05);
}

.action-btn {
    background: #FFFFFF;
    color: #000000;
}

.show-hide-btn.active {
    background: #286DF3;
    color: #FFFFFF;
    transition: background 0.5s linear, color 0.5s ease;
}

.show-hide-btn.inactive {
    background: #FFFFFF;
    color: #000000;
}

body.dark-mode .header-buttons .show-hide-btn,
body.dark-mode .header-buttons .action-btn {
    background: #121212;
    color: #FFFFFF;
}

body.dark-mode .header-buttons .show-hide-btn.active {
    background: #286DF3;
    color: #FFFFFF;
}

body.dark-mode .header-buttons .show-hide-btn.inactive {
    background: #121212;
    color: #FFFFFF;
}

.run-btn {
    background: #FFFFFF;
    color: #000000;
}

.run-btn:hover {
    background: #28a745 !important;
    color: #FFFFFF !important;
}

body.dark-mode .run-btn {
    background: #28a745;
}

body.dark-mode .run-btn:hover {
    background: #28a745 !important;
}

.content {
    display: flex;
    justify-content: space-between;
    flex-direction: row;
    transition: all 0.3s ease;
    padding: 20px;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.content.horizontal {
    flex-direction: column;
}

.code-window {
    flex-grow: 1;
    margin: 10px;
    border-radius: 20px;
    border: 0;
    overflow: hidden;
    transition: background 0.5s ease, color 0.5s ease, opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    opacity: 1;
    max-width: 100%;
    width: 100%;
}

.code-window.dragover {
    border: 2px dashed #286DF3;
    background: rgba(40, 109, 243, 0.1);
}

.output-window {
    flex-grow: 1;
    margin: 10px;
    border-radius: 20px;
    border: 0;
    overflow: hidden;
    transition: background 0.5s ease, color 0.5s ease, opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    opacity: 1;
    max-width: 100%;
    width: 100%;
}

.output-window:fullscreen,
.output-window:-webkit-full-screen,
.output-window:-moz-full-screen,
.output-window:-ms-fullscreen {
    width: 100vw;
    height: 100vh;
    margin: 0;
    border-radius: 0;
}

.output-window-content:fullscreen,
.output-window-content:-webkit-full-screen,
.output-window-content:-moz-full-screen,
.output-window-content:-ms-fullscreen {
    width: 100vw;
    height: 100vh;
}

.code-window.hidden {
    opacity: 0;
    display: none;
}

.code-window-header {
    background: #286DF3;
    color: #FFFFFF;
    padding: 8px 16px;
    font-size: clamp(14px, 2vw, 18px);
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
}

.code-window-content {
    flex-grow: 1;
    padding: 10px;
    outline: none;
    overflow: auto;
    resize: none;
    border: 0;
    transition: background 0.5s ease, color 0.5s ease;
    scrollbar-width: thin;
    scrollbar-color: #286DF3 #FFFFFF00;
    background: #FFFFFF;
    width: 100%;
    font-size: clamp(12px, 1.8vw, 14px);
}

.code-window-content::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.code-window-content::-webkit-scrollbar-track {
    background: #FFFFFF00;
    border-radius: 10px;
    transition: background 0.5s ease, color 0.5s ease;
}

.code-window-content::-webkit-scrollbar-thumb {
    background: #DDDDDD;
    border-radius: 10px;
    border: 2px solid #FFFFFF;
    transition: background 0.5s ease, color 0.5s ease;
}

.code-window-content::-webkit-scrollbar-thumb:hover {
    background: #286DF3;
}

.code-window-content.dark-mode::-webkit-scrollbar-track {
    background: #12121200;
}

.code-window-content.dark-mode::-webkit-scrollbar-thumb {
    background: #333333;
    border: 2px solid #121212;
}

.code-window-content.dark-mode::-webkit-scrollbar-thumb:hover {
    background: #286DF3;
}

.code-window-content.dark-mode {
    scrollbar-color: #286DF3 #12121200;
    background: #121212;
    color: #FFFFFF;
}

.output-window-content {
    flex-grow: 1;
    padding: 0;
    outline: none;
    overflow: auto;
    resize: none;
    border: 0;
    transition: background 0.5s ease, color 0.5s ease;
    background: #FFFFFF;
    width: 100%;
    height: 100%;
}

.code-window-content.light-mode {
    background: #FFFFFF;
    color: #000000;
}

.output-window.dark-mode {
    background: #121212;
}

.output-window.light-mode {
    background: #FFFFFF;
}

.output-window-content.dark-mode {
    background: #121212;
}

.output-window-content.light-mode {
    background: #FFFFFF;
}

.console {
    background: #f8d7da;
    color: #721c24;
    padding: 5px 10px;
    font-size: 0.8em;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
    max-height: 100px;
    overflow-y: auto;
    overflow-x: hidden;
    white-space: break-spaces;
    word-break: break-word;
    word-wrap: break-word;
    display: none;
    transition: background 0.5s ease, color 0.5s ease;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    flex-shrink: 0;
    scrollbar-width: thin;
    scrollbar-color: #FF0000 #FFFFFF00;
}

.console::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.console::-webkit-scrollbar-track {
    background: #FFFFFF00;
    border-radius: 10px;
}

.console::-webkit-scrollbar-thumb {
    background: #721c24;
    border-radius: 10px;
    border: 2px solid #f8d7da;
}

.console::-webkit-scrollbar-thumb:hover {
    background: #FF0000;
}

.console.dark-mode::-webkit-scrollbar-track {
    background: #12121200;
}

.console.dark-mode::-webkit-scrollbar-thumb {
    background: #f8d7da;
    border: 2px solid #721c24;
}

.console.dark-mode::-webkit-scrollbar-thumb:hover {
    background: #FF0000;
}

.console.dark-mode {
    background: #721c24;
    color: #f8d7da;
}

.footer-credits {
    text-align: center;
    padding: 10px;
    margin-top: 10px;
    font-size: clamp(10px, 1.5vw, 14px);
    color: #777777;
    width: 100%;
    max-width: 100%;
    overflow-wrap: break-word;
}

.footer-credits a {
    color: #777777;
    padding: 4px;
    border-radius: 20px;
    text-decoration: underline;
}

.footer-credits a:hover {
    color: #FFFFFF;
    background: #286DF3;
    padding: 4px;
    border-radius: 20px;
    transition: background 0.5s linear, color 0.5s ease;
}

.color-picker-btn {
    position: relative;
}

.color-picker-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    background: #FFFFFF;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    display: none;
    text-align: center;
}

body.dark-mode .color-picker-container {
    background: #272727;
    box-shadow: 0 4px 8px #000000;
}

#nativeColorPicker {
    width: 100px;
    height: 100px;
    border: none;
    padding: 0;
    margin: 0 auto;
    display: block;
    cursor: pointer;
    background: transparent;
}

.color-input {
    margin-top: 10px;
    padding: 8px;
    width: 100%;
    max-width: 200px;
    border: 1px solid #DDDDDD;
    border-radius: 20px;
    font-size: 0.9em;
    background: #FFFFFF;
    color: #000000;
    outline: none;
    transition: border-color 0.3s ease, background 0.5s ease, color 0.5s ease;
}

.color-input:focus {
    border-color: #286DF3;
}

body.dark-mode .color-input {
    background: #121212;
    color: #FFFFFF;
    border-color: #555555;
}

body.dark-mode .color-input:focus {
    border-color: #286DF3;
}

.copy-btn {
    margin-top: 10px;
    padding: 8px 16px;
    border: none;
    border-radius: 20px;
    background: #28a745;
    color: #FFFFFF;
    cursor: pointer;
    font-size: 0.9em;
    transition: background 0.3s ease, transform 0.2s ease;
}

.copy-btn:hover {
    background: #218838;
    transform: scale(1.05);
}

body.dark-mode .copy-btn {
    background: #28a745;
}

body.dark-mode .copy-btn:hover {
    background: #218838;
}

.donation-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s ease;
}

.donation-popup.visible {
    display: flex;
    opacity: 1;
}

.donation-content {
    background: #FFFFFF;
    padding: 20px;
    border-radius: 20px;
    width: 400px;
    max-width: 90%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    position: relative;
    transition: background 0.5s ease, color 0.5s ease;
}

.donation-content.dark-mode {
    background: #121212;
    color: #FFFFFF;
}

.donation-content h2 {
    color: #286DF3;
    margin-top: 0;
    font-size: 1.5em;
}

.donation-content p, .donation-content ul {
    color: #000000;
    font-size: 1em;
}

.donation-content.dark-mode p, .donation-content.dark-mode ul {
    color: #FFFFFF;
}

.qr-code {
    max-width: 200px;
    height: auto;
    display: block;
    margin: 15px auto;
}

.close-btn {
    background: #286DF3;
    color: #FFFFFF;
    border: none;
    padding: 10px 20px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1em;
    margin-top: 15px;
    transition: background 0.5s ease, color 0.5s ease, transform 0.2s ease;
}

.close-btn:hover {
    background: #1a4fb6;
    transform: scale(1.05);
}

.footer-credits a#donateLink {
    color: #777777;
    padding: 4px;
    border-radius: 20px;
    text-decoration: underline;
}

.footer-credits a#donateLink:hover {
    color: #FFFFFF;
    background: #286DF3;
    padding: 4px;
    border-radius: 20px;
    transition: background 0.5s linear, color 0.5s ease;
}

.stats {
    padding: 5px 10px;
    font-size: clamp(10px, 1.5vw, 12px);
    color: rgba(0,0,0,0.5);
    background: #FFFFFF;
    transition: background 0.5s ease, color 0.5s ease;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
    white-space: nowrap;
    position: relative;
}

.stats::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background: #286df3;
    color: #fff;
    padding: 5px 10px;
    border-radius: 100px;
    font-size: 1em;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.stats:hover::after {
    opacity: 1;
    visibility: visible;
}

.stats.dark-mode {
    color: rgba(255,255,255,0.5);
    background: #121212;
}

.stats.dark-mode::after {
    background: #286df3;
    color: #fff;
}

.save-indicator {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 5px 10px;
    background: #28a745;
    color: white;
    border-radius: 20px;
    font-size: 0.8em;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.save-indicator.visible {
    opacity: 1;
}

.code-tabs {
    display: none;
    background: #FFFFFF;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    padding: 0;
    margin: 0 0 0px 0;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    transition: background 0.5s ease, color 0.5s ease;
}

.code-tabs button {
    background: transparent;
    border: none;
    padding: 8px 15px;
    cursor: pointer;
    font-size: 0.9em;
    color: #000000;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    transition: background 0.5s ease, color 0.5s ease;
    margin: 0;
    flex-grow: 1;
    text-align: center;
}

.code-tabs button.active {
    background: #286DF3;
    color: #FFFFFF;
}

body.dark-mode .code-tabs {
    background: #121212;
}

body.dark-mode .code-tabs button {
    color: #FFFFFF;
}

body.dark-mode .code-tabs button.active {
    background: #286DF3;
    color: #FFFFFF;
}

@media screen and (max-width: 768px) {
    .header {
        justify-content: center;
        padding: 10px;
        margin: 20px 0 20px 0;
    }

    .code-window-header {
        display: none;
    }

    .logo {
        font-size: 1.2em;
        white-space: nowrap;
    }

    .live {
        margin-left: 5px;
    }

    .header-buttons {
        order: 2;
        width: 100%;
        flex-wrap: wrap;
        gap: 5px;
        padding: 10px;
        justify-content: center;
    }

    .header-buttons .show-hide-btn {
        display: none;
    }

    .header-buttons .layout-btn {
        display: none;
    }

    .content {
        flex-direction: column;
        padding: 0 10px;
        order: 1;
        width: 100%;
        max-width: 100%;
    }

    .code-window.html-window, 
    .code-window.css-window, 
    .code-window.js-window {
        height: 200px;
        margin: 0 0 10px 0;
        width: 100%;
        border-radius: 0px;
        border: 0;
        overflow: hidden;
    }

    .code-window.output-window {
        height: 200px;
        margin: 0 0 10px 0;
        width: 100%;
        border-radius: 0px;
        border-bottom-left-radius: 20px;
        border-bottom-right-radius: 20px;
        border: 0;
        overflow: hidden;
    }

    .code-tabs {
        display: flex;
    }

    .code-window {
        display: none;
    }

    .code-window.active {
        display: flex;
    }

    .output-window {
        display: none;
    }

    .output-window.active {
        display: flex;
    }

    .code-window-header {
        border-radius: 20px 20px 0 0;
    }

    .stats {
        border-radius: 0 0 20px 20px;
    }

    .footer-credits {
        order: 3;
        width: 100%;
        max-width: 100%;
    }
}

@media screen and (min-width: 769px) and (max-width: 1024px) {
    .header {
        justify-content: center;
        padding: 15px;
    }

    .header-buttons {
        order: 1;
        width: 100%;
        padding: 10px 20px;
        justify-content: center;
        background: #F5F5F5;
        position: static;
        margin-top: 10px;
    }

    body.dark-mode .header-buttons {
        background: #272727;
    }

    .content {
        padding: 10px;
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-gap: 10px;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .code-window, 
    .output-window {
        height: 35vh !important;
        margin: 0;
        border-radius: 20px;
        border: 0;
        width: 100%;
    }

    .code-window:focus-within {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); /* Focus indicator for tablet */
        z-index: 10;
        position: relative;
    }

    body.dark-mode .code-window:focus-within {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 1); /* Focus indicator in dark mode */
    }

    .logo {
        font-size: 1.3em;
    }

    .live {
        margin-left: 5px;
    }

    .show-hide-btn, .action-btn {
        padding: 8px 15px;
        font-size: 0.9em;
    }

    .code-tabs {
        display: none;
    }
}

@media screen and (min-width: 1025px) {
    .header {
        justify-content: space-between;
        padding: 20px;
    }

    .header-buttons {
        padding: 0;
        background: none;
        position: absolute;
        top: 20px;
        right: 20px;
        display: flex;
        gap: 10px;
    }

    .header-buttons .show-hide-btn {
        display: inline-block;
    }

    .content {
        padding: 20px;
        width: 100%;
        max-width: 100%;
    }

    .code-tabs {
        display: none;
    }

    .code-window, 
    .output-window {
        height: 75vh !important;
        margin: 10px;
        border-radius: 20px;
        border: 0;
        width: 100%;
    }

    .code-window:focus-within {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); /* Focus indicator for desktop */
        z-index: 10;
        position: relative;
    }

    body.dark-mode .code-window:focus-within {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 1); /* Focus indicator in dark mode */
    }

    .logo {
        font-size: 1.5em;
        white-space: nowrap;
    }

    .live {
        margin-left: 5px;
    }

    .show-hide-btn, .action-btn {
        padding: 10px 20px;
        margin-left: 10px;
        font-size: 1em;
    }
}