/* Browser Reset Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
  line-height: 1.7;
}

article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
  display: block;
}

body {
  line-height: 1;
}

ol, ul {
  list-style: none;
}

blockquote, q {
  quotes: none;
}

blockquote:before, blockquote:after,
q:before, q:after {
  content: '';
  content: none;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* Custom Styles */
.hide {
   display: none !important;
}  

body {
   font-family: 'Tahoma', sans-serif;
   background-color: #f4f4f4;
   color: #333;
   display: grid;
   grid-template-rows: auto 5fr;
   gap: 20px;
   padding: 20px;
   min-height: 100vh;
   min-width: 100vw;
}

header {
   background-color: #007acc;
   color: white;
   text-align: center;
   height: 100px;
   display: flex;
   justify-content: space-between;
   align-items: center;
}

header h1 {
   font-size: 2em;
   height: 100%;
   padding: 20px;
}

main {
   display: grid;
   grid-template-columns: 1fr 5fr;
   gap: 20px;
   background-color: white;
   padding: 20px;
   border-radius: 8px;
   box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

section.subjects {
   display: flex;
   flex-direction: column;
   gap: 30px;
   background-color: #e0e0e0;
   padding: 20px;
   border-radius: 8px;
}
section.subjects h2 {
   font-size: 1.5em;
   color: #007acc;
   width: 100%;
   text-align: left;
   padding: 10px 0;
   border-bottom: #007acc 2px solid;
}
section.subjects ul {
   display: flex;
   flex-direction: column;
   gap: 10px;
   list-style: none;
   padding-left: 0;
}
section.subjects ul li {
   margin-bottom: 10px;
}
section.subjects ul li a {
   color: #023a5f;
   text-decoration: none;
   font-size: 1.1em;
}
section.subjects ul li a:hover {
   text-decoration: underline;
}

section.explanation {
   display: flex;
   flex-direction: column;
   gap: 20px;
   /* background-color: #e0e0e0; */
   padding: 20px;
   border-radius: 8px;
}
section.explanation h2 {
   font-size: 1.5em;
   color: #007acc;
   width: 100%;
   text-align: left;
   padding: 10px 0;
   border-bottom: #007acc 2px solid;
}
section.explanation .explanation-item-container {
   display: grid;
   grid-template-columns: 1fr;
   gap: 20px;
}
/* section.explanation .explanation-item-container .explanation-items {
   background-color: #d0d0d0;
   padding: 20px;
   border-radius: 8px;
}
section.explanation .explanation-item-container .explanation-items ol {
   list-style: decimal inside;
   padding-left: 20px;
}
section.explanation .explanation-item-container .explanation-items ol li {
   margin-bottom: 10px;
} */
section.explanation .explanation-item-container .explanation-content {
   /* background-color: #d0d0d0; */
   padding: 20px;
   border-radius: 8px;
}
section.explanation .explanation-item-container .explanation-content h2 {
   font-size: 1.3em;
   color: #013a60;
   margin-bottom: 10px;
}
section.explanation .explanation-item-container .explanation-content .explanation {
   font-size: 1em;
   color: #333;
   line-height: 1.5;
}

.explanation h3 {
   font-size: 1.5em;
   color: #007acc;
   width: 100%;
   text-align: left;
   padding: 10px 0;
}

.explanation p {
   font-size: 1em;
   color: #333;
   line-height: 1.5;
}

.explanation .explanation-images {
   display: flex;
   gap: 20px;
   margin-top: 20px;
}

.explanation .explanation-images img {
   max-width: 45%;
   height: auto;
}

.explanation .explanation-images img:hover {
   transform: scale(2);
   transition: transform 0.3s ease;
}

.explanation .explanation-images img:last-child {
   background-color: white;
}

#explanation-items-list {
   display: flex;
   flex-direction: column;
   gap: 30px;
   list-style: decimal inside;
   padding-left: 20px;
} 

#explanation-items-list li {
   cursor: pointer;
   padding: 20px 5px;
   border-radius: 4px;
   transition: background-color 0.3s ease;
}

code {
   background-color: #99ebfe;
   padding: 2px 4px;
   border-radius: 4px;
   font-family: 'Courier New', monospace;
   font-weight: bold;
}

code.code-js {
   background-color: #d3d3d3;
   color: #003366;
   width: 100%;
   display: block;
   padding: 10px;
   border-radius: 4px;
   font-weight: bold;
}

.warning {
   background-color: #ffcccc;
   color: #cc0000;
   padding: 10px;
   border-radius: 4px;
   border: 1px solid #cc0000;
}

.example-section {
   background-color: #e0e0e0;
   padding: 20px;
   border-radius: 8px;
}

.example-section h2 {
   font-size: 1.5em;
   color: #007acc;
   width: 100%;
   text-align: left;
   padding: 10px 0;
   border-bottom: #007acc 2px solid;
}

.example-section img {
   max-width: 100%;
   height: auto;
   border-radius: 8px;
}

#dom-tree{
   background-color: white;
   width: 85%;
   padding: 5px;
}

h3 {
   font-size: 1.2em;
   color: #007acc;
   width: 100%;
   text-align: left;
   padding: 10px 0;
}

h4 {
   font-size: 1.1em;
   font-style: italic;
   color: #007acc;
   width: 100%;
   text-align: left;
   padding: 10px 0;
}

.output-container {
   background-color: #1b1b1b;
   color: #fff;
   padding: 20px;
   border-radius: 8px;
   width: 80%;
   height: 200px;
   overflow-y: auto;
}

#mouseover-img {
   width: 200px;
   max-width: 200px;
   height: auto;
   transition: transform 0.3s ease;
}

.logo-section {
   display: flex;
   height: 100px;
   align-items: center;
} 

.logo-section a {
   display: flex;
   height: 100px;
   width: 100px;
   align-items: center; 
   justify-content: center;
   text-decoration: none;
}

.logo-section a img.logo {
   width: 80px;
   height: 80px;
}

.keyword {
   /* background-color: #d3d3d3; */
   color: #a85803;
   font-family: 'Courier New', monospace;
   font-weight: bold;
}

.keyword-extern {
   /* background-color: #d3d3d3; */
   color: #dc04a6;
   font-family: 'Courier New', monospace;
   font-weight: bold;
}

.keyword-yellow {
   /* background-color: #d3d3d3; */
   color: #e6b800;
   font-family: 'Courier New', monospace;
   font-weight: bold;
}

.keyword-green {
   /* background-color: #d3d3d3; */
   color: #4caf50;
   font-family: 'Courier New', monospace;
   font-weight: bold;
}

.conditions-table {
   width: 50%;
   border-collapse: collapse;
   margin-top: 20px;
}

.conditions-table th, .conditions-table td {
   border: 1px solid #1e5c75;
   padding: 8px;
   text-align: center;
}

.conditions-table th {
   background-color: #007acc;
   color: white;
}

.conditions-table tr:nth-child(even) {
   background-color: #f2f2f2;
}

.conditions-table tr:hover {
   background-color: #ddd;
}

.true-condition {
   background-color: #c8e6c9;
   color: darkgreen;
}
.false-condition {
   background-color: #ffcdd2;
   color: darkred;
}

.subtitle {
   font-size: 0.4em;
   font-style: italic;
   color: #505050;
   display: block;
   margin-top: 5px;
}

.warning-small {
   background-color: #ffcccc;
   font-size: 0.5em;
   font-style: italic;
   color: #cc0000;
   padding: 8px;
   border-radius: 4px;
   border: 1px solid #cc0000;
}