/* assets/css/style.css */

:root {
    --primary-color: #ff4d00;
    /* Electric Orange-Red */
    --primary-hover: #ff6a00;
    --bg-black: #000000;
    --bg-card: rgba(15, 15, 15, 0.85);
    --border-subtle: rgba(255, 77, 0, 0.15);
    --text-white: #ffffff;
    --text-gray: #888888;
    --text-muted: #666666;
    --font-main: 'Outfit', sans-serif;
    --font-tech: 'Share Tech Mono', monospace;
    --neon-glow: 0 0 15px rgba(255, 77, 0, 0.4);

    --glass-bg: rgba(5, 5, 5, 0.85);
    /* Deeper Black */
    --glass-border: rgba(255, 77, 0, 0.12);
    /* Amber Border */
    --accent-blue: #ff9d00;
    /* Shifted to Orange */
    --accent-green: #ffca28;
    /* Shifted to Amber */
    --accent-red: #ff4444;

    /* Dynamic Background Defaults */
    --bg-primary-color: #ff4d00;
    --bg-secondary-color: #ff6a00;
    --bg-anim-speed: 30s;

    /* Ultra Glass Dark Specifics */
    --cortex-glow: 0 0 20px rgba(255, 77, 0, 0.15);
}

.logo-img {
    height: 40px;
    width: auto;
    filter: drop-shadow(0 0 10px rgba(255, 77, 0, 0.3));
    transition: all 0.3s ease;
}

.logo-img:hover {
    filter: drop-shadow(0 0 15px rgba(255, 77, 0, 0.6));
    transform: scale(1.05);
}

/* Custom Ultra-Thin Futuristic Scrollbar */
::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-color);
}

