:root {
    /* Core Brand Colors */
    --fijs-primary:       #00632B;       /* Main green from logo - Frame & border accent */
    --fijs-primary-light: #008F3F;       /* Lighter green shade */
    --fijs-gradient1:     #00B84A;       /* Start of the gradient */
    --fijs-gradient2:     #00F569;       /* End of the gradient */
    
    /* UI Elements */
    --fijs-bg:            #FFFFFF;       /* Normal cell background */
    --fijs-muted:         #D8DEE3;       /* Grid border lines */
    --page-bg:            #F7F9FB;       /* Page background */
    --text-color:         #1F3324;       /* Primary text color */
    
    /* Semantic Colors */
    --color-innovate:     #003F4D;       
    --sidebar-bg:         #0A1C4D;      
}

body {
    margin: 0;
    font-family: "Helvetica Neue", Arial, sans-serif;
    background: #fdfdfd;
    color: #333;
}

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    border-bottom: 1px solid #eee;
    padding: .25rem 2rem;
}

.container {
    display: flex;
    flex-direction: row;
    height: calc(100vh - 85px); /* Adjust if header height changes */
}

/* Sidebar Navigation */
nav {
    width: 250px;
    border-right: 1px solid #eee;
    padding: 2rem 1rem;
    background: #fff;
    overflow-y: auto;
}

nav h2 {
    font-weight: 300;
    font-size: 1.1rem;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    color: #333;
}

nav ul {
    list-style-type: none;
    padding-left: 0;
    margin: 0;
}

nav li {
    margin-bottom: 0.75rem;
}

nav a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
}

nav a:hover {
    color: #0B6031;
}

/* Main Content */
main {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
}

