body {
    font-family: Arial, sans-serif;
    background: #1e1e1e;
    margin: 0;
    color: #f4f4f4;
}

ul {
    padding-inline-start: 0px !important;
    list-style-position: inside;
}

ol {
    padding-inline-start: 0px !important;
    list-style-position: inside;
}


h1 {
    margin: 10px 0;
}

.backtrack {
    flex-shrink: 0;
    left: 2%;
    position: sticky;
    width: 50px;
    max-width: 8%;
    height: 0;
    transform: translateY(15px);
}

.backtrack:hover{
    background-color: rgb(54, 53, 53);
}

div.horizontal-space-small{
    padding-top:15px;
}
div.horizontal-space-large{
    padding-top:40px;
}
img.go_back {
    display: block;
    filter: invert(0.7);
    width: 100%;
    height: auto;
    max-width: 50px;     
}

li {
  margin: 0.94em 0;   
  line-height: 1.4em;
}


#First-Method > ol > li, #First-Method > ul > li{
    display: none;
}

#Second-Method > ol > li, #Second-Method > ul > li{
    display: none;
}

#Third-Method > ol > li, #Third-Method > ul > li{
    display: none;
}

#Fourth-Method > ol > li, #Fourth-Method > ul > li{
    display: none;
}

.leetcode-link{
    color:rgb(118, 113, 201);
    text-decoration: none;
}
.solution-card{
    margin: auto;
    margin-top:30px;
    width: 80%;
    background-color: rgb(42, 42, 42);
    border-style: solid;
    border-color: white;
    border-radius: 10px;
    border-width: 1px;
}
.solution-video{
    display:block;
    width: 90%;
    margin: auto;
    aspect-ratio: 16/9;
}
.roboto-bold {
    font-family: "Roboto", sans-serif;
    font-weight: 700;
    font-size: 2.5rem;
    color: white;
    margin-top: 20px;
    margin-bottom: 10px;
    line-height: 1.3;
    text-align: center;
    padding: 0 15px;
}

/* Style the tab */
.tab {
    display:flex;
    overflow-x: auto;
    white-space: nowrap;
    border: 1px solid #999;
    height: 45px;
    background-color: #d1cfcf;  /* Darkened tab background */
}

.tab button {
    background-color: inherit;
    float: left;
    border: none;
    outline: none;
    cursor: pointer;
    padding: 0px 16px;
    height: 100%;
    line-height: 45px;
    transition: 0.3s;
}

.tab button:hover {
    background-color: #bbb;  /* Darker on hover */
}

.tab button.active {
    background-color: #999;  /* Darkened active tab */
}
  
.tabcontent {
    display: none;
    border: 1px solid #ccc;
    border-top: none;
}

.tabcontent1 {
    display: none;
    border: 1px solid #ccc;
    border-top: none;
}

.tabcontent2 {
    display: none;
    border: 1px solid #ccc;
    border-top: none;
}

.tabcontent3 {
    display: none;
    border: 1px solid #ccc;
    border-top: none;
}

.tabText{
    font-size: 14px;
    margin-top: 0%;
    margin-bottom: 0%;
}

pre {
    margin: 0;
}

code.code-b{
    display: block;
    padding-left:20px !important;
    padding-top:20px !important;
    line-height: 20px; 
}

code.code-block {
    background-color: black;
    color: #d4d4d4;
    border-radius: 8px;
    font-family: monospace;
    font-size: 15px;
    line-height: 22.5px;
    overflow-x: scroll;
    text-align: left;
    margin: 0;
    display: block; 
    padding: 32px;
}

p{
    line-height:25px;
}

.detailed-explanation-content code{
    font-size: 16px;
}


h2 {
    margin-top: 40px;
}

h3 {
    margin-top: 40px;
}

#support-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #ff5f6d, #ffc371);
    color: white;
    font-weight: bold;
    font-size: 16px;
    padding: 15px 25px;
    border-radius: 50px;
    max-width: 60%;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    text-decoration: none;
    z-index: 999;
    animation: pulse 10s infinite;
    transition: transform 0.2s ease;
}

#support-button:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    10% {
        transform: scale(1.08);
    }
    20% {
        transform: scale(1);
    }
}

hr {
    background-color: #f5f5f5;
    border: none;
    display: block;
    height: 2px;
    margin: 50px;
}


.next-step-button {
    background-color: #4CAF50; /* green */
    color: white;
    padding: 10px 16px;
    font-size: 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.next-step-button:hover {
    background-color: #45a049;
    transform: translateY(-2px);
}

.next-step-button:active {
    transform: scale(0.97);
    background-color: #3e8e41;
}

#detailed-explanation {
  color: white;
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin-top: 2rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid white;
  letter-spacing: 0.5px;
}

.detailed-explanation-content{
    padding-left: 0;
    margin-left: 0;
}