@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&family=Outfit:wght@300;400;600;700;800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-black);
    color: var(--text-white);
    font-family: var(--font-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

/* Global Responsive Text Fixes */
.responsive-text {
    word-break: break-all;
    overflow-wrap: anywhere;
    hyphens: auto;
    max-width: 100%;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../img/background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    /* High fidelity: Preserves absolute blacks of the technical image */
    filter: brightness(0.65) contrast(1.5) blur(6px) hue-rotate(var(--bg-hue-start, 0deg));
    z-index: -2;
    opacity: 0.9;
    animation: bg-cycle var(--bg-anim-speed, 30s) infinite ease-in-out;
    transform: scale(1.02);
}

@keyframes bg-cycle {

    0%,
    100% {
        filter: brightness(0.65) contrast(1.5) blur(6px) hue-rotate(var(--bg-hue-start, 0deg));
    }

    50% {
        filter: brightness(0.75) contrast(1.6) blur(8px) hue-rotate(var(--bg-hue-end, 20deg));
    }
}

@keyframes breathe-bg {

    0%,
    100% {
        background-color: var(--primary-color);
        box-shadow: 0 0 15px rgba(255, 77, 0, 0.3);
    }

    50% {
        background-color: var(--accent-green);
        box-shadow: 0 0 25px rgba(255, 202, 40, 0.5);
    }
}

@keyframes breathe-border {

    0%,
    100% {
        border-color: var(--primary-color);
        box-shadow: 0 0 15px rgba(255, 77, 0, 0.2);
    }

    50% {
        border-color: var(--accent-green);
        box-shadow: 0 0 15px rgba(255, 65, 0, 0.2);
    }
}

@keyframes breathe-text {

    0%,
    100% {
        color: var(--primary-color);
        text-shadow: 0 0 5px rgba(255, 77, 0, 0.3);
    }

    50% {
        color: var(--accent-green);
        text-shadow: 0 0 15px rgba(255, 202, 40, 0.6);
    }
}

@keyframes breathe-glow {

    0%,
    100% {
        background-color: var(--primary-color);
        box-shadow: 0 0 8px var(--primary-color);
    }

    50% {
        background-color: var(--accent-green);
        box-shadow: 0 0 15px var(--accent-green);
    }
}

/* Breathing Animation */
@keyframes pulse-blue {
    0% {
        box-shadow: 0 0 10px rgba(255, 77, 0, 0.2);
    }

    50% {
        box-shadow: 0 0 25px rgba(255, 77, 0, 0.5);
    }

    100% {
        box-shadow: 0 0 10px rgba(255, 77, 0, 0.2);
    }
}

/* NEON RED PULSATING ANIMATION */
@keyframes neon-pulse-red {

    0%,
    100% {
        color: #ff003c;
        text-shadow: 0 0 5px rgba(255, 0, 60, 0.5);
    }

    50% {
        color: #ff4d79;
        text-shadow: 0 0 15px rgba(255, 0, 60, 0.9), 0 0 5px rgba(255, 255, 255, 0.5);
    }
}

.pulsating-neon-red {
    animation: neon-pulse-red 1.5s infinite ease-in-out;
    font-weight: bold;
    text-transform: uppercase;
    text-decoration: none !important;
    font-family: var(--font-tech);
    border: 1px solid rgba(255, 0, 60, 0.3);
    padding: 4px 10px;
    border-radius: 4px;
    background: rgba(255, 0, 60, 0.05);
}

.container {
    width: 100%;
    margin: 0 auto;
    padding: 0 1.5rem;
    max-width: 1200px;
}

@media (max-width: 768px) {
    .container {
        padding: 0 0.75rem;
    }
}

.max-width-column {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.stat-grid {
    display: grid;
    transition: all 0.3s ease;
}

/* RESPONSIVE DASHBOARD GRIDS */

/* NEURONA / SINAPSIS LAYOUTS */
.neurona-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.neurona-main-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 900px) {
    .neurona-grid {
        grid-template-columns: 1fr;
        margin-bottom: 2rem;
    }

    .neurona-main-layout {
        grid-template-columns: 1fr;
    }
}

.stat-grid-cortex {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.cortex-main-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1800px;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 1600px) {
    .cortex-main-grid {
        grid-template-columns: repeat(5, 1fr);
    }

    .container {
        max-width: 95% !important;
    }
}

/* Base state for desktop (Modified for Global Scroll) */
.no-scroll-container {
    height: auto;
    min-height: calc(100vh - 80px);
    display: flex;
    flex-direction: column;
    overflow-y: visible;
    padding: 0;
}

@media (max-width: 1200px) {
    .stat-grid-cortex {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }

    .cortex-main-grid {
        grid-template-columns: 1fr 1fr;
        height: auto;
        overflow: visible;
        display: block;
        /* Stack on tablet if needed, or keep grid */
    }

    .cortex-main-grid>div {
        margin-bottom: 1rem;
    }

    .cortex-main-grid>div:nth-child(3) {
        grid-column: span 2;
    }

    /* ENABLE SCROLL ON TABLET/MOBILE */
    .no-scroll-container {
        height: auto !important;
        overflow-y: visible !important;
        display: block !important;
        padding-bottom: 50px;
    }
}

@media (max-width: 768px) {

    /* FORCE 1 COLUMN ON MOBILE */
    .stat-grid-cortex {
        grid-template-columns: 1fr;
    }

    .cortex-main-grid {
        grid-template-columns: 1fr;
        display: flex;
        flex-direction: column;
    }

    .cortex-main-grid>div:nth-child(3) {
        grid-column: span 1;
    }

    .action-grid {
        grid-template-columns: 1fr;
    }

    .btn-omni {
        font-size: 0.7rem;
    }
}


/* Badge System */
.pill-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: 100px;
    font-family: var(--font-tech);
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-gray);
    margin-bottom: 2rem;
}

.pill-badge::before {
    content: '';
    display: block;
    width: 6px;
    height: 6px;
    background: var(--primary-color);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--primary-color);
    animation: breathe-glow 15s infinite ease-in-out;
}

