/* Reset default browser styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background-color: #1a1a1a;
    color: #e0e0e0;
    line-height: 1.6;
}

/* Header styles */
header {
    background-color: #333;
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
} /* Back arrow styles */
.back-arrow {
    color: #4a9eff;
    text-decoration: none;
    font-size: 1.2rem;
    margin-left: auto;
}

/* Increased size for the first H1 header in the article */
#article-content h1:first-of-type {
    font-size: 2.5rem;
    margin-top: 0;
}

header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

header h1 a {
    color: #4a9eff;
    text-decoration: none;
    font-size: 2rem;
}

header h1 {
    display: flex;
    align-items: center;
}

.logo {
    width: 30px;
    height: 30px;
    margin-right: 10px;
}

#search {
    padding: 0.5rem;
    border: none;
    border-radius: 4px;
    background-color: #444;
    color: #fff;
}

/* Main content styles */
main {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.content h1,
.content h2 {
    margin-bottom: 1rem;
    color: #4a9eff;
}

/* Article list styles */
#article-list {
    list-style: none;
}

#article-list li {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    padding: 1rem;
    background-color: #222;
    border-radius: 4px;
    transition:
        transform 0.2s,
        box-shadow 0.2s;
}

#article-list li:hover {
    transform: translateX(5px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#article-list a {
    color: #4a9eff;
    text-decoration: none;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
}

.thumbnail {
    width: 100px;
    height: auto;
    margin-right: 1rem;
    border-radius: 4px;
}

.date {
    font-size: 0.9rem;
    color: #888;
    margin-left: auto;
}

/* Article content styles */
#article-content {
    background-color: #222;
    padding: 2rem;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#article-content h1,
#article-content h2,
#article-content h3,
#article-content h4,
#article-content h5,
#article-content h6 {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    color: #4a9eff;
}

#article-content p {
    margin-bottom: 1rem;
}

#article-content pre {
    background-color: #333;
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    position: relative;
}

#article-content code {
    font-family: "Courier New", Courier, monospace;
}

#article-content pre button {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background-color: #4a9eff;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
}

/* Table styles */
#article-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

#article-content th,
#article-content td {
    border: 1px solid #444;
    padding: 0.5rem;
    text-align: left;
}

#article-content th {
    background-color: #333;
}

/* Responsive design */
@media (max-width: 600px) {
    header nav {
        flex-direction: column;
        align-items: flex-start;
    }

    #search {
        margin-top: 1rem;
        width: 100%;
    }

    #article-list li {
        flex-direction: column;
        align-items: flex-start;
    }

    .thumbnail {
        width: 100%;
        margin-bottom: 1rem;
    }
}

.error {
    color: #ff4444;
    padding: 1rem;
    text-align: center;
    background: rgba(255, 68, 68, 0.1);
    border-radius: 4px;
}

.copy-button {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: #4a9eff;
    border: none;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
}

.copy-button:hover {
    background: #3a8eef;
}

pre {
    position: relative;
    padding-top: 2.5rem;
}