.detailed-explanation-content ul{
    padding-left: 0.7em; 
    margin-left: 0;
    list-style-position: inside; 
}

.detailed-explanation-content code{
    font-family: arial, serif;
    font-size: inherit;
    background: none;
    padding: 0;
    border: none;
}

button.Hide-button {
  color: #333;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  margin-left: auto;
}

button.Hide-button:hover {
  background-color: #e0e0e0;
  color: #000;
}

button.Hide-button.active {
  background-color: inherit;
  color: #333;
}


.copy-button {
  position: absolute;
  display: inline-block;
  right: 20px;
  top: 10px;
  font-size: 12px;
  padding: 4px 10px;
  background-color: #2e2e2e;
  border: 1px solid #bbb;
  border-radius: 4px;
  cursor: pointer;
  color: white;
  transition: background-color 0.2s ease;
  z-index: 2;
}

.copy-button-code{
    position: absolute;
    display: inline-block;
    right: 80px;
    top: 10px;
    font-size: 12px;
    padding: 4px 10px;
    background-color: #2e2e2e;
    border: 1px solid #bbb;
    border-radius: 4px;
    cursor: pointer;
    color: white;
    transition: background-color 0.2s ease;
    z-index: 2;
}

.code-container .copy-button, .code-container .copy-button-code, .code-container .run-button{
  opacity: 0;
  transition: opacity 0.2s ease;
}

.code-container:hover .copy-button, .code-container:hover .copy-button-code, .code-container:hover .run-button{
  opacity: 1;
}


.code-container {
  position: relative;
}

.code-container pre{
    max-height: 500px;
    overflow-y: auto;
}

.run-button {
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 12px;
  padding: 5px 12px;
  background-color: #4CAF50;
  border: none;
  border-radius: 4px;
  color: white;
  font-family: monospace;
  cursor: pointer;
  transition: background-color 0.2s ease;
  z-index: 2;
}

.run-button:hover {
  background-color: #45a049;
}

.run-button:active {
  background-color: #3e8e41;
}




#courses-link{
    color: white;
}

img.google-colab {
    height: 30px; 
    vertical-align: middle;
    transform: translateY(-2px);
    margin-left: 5px;
    margin-right: 10px;
}

img.github-code{
    height: 30px; 
    vertical-align: middle;
    transform: translateY(-2px);
    margin-left: 10px;
    margin-right: 10px;
}

.CodeMirror {
    height: 500px;
}

.CodeMirror pre.CodeMirror-line{
    line-height: 1.5;
}

/* Responsive margin-left */
@media (max-width: 768px) {
    img.github-code {
        margin-left: 0px;
    }
    .roboto-bold {
        font-size: 1.5rem;
    }
    .solution-video{
        width: 100%;
    }
    .code-container pre{
        max-height: 400px;
        overflow-y: auto;
    }
    div.backtrack {
        position: absolute;
        left: 4%;
    }
    #support-button {
        max-height: fit-content !important;
        font-size: 12px !important;
    }
}

p.lesson-links{
    text-align: center;
}

.hljs-ln-numbers {
  text-align: right;
  padding-right: 1em;
}

.endingParagraph p, .endingParagraph li, .endingParagraph table{
    font-family: "Inter", sans-serif;
    font-optical-sizing: auto;
    font-weight: 300;
    font-style: normal;
}

.yt-lazy {
    position: relative;
    cursor: pointer;
    aspect-ratio: 16 / 9;
    border-radius: 4px;
    background-color: #000000;
}

.yt-lazy img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.yt-lazy .play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.yt-progress {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  width: 60px; height: 6px;
  background: #eee;
  border-radius: 3px;
  overflow: hidden;
  display: none; /* initially hidden */
  z-index: 2;
}
.yt-progress-bar {
  height: 100%;
  width: 0%;
  background: #4285f4;
  transition: width 0.5s;
}

.summary-toggle {
    cursor: pointer;
    background-color: #2a2a2a;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s;
}

.summary-toggle:hover {
    background-color: #3a3a3a;
}

.summary-toggle h2 {
    font-size: 1.2rem;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.arrow {
    margin-left: 8px;
    transition: transform 0.3s ease;
}

.short-explanation {
    max-height: 0;
    transition: max-height 0.4s ease;
    background-color: rgb(55,55,55);
    border: 1px solid #444;
    border-top: none;
    border-radius: 0 0 8px 8px;
    padding: 0 16px;
    overflow-y: hidden;
}

.short-explanation.open {
    max-height: 2000px;
    padding-top: 10px;
    overflow-y: auto;
    padding-bottom: 12px;
}

.short-explanation .summary-inner {
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Rotate arrow when open */
.short-explanation.open ~ .summary-toggle .arrow {
    transform: rotate(90deg);
}

#Front-logo {
    display: flex;
    justify-content: center; 
    align-items: center;   
    gap: 12px; 
}