/* Global Text Breathing */
h1,
h2,
h3,
h4,
h5,
strong,
.logo-tech,
.accent,
.text-primary,
.pill-badge {
    animation: breathe-text 15s infinite ease-in-out;
}

/* Typography Overhaul */
h1 {
    font-size: 4.5rem;
    font-weight: 800;
    letter-spacing: -2px;
    line-height: 1.1;
    margin-bottom: 1rem;
}

h1 .accent {
    color: var(--primary-color);
    text-shadow: var(--neon-glow);
    animation: breathe-text 8s infinite ease-in-out;
}

.subtitle {
    font-size: 1.25rem;
    color: var(--text-gray);
    max-width: 600px;
    margin: 0 auto 3rem;
}

/* Card System */
.card-minimal {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 24px;
    padding: 3rem;
    max-width: 480px;
    margin: 0 auto 2rem;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.card-minimal h3 {
    font-family: var(--font-tech);
    font-size: 13px;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 2.5rem;
    color: var(--text-white);
}

/* Form Elements */
.form-group-minimal {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group-minimal label {
    display: block;
    font-family: var(--font-tech);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 8px;
    padding-left: 4px;
}

.input-minimal {
    width: 100%;
    padding: 1.2rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    color: var(--text-white);
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Specialized Color Input Refinement */
.input-minimal[type="color"] {
    padding: 0;
    height: 50px;
    cursor: pointer;
    overflow: hidden;
    border: 1px solid var(--border-subtle);
}

.input-minimal[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.input-minimal[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 11px;
    /* Slightly less than parent to avoid bleed */
}

.input-minimal[type="color"]:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(var(--primary-rgb), 0.3);
    transform: scale(1.01);
}

.input-minimal:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 77, 0, 0.05);
    box-shadow: 0 0 15px rgba(255, 77, 0, 0.2);
}

/* Autofill Fix for Dark Mode */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px var(--bg-card) inset !important;
    -webkit-text-fill-color: var(--text-white) !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* Button Refinement */
.btn-minimal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 1.1rem;
    background: var(--primary-color);
    color: #000;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-family: var(--font-tech);
    font-size: 13px;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
    box-shadow: 0 0 15px rgba(255, 77, 0, 0.3);
    animation: breathe-bg 15s infinite ease-in-out;
}

.btn-minimal:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(255, 77, 0, 0.6);
}

.btn-minimal:active {
    transform: translateY(0);
}

.btn-micro {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
}

.btn-micro:hover {
    background: var(--primary-color);
    color: #000;
}

/* Footer / Secondary Section */
.secondary-section {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    padding: 2.5rem;
    max-width: 480px;
    margin: 0 auto;
    text-align: center;
}

.secondary-section h4 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.secondary-section p {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 2rem;
}

.divider-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    text-decoration: none;
    color: var(--primary-color);
    font-family: var(--font-tech);
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.divider-link::before,
.divider-link::after {
    content: '';
    height: 1px;
    width: 40px;
    background: rgba(255, 77, 0, 0.4);
}

.divider-link:hover {
    color: var(--text-white);
}

/* Control Center Grid */
.grid-control-center {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

@media (max-width: 900px) {
    .grid-control-center {
        grid-template-columns: 1fr;
    }
}

/* Stat Card */
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.stat-card h5 {
    font-family: var(--font-tech);
    color: var(--text-gray);
    font-size: 0.7rem;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.stat-card .value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-white);
}

.stat-card .indicator {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.65rem;
    margin-top: 0.5rem;
    font-family: var(--font-tech);
}

.indicator.positive {
    color: var(--primary-color);
}

.indicator.negative {
    color: #ff3333;
}

/* Insight AI Panel */
.insight-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    padding: 2rem;
}

.insight-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.insight-item {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
}

.insight-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.insight-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    font-family: var(--font-tech);
    color: var(--text-white);
}

.insight-value {
    font-weight: 700;
    color: var(--text-white);
    font-size: 0.9rem;
}

