html {
    scroll-behavior: smooth;
}
body {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    background-color: #0f172a;
    color: #e2e8f0;
    margin: 10px;
}



ul.nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 20px 10px;
    justify-content: flex-start;
    list-style: none;
    margin: 0;
    padding: 0;
}
ul.nav-links li {
    margin: 0;
    white-space: nowrap;
}
ul.nav-links li a {
    background-color: #1e293b;
    border: 1px solid #1e293b;
    border-radius: 8px;
    color: #38bdf8;
    font-weight: 500;
    text-decoration: none;
    padding: 5px 15px;
}
ul.nav-links li a:hover {
    background-color: #334155;
    border: 1px solid #38bdf8;
    color: #c7ebfc;
}



#toTop {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 50%;
    bottom: 20px;
    color: #38bdf8;
    cursor: pointer;
    display: none;
    font-size: 22px;
    font-weight: bold;
    height: 40px;
    opacity: 0;
    position: fixed;
    right: 20px;
    width: 40px;
    z-index: 100;
}



h1 {
    color: white;
}
h1.sticky-header {
    background-color: rgba(15, 23, 42, 0.5);
    border-bottom: 1px solid #334155;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    margin: 0;
    padding: 10px 20px;
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(4px);
}
h2 {
    margin-top: 0;
    color: #38bdf8;
}



.section {
    border: 1px solid #334155;
    border-radius: 12px;
    margin-bottom: 20px;
    padding-top: 10px;
    position: relative;
}
.card-container {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 24px;
    padding: 5px;
}
.card {
    background-color: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    color: #e2e8f0;
    padding: 10px;
    min-width: 0;
    transition: transform 200ms ease, box-shadow 200ms ease;
}
.card:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}
.code_section,
.output_section {
    scrollbar-width: thin;
    background-color: #020617;
    border-radius: 6px;
    min-width: 0;
    scrollbar-color: #334155 #1e293b;
}
.code_section::-webkit-scrollbar,
.output_section::-webkit-scrollbar {
    height: 6px;
}
.code_section {
    align-items: center;
    border: 1px solid #38bdf8;
    color: #38bdf8;
    box-sizing: border-box;
    display: flex;
    font-weight: bold;
    margin-bottom: 0;
    position: relative;
    transition: 500ms ease;
}
.code_scroll {
    overflow-x: auto; 
    padding: 10px;
    white-space: nowrap;
}
.output_section {
    color: #94a3b8;
    margin-top: 0;
    overflow-x: auto;
    white-space: nowrap;
    padding: 10px;
}
.code_section code,
.output_section code {
    display: inline-block;
    min-width: max-content;
}
.code_section i {
    color: rgb(28, 95, 252);
}
.code_section code {
    background-color: transparent;
    padding-right: 60px;
    transition: 500ms ease;
}
.output_section i {
    color: green;
}
span {
    display: inline-block;
    margin: 10px 0;
}
.code_section:hover {
    background-color: #020617;
    border-color: #c7ebfc;
}
@media (min-width: 600px) {
    body {
        margin: 20px;
    }
    .card-container {
        padding: 20px;
    }
    .card{
        padding: 20px;
    }
}
@media (min-width: 1200px) {
    .card-container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (min-width: 1800px) {
    .card-container {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
@media (min-width: 2400px) {
    .card-container {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}
@media (min-width: 3000px) {
    .card-container {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}
@media (min-width: 3600px) {
    .card-container {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

#search-input {
    background-color: #1e293b;
    border: 1px solid #38bdf8;
    border-radius: 10px;
    color: #e2e8f0;
    font-size: 14px;
    margin: 16px 0;
    max-width: 400px;
    outline: none;
    padding: 10px 12px;
    transition: border 150ms ease, box-shadow 150ms ease;
    width: 100%;
}
#search-input:focus {
    border-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}
#search-input::placeholder {
    color: #64748b;
}
#search-input::-webkit-search-decoration,
#search-input::-webkit-search-cancel-button,
#search-input::-webkit-search-results-button,
#search-input::-webkit-search-results-decoration {
    display: none;
}
.search-wrapper {
    display: flex;
    justify-content: center;
}
.copy-button {
    background: #334155;
    border: none;
    border-radius: 6px;
    color: #38bdf8;
    cursor: pointer;
    font-size: 12px;
    opacity: 0;
    padding: 4px 8px;
    position: absolute;
    right: 5px;
    top: 5px;
    transition: opacity 200ms ease;
    z-index: 10;
}
.copy-button.visible {
    opacity: 1;
}
.code_section:hover .copy-button {
    opacity: 1;
}
.scroll-position {
    background-color: rgba(30, 41, 59, 0.8);
    border: 1px solid #334155;
    border-radius: 12px;
    bottom: 10px;
    color: #38bdf8;
    font-size: 12px;
    left: 50%;
    padding: 5px 10px;
    position: fixed;
    transform: translateX(-50%);
    z-index: 100;
}
hr {
    border: none;
    border-top: 1px solid #334155;
    margin: 20px 0;
}
.back-link {
    color: white;
    transition: 300ms ease;
}
.back-link:hover {
    color: #38bdf8;
}
span.code_comment {
    color: #64748b;
    font-style: italic;
    margin: 0;
}