* {
    margin: 0;
    padding: 0;
    font-family: "Poppins", sans-serif;
}

header {
    display: flex;
    justify-content: space-between;
    padding: 20px 40px;
    box-sizing: border-box;
    align-items: center;
    font-family: sans-serif;
    background-color: #263238;
    color: #fff;
}

nav {
    display: flex;
    gap: 0 50px;
    align-items: center;
}

nav a {
    color: #fff;
    text-decoration: none;
}

nav a:hover {
    text-decoration: underline;
}


.blog_wrapper,
.login_wrapper {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100vh;
    background-color: #292929;
    color: #fff;
}

.blog_post__form {
    width: 600px;
}

.blog_post__form form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    box-sizing: border-box;
}

input {
    width: 100%;
    padding: 10px;
    outline: none;
    border: solid 1px #eee;
    box-sizing: border-box;
    margin: 5px 0;
    background-color: #212121;
    color: #fff;
    border-radius: 2px;
}

button[type="submit"] {
    grid-column: 1/3;
    padding: 10px;
    border-radius: 5px;
    background-color: #252525;
    color: #fff;
    cursor: pointer;
    border: solid 1px #fff;
}

button[type="submit"]:hover {
    background-color: #fff;
    color: #000;
    transform: scale(0.99);
}

.dashboard_wrapper {
    padding: 1rem;
    margin: auto;
    box-sizing: border-box;
    background-color: #212121;
}

/* Table Container for Horizontal Scroll */
.dashboard_main {
    width: 100%;
    overflow-x: scroll;
}

/* Table Structure */
table.blog_table {
    width: 100%;
    font-size: 0.95rem;
    table-layout: fixed;
    border-collapse: collapse;
}

/* Table Cells */
table.blog_table td,
table.blog_table th {
    width: fit-content;
    min-width: fit-content;
    max-width: fit-content;
    padding: 12px 15px;
    text-align: left;
    white-space: nowrap; /* Keep content in a single line */
    overflow: hidden; /* Hide anything that overflows */
    text-overflow: ellipsis; /* Add "..." when text overflows */
    max-width: 200px; /* You can adjust this as needed */
    font-size: 16px;
    color: #fff;
    border: solid 1px #616161;
}

/* Optional: Add tooltip for full value on hover */
table.blog_table td {
    position: relative;
    cursor: help;
}

table.blog_table td:hover::after {
    content: attr(title);
    position: absolute;
    left: 0;
    bottom: -1.8rem;
    background-color: #000;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    white-space: normal;
    font-size: 0.8rem;
    z-index: 10;
}

/* Row Styling */
table.blog_table tr:nth-child(even) {
    background-color: #303030;
}

.dashboard_head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.btns {
    display: flex;
    align-items: center;
    gap: 5px;
}

.btns a{
    padding: 10px;
    border: solid 1px #242424;
    text-decoration: none;
    color:#000;
    cursor: pointer;
    border-radius: 5px;
}

.btns a:hover {
    background-color: #000;
    color: #eee;
}

#delete {
    width: fit-content;
}

thead {
    background-color: #242424;
    color: #fff;
}

.actions {
    display: flex;
    gap: 5px;
    align-items: center;
}

button {
    outline: none;
    border: none;
    background: none;
    padding: 5px;
    border-radius: 5px;
    cursor: pointer;
    color: #fff;
}

button:hover {
    background-color: #000;
    color: #fff;
}

.blog-post_wrapper {
    width: 100%;
    height: 100vh;
    /* margin: 20px; */
    background-color: #212121;
}

/* .blog-content {
    background-color: #eee;
} */

.blog-post_main {
    padding: 20px;
    box-sizing: border-box;
    color: #fff;
}

.blog-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
    margin: 20px 0;
}

.edit-btn {
    outline: none;
    border: solid 1px #000;
    padding: 10px 20px;
    border-radius: 5px;
    background-color: #000;
    color: #fff;
    cursor: pointer;
}

.edit-btn:hover {
    color: #000;
    background-color: #fff;
}

.stats_wrapper {
    width: 100%;
    height: 100vh;
    display: grid;
    place-items: center;
    background-color: #212121;
    color: #fff;
}

.stats_main {
    width: 600px;
}

input:read-only {
    background-color: #616161;
    cursor: not-allowed;
}

@media screen and (max-width: 600px){
    table.blog_table td,
    table.blog_table th {
        width: 150px;
    }
    .blog-post_wrapper {
        margin: 5px;
    }
    .blog_post__form {
        width: 90%;
    }
    .blog_post__form form {
        display: flex;
        flex-direction: column;
    }
    header {
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        padding: 20px 10px;
    }
    nav {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        margin: 20px 0;
    }
    .stats_main {
        width: 90%;
    }
}