/* Action Grid */
.action-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 2rem;
}

.action-btn-small {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text-muted);
    transition: all 0.2s;
}

.action-btn-small:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(255, 77, 0, 0.05);
    animation: breathe-border 15s infinite ease-in-out;
}

.action-btn-small span {
    font-family: var(--font-tech);
    font-size: 0.7rem;
    letter-spacing: 1px;
}

/* Action Card System (New) */
.action-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.action-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color) !important;
    background: rgba(255, 77, 0, 0.08) !important;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 77, 0, 0.1);
}

.action-card:active {
    transform: translateY(-2px);
}

.action-card .icon-box {
    transition: all 0.3s ease;
}

.action-card:hover .icon-box {
    transform: scale(1.1);
    background: rgba(255, 77, 0, 0.2) !important;
    box-shadow: 0 0 20px rgba(255, 77, 0, 0.3);
}

/* Utilities */
.text-center {
    text-align: center;
}

.mt-10 {
    margin-top: 10vh;
}

.mb-2 {
    margin-bottom: 2rem;
}

.w-full {
    width: 100%;
}

.fade-in {
    animation: fadeIn 1s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Glass-Morphism Global Classes */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 1.5rem;
    /* Reduced default padding */
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.9), var(--cortex-glow);
    margin-bottom: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-panel-compact {
    padding: 1rem !important;
}

.no-scroll-container {
    height: auto;
    display: flex;
    flex-direction: column;
    overflow-y: visible;
    padding: 0 1rem;
}

.scroller-futuristic {
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--glass-border) transparent;
}

.input-omni {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 12px 15px;
    border-radius: 12px;
    width: 100%;
    font-size: 0.85rem;
    transition: all 0.3s;
}

.input-omni:focus {
    border-color: var(--accent-blue);
    background: rgba(255, 77, 0, 0.05);
    outline: none;
    box-shadow: 0 0 15px rgba(255, 77, 0, 0.2);
}

.btn-omni {
    background: var(--accent-blue);
    color: black;
    border: none;
    padding: 12px;
    border-radius: 12px;
    font-weight: bold;
    font-family: var(--font-tech);
    font-size: 0.75rem;
    letter-spacing: 1px;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s;
    text-transform: uppercase;
}

.btn-omni:hover {
    box-shadow: 0 0 20px rgba(255, 77, 0, 0.5);
    transform: translateY(-2px);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 0;
}

.logo-tech {
    font-family: var(--font-tech);
    font-size: 1.2rem;
    letter-spacing: 4px;
    color: var(--text-white);
}

@media (max-width: 600px) {
    .neurona-grid {
        gap: 1rem;
    }

    .action-card {
        padding: 1.5rem !important;
        gap: 1.2rem !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
    }

    .action-card .icon-box {
        width: 70px !important;
        height: 70px !important;
        font-size: 2rem !important;
        flex-shrink: 0;
    }

    .action-card h4 {
        font-size: 1.2rem !important;
        letter-spacing: 2px !important;
    }

    .action-card p {
        font-size: 0.75rem !important;
        letter-spacing: 1px !important;
    }
}

/* =========================================
   CROSS-PLATFORM DROPDOWN/SELECT FIX (WINDOWS)
   ========================================= */
select {
    background-color: var(--bg-card);
    color: var(--text-white);
    appearance: none;
    /* Removes default OS styling where possible */
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
    padding-right: 2.5rem !important;
    /* Make room for the arrow */
}

/* Force dark background on options to prevent white dropdowns on Windows */
select option {
    background-color: #000000;
    color: #ffffff;
    padding: 10px;
}

/* Ensure edit-input and other classes inherit this or have it explicitly */
.edit-input,
.input-minimal,
.input-omni {
    color-scheme: dark;
    /* Hints browser to use dark controls */
}

/* Hover/Focus states for better UX */
select:focus,
select:hover {
    border-color: var(--primary-color);
}