/* Base Theme - Dark Mode */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    background-color: #1b1a1a;
    color: #f0f0f0;
    font-family: Arial, Helvetica, sans-serif;
}
@import url('https://fonts.googleapis.com/css2?family=Fira+Mono:wght@500&display=swap');

/* Logo Container Styling */
.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 50px;
    flex-wrap: wrap;
    padding: 20px 30px;
    background-color: #22252A;
    border-radius: 18px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* Logo Styling */
.logo {
    width: 90px;
    height: auto;
    filter: drop-shadow(0 0 4px rgba(77, 184, 255, 0.25));
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

/* Title Styling */
.algo-title {
    font-family: 'Fira Mono', monospace;
    font-weight: 500;
    font-size: 3.2rem;
    background: linear-gradient(90deg, #7fbfff, #3997cc, #7fbfff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 150% 150%;
    animation: subtle-gradient-shift 10s ease infinite;
    letter-spacing: 2px;
    text-align: center;
}

/* Subtle Gradient Animation */
@keyframes subtle-gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}


body {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    background-color: #1b1a1a;
    color: #f0f0f0;
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.6;
}

/* Intro Page */
.intropage {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 100vh;
    width: 100vw;
    padding: 20px;
}

/* Buttons (Intro Page & Navigation) */
.topicbtn, button {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    width: 60%;
    max-width: 500px;
    padding: 20px 40px;
    margin: 20px 0;
    font-size: 1.2rem;
    border: none;
    border-radius: 12px;
    background-color: #2d2d2d;
    color: #f0f0f0;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s;
}

.topicbtn a, button a {
    text-decoration: none;
    color: inherit;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}


/* Hover Effects */
.topicbtn:hover, button:hover {
    background-color: #3b3b3b;
    transform: scale(1.05);
}

/* Next Button (Smaller Version of Topic Button) */
.nextbtn {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    width: 200px;
    padding: 12px 20px;
    margin: 20px 0;
    font-size: 1rem;
    border: none;
    border-radius: 10px;
    background-color: #2d2d2d;
    color: #f0f0f0;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s;
}

.nextbtn a {
    text-decoration: none;
    color: inherit;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.nextbtn:hover {
    background-color: #3b3b3b;
    transform: scale(1.05);
}

/* Content Pages Styling */
body {
    line-height: 1.6;
    padding: 20px;
}

/* Headings */
h1, h2, h3 {
    margin: 20px 0 10px;
}

/* Paragraphs */
p {
    margin-bottom: 15px;
    max-width: 900px;
}

/* Links */
a {
    color: #79b8ff;
    text-decoration: none;
}

a:hover {
    text-decoration: none;
    color: #a5d6ff;
}

/* Code Blocks */
pre {
    background-color: #2d2d2d;
    border-radius: 8px;
    overflow-x: auto;
    max-width: 900px;
    margin: 10px 0; /* less vertical margin */
    font-size: 0.95rem; /* optional: slightly smaller font */
}

/* Inline code stays same */
code {
    font-family: 'Courier New', Courier, monospace;
    background-color: #2d2d2d;
    border-radius: 4px;
    color: #e6db74;
    line-height: 1.4;
}

/* Ensure no extra space inside pre code */
pre code {
    display: block;
    padding: 0;
    background-color: inherit;
    line-height: inherit;
    margin: 0;
}

/* Images */
img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 15px 0;
    border-radius: 8px;
}


/* Lists */
ul {
    margin: 15px 0 15px 20px;
    background-color: inherit;
}

/* Assignment Section */
#assgn {
    margin-top: 30px;
    padding: 25px;
    border: 1px solid #444;
    border-radius: 12px;
    background-color: #1f1f1f;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    max-width: 900px;
    line-height: 1.8;
}

/* Fix the list inside #assgn */
#assgn ul {
    margin: 0;
    padding-left: 20px;
    list-style-type: disc;
    background-color: transparent;
}

#assgn li {
    margin-bottom: 12px;
    background-color: transparent;
    color: #dddddd;
}

/* Slightly brighter links in the assignment section */
#assgn a {
    color: #8ab4f8;
    text-decoration: none;
}

#assgn a:hover {
    color: #a5d6ff;
    text-decoration: underline;
}


/* Responsive Adjustments */
@media (max-width: 768px) {
    .topicbtn, button {
        width: 80%;
        font-size: 1rem;
        padding: 15px;
    }

    body {
        padding: 15px;
    }
}

/* tables */
/* Table Styling */
table {
    border-collapse: collapse;
    width: 100%;
    max-width: 900px;
    margin: 30px auto;
    font-size: 1rem;
    background-color: #2d2d2d;
    color: #f0f0f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    border-radius: 10px;
    overflow: hidden;
}

th, td {
    padding: 15px 20px;
    border: 1px solid #444;
    text-align: left;
    background-color: #2d2d2d;
}

thead {
    background-color: #333;
}

th {
    font-weight: bold;
    background-color: #1f1f1f;
    color: #8ab4f8;
}

tr:nth-child(even) {
    background-color: #242424;
}

tr:hover {
    background-color: #3b3b3b;
}

/* Responsive Table (Optional Enhancement) */
@media (max-width: 768px) {
    table, thead, tbody, th, td, tr {
        display: block;
    }

    thead {
        display: none;
    }

    tr {
        margin-bottom: 15px;
    }

    td {
        padding-left: 50%;
        position: relative;
    }

    td::before {
        position: absolute;
        top: 12px;
        left: 20px;
        width: 45%;
        white-space: nowrap;
        font-weight: bold;
        color: #79b8ff;
        content: attr(data-label);
    }
}