main h1, main h2, main h3 {
    font-weight: 300;
    line-height: 1.4;
    letter-spacing: 1px;
    color: #333;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

main p {
    line-height: 1.7;
    color: #444;
    margin-bottom: 1.5rem;
}

main pre {
    background: #f7f9fc;
    border: 1px solid #eee;
    padding: 1rem;
    overflow-x: auto;
    border-radius: 4px;
    font-size: 0.9rem;
}

/* Responsive Adjustments */
@media (max-width: 800px) {
    .container {
        flex-direction: column;
        height: auto;
    }

    nav {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #eee;
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 1rem;
    }

    nav h2 {
        display: none;
    }

    nav ul {
        display: flex;
    }

    nav li {
        margin-right: 1.5rem;
        margin-bottom: 0;
        white-space: nowrap;
    }

    main {
        height: auto;
    }
}

.editor-container {
    position: relative;
    width: 100%;
    max-width: 1800px;
    border: 1px solid #1e1e1e;
    border-radius: 4px;
    background-color: #1e1e1e; /* Darker background like VS Code */
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: 'Consolas', 'Courier New', monospace; /* VS Code default font */
    color: #d4d4d4; /* VS Code default text color */
    margin: 10px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    height: 400px;
}

/* Editor tabs bar */
.editor-tabs {
    display: flex;
    background-color: #252526;
    border-bottom: 1px solid #333;
    height: 35px;
    overflow-x: auto;
}

.editor-tab {
    padding: 9px 16px;
    font-size: 13px;
    background-color: #2d2d2d;
    border-right: 1px solid #333;
    color: #969696;
    user-select: none;
    cursor: pointer;
    white-space: nowrap;
    position: relative;
}

.editor-tab.active {
    background-color: #1e1e1e;
    color: #ffffff;
    border-top: 1px solid #007acc; /* VS Code's blue accent */
}

/* Activity bar (left sidebar icons) */
.activity-bar {
    position: absolute;
    left: 0;
    top: 35px;
    width: 48px;
    height: calc(100% - 35px);
    background-color: #333333;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 10px;
    z-index: 10;
}

.activity-bar button {
    background: none;
    border: none;
    color: #858585;
    font-size: 20px;
    padding: 12px;
    margin-bottom: 4px;
    cursor: pointer;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.activity-bar button:hover {
    color: #ffffff;
}

.activity-bar button.active {
    color: #ffffff;
    border-left: 2px solid #007acc;
}

/* Explorer sidebar */
.sidebar {
    position: absolute;
    left: 48px;
    top: 35px;
    width: 240px;
    height: calc(100% - 35px);
    background-color: #252526;
    overflow-y: auto;
    color: #cccccc;
    z-index: 5;
}

.sidebar-header {
    padding: 12px 20px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #999;
    font-weight: bold;
}

/* Toolbar (minimized) */
.toolbar {
    position: absolute;
    top: 6px;
    right: 12px;
    display: flex;
    gap: 14px;
    z-index: 10;
}

.toolbar button {
    background: none;
    border: none;
    color: #cccccc;
    font-size: 14px;
    cursor: pointer;
    transition: color 0.2s ease;
    opacity: 0.8;
}

.toolbar button:hover {
    color: #ffffff;
    opacity: 1;
}

/* Main code editor */
.code-editor {
    flex-grow: 1;
    /* margin-left: 48px; Space for activity bar */
    margin: 0 5px;
    padding: 12px 0 12px 12px;
    white-space: pre;
    overflow-x: auto;
    outline: none;
    line-height: 2;
    overflow-y: auto;
    caret-color: #fff;
    spellcheck: false;
    font-size: 14px;
    tab-size: 4;
    -moz-tab-size: 4;
}

/* Line numbers */
.code-container {
    display: flex;
    flex-direction: row;
}

.line-numbers {
    min-width: 40px;
    padding: 12px 8px;
    text-align: right;
    color: #858585;
    background-color: #1e1e1e;
    user-select: none;
    font-size: 14px;
    line-height: 1.5;
}

/* Status bar */
.status-bar {
    height: 22px;
    background-color: #007acc; /* VS Code blue */
    color: #ffffff;
    display: flex;
    align-items: center;
    padding: 0 10px;
    font-size: 12px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.status-item {
    padding: 0 8px;
    display: flex;
    align-items: center;
}

.status-right {
    margin-left: auto;
    display: flex;
}

/* Code editor active line highlight */
.active-line {
    background-color: #282828;
}

/* Editor scrollbar styling */
.code-editor::-webkit-scrollbar {
    width: 14px;
    height: 14px;
}

.code-editor::-webkit-scrollbar-thumb {
    background-color: #424242;
    border: 4px solid #1e1e1e;
    border-radius: 7px;
    cursor: default;
}

.code-editor::-webkit-scrollbar-thumb:hover {
    background-color: #4f4f4f;
    cursor: pointer;
}

.code-editor::-webkit-scrollbar-corner {
    background-color: #1e1e1e;
}

/* Syntax Highlighting Rules */
.highlight-double-curly {
    color: #d19a66;
    font-weight: bold;
}

.highlight-source {
    color: #61afef;
}

.highlight-dot {
    color: #abb2bf;
}

.highlight-object {
    color: #e5c07b;
}

.highlight-const {
    color: #c678dd;
    font-weight: bold;
}

.highlight-appConfig {
    color: #98c379;
}

.highlight-curly {
    color: #d7ba7d; 
}
.highlight-brackets {
    color: #c678dd; /* matched square brackets */
}

.highlight-curly-error {
    color: #f14c4c; /* VS Code error red */
    /* Replace wavy underline with more visible options */
    text-decoration: none; /* Remove the wavy underline */
    border-bottom: 2px dotted #f14c4c; /* Add a more visible dotted border */
    padding-bottom: 1px; /* Add space for the border */
    background-color: rgba(241, 76, 76, 0.1); /* Light red background */
}

.highlight-brackets-error {
    color: #f14c4c; /* VS Code error red */
    /* Replace wavy underline with more visible options */
    text-decoration: none; /* Remove the wavy underline */
    border-bottom: 2px dotted #f14c4c; /* Add a more visible dotted border */
    padding-bottom: 1px; /* Add space for the border */
    background-color: rgba(241, 76, 76, 0.1); /* Light red background */
}

.highlight-parentheses {
    color: #56b6c2;
}

.highlight-null {
    color: #e5c07b;
    font-style: italic;
}

.highlight-key {
    color: #61afef;
    font-weight: bold;
}

.highlight-comment {
    color: #6a9955;
    font-style: italic;
}

.highlight-reserved {
    color: #c586c0; 
    font-weight: normal;
}

.highlight-required {
    color: #cc7a3d;
    font-weight: normal;
}


.lint-error-border {
    border: 3px solid rgba(241, 76, 76, 0.7); /* VS Code error red with some transparency */
    border-radius: 4px; /* Slightly rounded corners */
    animation: elegant-pulse 3s ease infinite;
    box-shadow: 0 0 5px rgba(241, 76, 76, 0.3); /* Subtle glow effect */
}

@keyframes elegant-pulse {
  0% {
    border-color: rgba(241, 76, 76, 0.7);
    box-shadow: 0 0 5px rgba(241, 76, 76, 0.3);
  }
  50% {
    border-color: rgba(241, 76, 76, 0.4);
    box-shadow: 0 0 8px rgba(241, 76, 76, 0.2);
  }
  100% {
    border-color: rgba(241, 76, 76, 0.7);
    box-shadow: 0 0 5px rgba(241, 76, 76, 0.3);
  }
}


/* Table Container */
.table-container {
    width: calc(100% - 40px);
    max-width: 1200px;
    margin: 1rem auto 4.5rem;
    overflow-y: auto;
    height: calc(50vh - 50px);
    border: 1px solid rgba(0, 99, 43, 0.2); /* var(--fijs-primary) with opacity */
    box-shadow: 0 4px 20px rgba(0, 99, 43, 0.1);
    border-radius: 8px;
    background-color: var(--fijs-bg);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Arial', sans-serif;
    font-size: 14px;
}

th, td {
    border: 1px solid var(--fijs-muted);
    padding: 12px 16px;
    text-align: left;
    vertical-align: middle;
}

th {
    background: var(--color-innovate); 
    color: #fff; /* White text for contrast */
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

tr:hover {
    background-color: rgba(0, 171, 75, 0.05); /* var(--fijs-gradient2) with opacity */
    transition: background-color 0.2s ease;
}

td {
    transition: background-color 0.3s;
}

.groupHeadRow {
    background-color: rgba(0, 99, 43, 0.8); /* var(--fijs-primary) with opacity */
    color: #fff;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.groupHeadRow:hover {
    background-color: var(--fijs-gradient1);
}

.groupRow {
    background-color: rgba(0, 99, 43, 0.3); /* var(--fijs-primary) with opacity */
    color: var(--text-color);
    font-weight: 400;
}

.groupRow:hover {
    background-color: rgba(0, 99, 43, 0.4); 
}

.button {
    background: linear-gradient(135deg, rgba(0, 63, 77, 0.6), var(--fijs-primary)); /* Deep teal with opacity to --fijs-primary */
    color: #fff; /* White text for contrast */
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.button:hover {
    background: linear-gradient(135deg, var(--fijs-gradient1), var(--fijs-gradient2)); /* Mid-tone to light green on hover */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

tr:last-child {
    background-color: rgba(0, 171, 75, 0.1); /* var(--fijs-gradient2) with opacity */
    font-weight: 600;
    border-top: 2px solid rgba(0, 99, 43, 0.5); /* var(--fijs-primary) with opacity */
}

#formula-interplay {
    text-align: center;
    font-family: Arial, sans-serif;
    margin: 2em 0;
}


#formula-interplay h2 {
    font-size: 1.5em;
    margin-bottom: 1em;
    color: #2c3e50;
}

.security-container {
    border: 3px solid #2c3e50;
    border-radius: 15px;
    padding: 1.5em;
    position: relative;
    background-color: #ecf0f1;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.security-label {
    position: absolute;
    top: -1.5em;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.9em;
    font-weight: bold;
    background-color: #ecf0f1;
    padding: 0 0.5em;
    color: #2c3e50;
    border: 1px solid #2c3e50;
    border-radius: 10px;
}

.diagram {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1em;
}

.data-source-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1em;
}   

.data-source {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 60px;
    background-color: #ecf0f1;
    border: 2px solid #3498db;
    border-radius: 30px; /* Cylinder effect */
    text-align: center;
    font-weight: bold;
    color: #3498db;
}

.processing {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 5px;
    width: 200px;
    height: 200px;
    border: 2px solid #2c3e50;
    border-radius: 10px;
    background-color: #ffffff;
    padding: 4px;
}

.quadrant {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #3498db;
    background-color: #ecf0f1;
    font-size: 0.9em;
    font-weight: bold;
    color: #2c3e50;
}

.functions {
    border-color: #1abc9c;
}

.advanced-operations {
    border-color: #3498db;
}

.ai {
    border-color: #9b59b6;
}

.api-calls {
    border-color: #e74c3c;
}

.results {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 160px;
    height: 120px;
    border: 2px solid #2c3e50;
    background-color: #ecf0f1;
    font-weight: bold;
    text-align: center;
    color: #2c3e50;
    position: relative;
}

.results.screen {
    border-radius: 5px; /* Screen-like appearance */
    background-image: linear-gradient(to bottom, #ecf0f1, #bdc3c7);
}

.arrow {
    font-size: 2em;
    color: #2c3e50;
}

.caption {
    font-size: 0.9em;
    margin-top: 1em;
    color: #7f8c8d;
}

code {
  font-family: 'Courier New', Courier, monospace; /* Use a monospaced font */
  background-color: #f5f5f5; /* Light background for better readability */
  color: #d6336c; /* Distinct color for the code text */
  border: 1px solid #ddd; /* Light border to make it stand out */
  border-radius: 4px; /* Rounded corners for better aesthetics */
  padding: 2px 4px; /* Add some padding inside the code block */
  font-size: 90%; /* Slightly smaller font size */
  word-wrap: break-word; /* Allow code to break onto a new line if it's too long */
}

.innovation-box {
    border-left: 4px solid #3498db;
    padding-left: 15px;
    margin: 15px 0;
}

.code-block {
  background: #f8f8f8;
  border-left: 4px solid #ccc;
  padding: 1rem;
  font-family: monospace;
  white-space: pre-wrap;
  margin: 1rem 0;
}