:root {
    --color-primary: #ebebeb;
    --color-primary-light: rgba(0, 0, 0, 0.2);
    --color-primary-variant: #5854c7;
    --color-red: #cf0000;
    --color-red-light: hsl(346, 87%, 46%, 15%);
    --color-green: #ffffff;
    --color-green-light: rgb(3, 95, 41);
    --color-gray-900: rgba(0, 0, 0, 0.2);
    --color-gray-700: #8e8e8e;
    --color-gray-300: rgba(138, 138, 138, 0.3);
    --color-gray-200: rgba(70, 70, 70, 0.7);
    --color-white: #000000;
    --color-bg: #ffffff;

    --transition: all 100ms ease;

    --container-width-lg: 74%;
    --container-width-md: 88%;
    --form-width: 74%;

    --card-border-radius-1: 0.3rem;
    --card-border-radius-2: 0.5rem;
    --card-border-radius-3: 0.8rem;
    --card-border-radius-4: 2rem;
    --card-border-radius-5: 5rem;
}

/* ============================================================================== GENERAL ================================================================================== */

* {
    margin: 0;
    padding: 0;
    outline: 0;
    border: 0;
    appearance: 0;
    list-style: none;
    text-decoration: none;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    color: var(--color-gray-200);
    overflow-x: hidden; 
    background: var(--color-bg);
    font-size: 0.9rem;
    min-height: 100vh; 
    padding-top: 70px; 
}
.container {
    width: var(--container-width-lg);
    max-width: 1800px;
    margin-inline: auto;
}

section {
    width: 100vw;
    display: flex;
    justify-content: center;
    align-items: center;
}

.section__extra-margin {
    margin-top: 4rem;
}

h1, h2, h3, h4, h5 {
    color: var(--color-white);
    line-height: 1.3;
}

h1 {
    font-size: 3rem;
    margin: 1rem 0;
}

h2 {
    font-size: 1.7rem;
    margin: 1rem 0;
}

h3 {
    font-size: 1.1rem;
    margin: 0.1rem 0 0.3rem;
}

h4 {
    font-size: 1rem;
}

a {
    color: var(--color-white);
    transition: var(--transition);
}

img {
    display: block;
    width: 100%;
    max-height: 100vw;
    object-fit: cover;
}

.btn.google-login-btn {
    color: #4285f4;
    background-color: white;
    display: flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 600;
    text-decoration: none;
  }
  .btn.google-login-btn:hover {
    background-color: #4285f4;
    color: white;
  }
  .google-logo {
    width: 20px;
    height: 20px;
    margin-right: 8px;
  }
  
  
.category__hashtag {
    color: rgb(168, 255, 195);
    text-decoration: none;
    margin-right: 5px;
    display: inline-block;
    opacity: 0.5;
}

.category__hashtag:hover {
    opacity: 1;
    transition: opacity 0.1s ease;
}

.stat-container {
    position: relative;
    width: 50%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 auto;
}

.stat-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    margin: 1rem;
}

.stat-item:hover .contribute-label {
    transform: scale(1.05);
    transition: transform 0.1s ease;
}

.stat-icon {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    opacity: 0.8;
}

.stat-count {
    font-size: 20px;
    margin-right: 5px;
    color: var(--color-gray-700);
}

.stat-label {
    font-size: 20px;
    color: var(--color-gray-700);
}

.stats-wrapper {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
}

@media (max-width: 1024px) {
    .stat-container {
        width: 90%;
    }
}


/* ============================================================================== NAV ================================================================================== */
nav {
    background: var(--color-primary);
    width: 100vw;
    height: 70px;
    position: fixed;
    top: 0;
    z-index: 10;
    box-shadow: 0 1rem 1rem rgba(0, 0, 0, 0.2);
}
nav button {
    display: none;
}
.nav__container {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    overflow: hidden;
    border: 0.3rem solid var(--color-bg);
    background: var(--color-primary); 
}
.nav__logo {
    display: flex;
    align-items: center;
}
.nav__logo img {
    height: 30px;
    margin-right: 10px; 
}
.nav__items {
    display: flex;
    align-items: center;
    gap: 4rem;
}
.nav__items a:hover {
    color: var(--color-gray-700);
    opacity: 0.8;
}
.nav__profile {
    position: relative;
    cursor: pointer;
}
.nav__profile ul {
    position: absolute;
    top: 140%;
    right: 0;
    display: flex;
    flex-direction: column;
    box-shadow: 0 3rem 3rem rgba(0, 0, 0, 0.4);
    visibility: hidden;
    transition: var(--transition);
}
.nav__profile:hover > ul {
    visibility: visible;
    background: var(--color-primary);
    opacity: 1;
}
.nav__profile ul li a {
    padding: 1rem;
    background: var(--color-gray-900);
    display: block;
    width: 100%;
}
.nav__profile ul li:last-child a {
    background: var(--color-red);
    color: var(--color-white);
}
.nav__profile ul li:last-child a:hover {
    background-color: #730000;
    opacity: 1;
}

.buttons {
    display: flex;
    width: 140px;
    gap: 4px;
    --b: 2px; 
    --h: 1.8em; 
  }
  .buttons button {
    --_c: #88C100;
    flex: calc(1.25 + var(--_s,0));
    min-width: 0;
    font-size: 12px;
    font-weight: bold;
    height: var(--h);
    cursor: pointer;
    color: var(--_c);
    border: var(--b) solid var(--_c);
    background: 
      conic-gradient(at calc(100% - 1.3*var(--b)) 0,var(--_c) 209deg, #0000 211deg) 
      border-box;
    clip-path: polygon(0 0,100% 0,calc(100% - 0.577*var(--h)) 100%,0 100%);
    padding: 0 calc(0.288*var(--h)) 0 0;
    margin: 0 calc(-0.288*var(--h)) 0 0;
    box-sizing: border-box;
    transition: flex .4s;
  }
  .buttons button + button {
    --_c: #eee;
    flex: calc(.75 + var(--_s,0));
    background: 
      conic-gradient(from -90deg at calc(1.3*var(--b)) 100%,var(--_c) 119deg, #0000 121deg) 
      border-box;
    clip-path: polygon(calc(0.577*var(--h)) 0,100% 0,100% 100%,0 100%);
    margin: 0 0 0 calc(-0.288*var(--h));
    padding: 0 0 0 calc(0.288*var(--h));
  }
  .buttons button:focus-visible {
    outline-offset: calc(-2*var(--b));
    outline: calc(var(--b)/2) solid #000;
    background: none;
    clip-path: none;
    margin: 0;
    padding: 0;
  }
  .buttons button:focus-visible + button {
    background: none;
    clip-path: none;
    margin: 0;
    padding: 0;
  }
  .buttons button:has(+ button:focus-visible) {
    background: none;
    clip-path: none;
    margin: 0;
    padding: 0;
  }
  button:hover,
  button:active:not(:focus-visible) {
    --_s: .75;
  }
  button:active {
    box-shadow: inset 0 0 0 100vmax var(--_c);
    color: #000;
  }


/* ============================================================================== CATEGORY BUTTON ================================================================================== */
.category__button {
    background: var(--color-primary-light);
    color: rgb(128, 128, 128);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: .5rem .5rem;
    border-radius: var(--card-border-radius-2);
    font-weight: 600;
    font-size: 0.8rem;
    text-align: center;
    height: 1.5rem;
    margin-top: .5rem;
}

.category__button:hover {
    color: var(--color-white);
}

/* ============================================================================== SWITCH ================================================================================== */
.switch {
    display: inline-block;
    width: 60px; 
    height: 30px; 
    margin: 4px;
    transform: translateY(50%);
    position: relative;
  }
  
  .switch input {
    display: none;
  }
  
  .switch label {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    border-radius: 30px;
    box-shadow: 0 0 0 2px #777, 0 0 4px #777;
    cursor: pointer;
    border: 4px solid transparent;
    overflow: hidden;
    transition: 0.2s;
  }
  
  .switch label:before {
    position: absolute;
    content: "";
    width: 100%;
    height: 100%;
    background-color: #777;
    border-radius: 30px;
    transform: translateX(-30px);
    transition: 0.2s;
  }
  
  .switch input:checked + label:before {
    transform: translateX(30px);
    background-color: rgb(255, 0, 0);
  }
  
  .switch input:checked + label {
    box-shadow: 0 0 0 2px rgb(205, 50, 50), 0 0 8px rgb(205, 50, 50);
  }
  
  .switch.switch200 label:before {
    width: 200%;
    transform: translateX(-82px);
  }
  
  .switch.switch200 input:checked + label:before {
    background-color: red;
  }
  
  .switch.switch200 input:checked + label {
    box-shadow: 0 0 0 2px red, 0 0 8px red;
  }
 
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    padding: 10px;
    border-radius: 5px;
}

.category-checkbox {
    display: flex;
    align-items: center;
}

.category-checkbox input[type="checkbox"] {
    margin-right: 5px;
}


/* ============================================================================== GENERAL POST ================================================================================== */
.about__thumbnail {
    width: 100%;
    height: auto;
    position: relative;
    border-radius: 2rem;
    border: 1rem solid rgba(0, 0, 0, 0.2);
    overflow: hidden;
    margin-bottom: 1.6rem;
}

.about__thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
}

.blank-cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 0, 0, 0.05);
    border-radius: 2rem;
    z-index: 100;
}

.post__title {
    transition: transform 0.2s ease;
}

.post__title a {
    color: inherit;
    text-decoration: none;
}

.post__title a:hover {
    transform: scale(1.01);
    color: var(--color-gray-700);
}


.post__thumbnail {
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;
    position: relative;
    border-radius: 2rem;
    border: 1rem solid rgba(0, 0, 0, 0.2);
    overflow: hidden;
    margin-bottom: 1.6rem;
}

.post__thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
}

.post__thumbnail::before {
    content: attr(data-domain);
    position: absolute;
    top: 20%;
    left: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 2rem;
    padding: 0 1rem;
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
    color: white;
    font-weight: 600;
    font-size: 0.7rem;
    z-index: 1;
    background-color: var(--flag-background-color);
}

.post:hover .post__thumbnail img {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

.post__author {
    display: flex;
    gap: 1rem;
    margin-top: 1.2rem;
}

.post__author-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--card-border-radius-3);
    overflow: hidden;
}
.post__author-avatar:hover {
    border: 3px solid var(--color-gray-700);
}
.post__author-avatar img {
    transition: transform 0.2s ease;
  }
  
  .post__author-avatar img:hover {
    transform: scale(1.3);
  }
  
.admin-image {
    opacity: 0.3;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.admin-image:hover {
    transform: scale(1.1);
    opacity: 1;
}

.add-post,
.add-post:visited,
.add-post:hover,
.add-post:focus,
.add-post:active {
    color: rgb(185, 185, 185);
}


/* ============================================================================== FEATURED ================================================================================== */
.featured {
    margin-top: 8rem;
}

.featured__container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.featured .post__thumbnail {
    height: fit-content;
}

/* ============================================================================== POSTS ================================================================================== */
.posts__container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5rem;
    margin-bottom: 5rem;;
}

/* ============================================================================== CATEGORY BUTTONS ================================================================================== */
.category__buttons {
    padding: 1rem 0;
    border-bottom: 2px solid var(--color-gray-900);
}

.category__buttons {
    max-width: 600px;
    padding-bottom: 3rem;
    margin: 0 auto;
}

.category__buttons .container {
    text-align: center;
    font-size: 7px;
}

.category__buttons-container {
    width: fit-content;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

/* ============================================================================== FOOTER ================================================================================== */
#myBtn {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 30px;
    z-index: 99;
    border: none;
    outline: none;
    background-color: var(--color-gray-700);
    color: white;
    cursor: pointer;
    padding: 15px;
    border-radius: 10px;
    font-size: 18px;
  }
  
  #myBtn:hover {
    background-color: #555;
  }
  

footer {
    background: var(--color-gray-900);
    padding: 2rem 0 0;
    box-shadow: inset 0 1.5rem 1.5rem rgba(0, 0, 0, 0.2);
}

.footer__socials {
    margin-inline: auto;
    width: fit-content;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.2rem;
}

.footer__socials a {
    background: var(--color-bg);
    border-radius: 50%;
    width: 2.3rem;
    height: 2.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer__socials a:hover {
    background: var(--color-white);
    color: var(--color-bg);
}

.footer__container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

footer h4 {
    color: var(--color-white);
    margin-bottom: 0.6rem;
}

footer ul li {
    padding: 0.4rem 0;
}

footer ul a {
    opacity: 0.75;
}

footer ul a:hover {
    letter-spacing: 0.2rem;
    opacity: 1;
}

.footer__copyright {
    text-align: center;
    padding: 1.5rem;
    border-top: 2px solid var(--color-bg);
    margin-top: 2rem;
}



/* ============================================================================== SEARCH ================================================================================== */
.search__bar {
    margin-top: 1rem;
    background-image: url('images/background.jpg');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    display: flex;
    align-items: start;
    justify-content: center;
    text-align: center;
    font-weight: bold;
    height: 80vh;
    color: black;

    text-shadow: 2px 2px 0 white,
               -2px -2px 0 white, 
                2px -2px 0 white, 
               -2px  2px 0 white; 
}
.search__bar > span {
    font-size: 36px;
}

.search__bar-container {
    position: relative;
    width: 30rem;
    background: var(--color-gray-900);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    overflow: hidden;
    padding: 0.6rem 1rem;
    border-radius: var(--card-border-radius-2);
    color: var(--color-gray-300);
}

.search__bar-container > div {
    width: 100%;
    display: flex;
    align-items: center;
}

.search__bar input {
    background: transparent;
    margin-left: 0.7rem;
    padding: 0.5rem 0;
    width: 100%;
}

.search__bar input::placeholder {
    color: var(--color-gray-300);
}
.custom-button {
    background: linear-gradient(105deg, #6a7281 1%, #0f0e13 65%); 
    border: none;
    border-radius: 28px;
    color: white;
    cursor: pointer;
    font-family: 'Alegreya Sans SC', sans-serif;
    font-size: 28px;
    padding: 5px 100px;
    text-align: center;
    text-decoration: none;
    position: relative;
    box-shadow: 
        0 3px 4px rgba(0, 0, 0, 0.9),
        inset 0 -4px 6px rgba(0, 0, 0, 0.9);
}

.custom-button::before {
    content: "";
    position: absolute;
    top: 2px; 
    left: 1px;
    right: 0;
    bottom: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.32); 
    border-left: 1px solid rgba(255, 255, 255, 0.537); 
    border-radius: 28px;
    pointer-events: none;
}

.custom-button:hover {
    background: #6a7281;
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.9);
}

/* ============================================================================== BUTTON ================================================================================== */
.btn {
    display: inline-block;
    width: fit-content;
    padding: 0.6rem 1.2rem;
    background-color: var(--color-primary);
    border-radius: var(--card-border-radius-2);
    cursor: pointer;
    transition: var(--transition);
    color: var(--color-white);
    margin-top: 1rem;
    background-color: #4285f4;
    color: white;
}

.btn.sm {
    padding: 0.3rem 0.7rem;
    font-size: 0.8rem;
}

.btn.danger {
    background: var(--color-red);
}

.btn:hover {
    background: var(--color-white);
    color: var(--color-bg);
}



/* ============================================================================== SINGLE POST ================================================================================== */
.singlepost {
    margin: 6rem 0 5rem;
}

.singlepost__container {
    width: var(--form-width);
    background: #2c2c2c;
    padding: 1rem 2rem 5rem;
    border-radius: 2rem;
}

.singlepost__thumbnail {
    margin: 1.5rem 0 1rem;
}

.singlepost__container p {
    margin-top: 0.6rem;
    line-height: 1.7;
}

/* ============================================================================== CATEGORY POSTS ================================================================================== */
.category__title {
    height: 15rem;
    margin-top: 4rem;
    background: var(--color-gray-900);
    display: grid;
    place-items: center;
}

.post__buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    width: 100%;
    margin-bottom: 1rem;
}

.left-buttons {
    position: absolute;
    left: 0;
    display: flex;
    align-items: center;
}

.right-buttons {
    position: absolute;
    right: 0;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.right-buttons {
    display: flex;
    justify-content: space-between;
}

.like-container, .dislike-container {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.star-count, .dislike-count {
    margin-left: 2px;
}

.star-count {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 1rem;
}

.like-image, .dislike-image {
    width: 20px;
    height: 20px;
    margin-left: 5px;
    margin-right: 5px;
    opacity: 0.5;
    transition: transform 0.1s ease-in-out
}

.like-image:hover, .dislike-image:hover {
    transform: scale(1.2);
    opacity: 1;
}

.post__external-links {
    display: flex;
    align-items: center;
}

.external-link-image {
    display: block;
    width: 100%;
    object-fit: cover;
    padding-right: .6rem;
    transition: transform 0.2s ease-in-out
}

.external-link-image:hover {
    transform: scale(1.1);
}

.post__button {
    background-color: green;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: var(--card-border-radius-2);
    font-weight: 600;
    font-size: 0.8rem;
    text-align: center;
    height: 1.5rem;

}

.post__button:hover {
    background-color: var(--color-primary);
}


/* ============================================================================== EMPTY PAGES ================================================================================== */
.empty__page {
    height: 70vh;
    display: grid;
    place-content: center;
}

/* ============================================================================== GENERAL FORM ================================================================================== */
.form__section {
    margin-bottom: 3rem;
    display: grid;
    place-items: center;
}

.alert__message {
    padding: 0.8rem 1.4rem;
    margin-bottom: 1rem;
    border-radius: var(--card-border-radius-2);
    position: fixed; 
    top: 8rem; 
    left: 50%; 
    transform: translateX(-50%); 
    z-index: 1000; 
    width: auto;
    max-width: 80%;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.alert__message.error {
    background: var(--color-red);
    color: #fff;
}

.alert__message.success {
    background: var(--color-green-light);
    color: var(--color-green);
}

.alert__message.lg {
    text-align: center;
}

form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form__control {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.form__control.inline {
    flex-direction: row;
    align-items: center;
}

input, textarea, select {
    padding: 0.8rem 1.4rem;
    background-color: var(--color-gray-900);
    border-radius: var(--card-border-radius-2);
    resize: none;
    color: var(--color-white);
}

.form__section small {
    margin-top: 1rem;
    display: block;
}

.form__section small a {
    color: var(--color-primary);
}

/* ============================================================================== DASHBOARD ================================================================================== */
.sidebar__toggle {
    display: none;
}

.dashboard__container {
    position: static;
    grid-template-columns: 14rem auto;
    gap: 1rem;
    background: var(--color-gray-900);
    padding-top: 2rem; 
    padding-left: 20px;
    padding-right: 20px;
    padding-bottom: 2rem;
    margin-bottom: 4rem;
    margin-top: 2rem;
    overflow: auto; 
    background: #f2f2f2;
    border-radius: 8px;
}


.dashboard aside a {
    background-color: var(--color-primary);
    gap: 1rem;
    align-items: center;
    padding: 1.6rem;
}

.dashboard aside ul li:not(:last-child) a {
    border-bottom: 1px solid var(--color-gray-900);
}

.dashboard aside a:hover {
    background: var(--color-gray-700);
}

.dashboard aside a.active {
    background-color: var(--color-gray-900);
}

.dashboard main {
    margin-left: 1.5rem;
}

.dashboard main h2 {
    margin: 0 0 2rem 0;
    line-height: 1;
}

.dashboard main table {
    width: 100%;
    text-align: left;
}

.dashboard main table th {
    background: var(--color-gray-700);
    padding: 0.8rem;
    color: var(--color-white);
}

.dashboard main table td {
    padding: 0.8rem;
    border-bottom: 1px solid var(--color-gray-200);
}

.dashboard main table tr:hover td {
    background-color: var(--color-bg);
    color: var(--color-white);
    cursor: default;
    transition: var(--transition);
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(33, 33, 33, 0.8);
}

.modal__content {
    background-color: var(--color-bg);
    margin: 15% auto;
    padding: 20px;
    border: 1px solid var(--color-primary);
    width: 30%;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}

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

.modal__close {
    color: var(--color-gray-200);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.modal__close:hover,
.modal__close:focus {
    color: red;
    text-decoration: none;
    cursor: pointer;
}

.modal__body {
    color: var(--color-gray-200);
}

.admin-buttons-container {
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    gap: 5px;
}

.admin-buttons-container img {
    width: 20px;
    height: 20px;
}

.copy-button {
    background: none;
    border: none;
    cursor: pointer;
    color: #4285f4; 
    font-size: 16px;
}

.copy-button:hover {
    color: #357ae8;
}


/* Additional CSS styles for the button */
button {
    cursor: pointer;
    border: none;
    background-color: transparent;
    outline: none;
    padding: 0;
}

button h5 {
    display: inline;
    margin-left: 10px;
    color: var(--color-white);
}
.modal-buttons .btn.danger {
    margin-right: 1rem;
    align-items: center;
    justify-content: center;
}
.confirm-delete-btn {
    margin-right: 1rem;
  }

  .admin-section {
      font-size: 14px;
      overflow-x: auto;
  }
  .admin-table {
      border-collapse: collapse;
      width: 100%;
  }
  .admin-table td, .admin-table th {
      border: 1px solid #ddd;
      padding: 8px;
  }
  .email-link {
      color: blue;
  }
  .admin-table tbody {
      display: block;
      height: 200px;
      overflow-y: auto;
  }
  .admin-table thead, .admin-table tbody tr {
      display: table;
      width: 100%;
      background-color: #fff;
  }
  .page-title {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 20px;
  }
  .user-details, .subscription-details {
      margin-bottom: 20px;
      padding: 15px;
      background: #fff;
      border-radius: 5px;
  }
  .pricing-section h3 {
        margin-bottom: 20px;
        text-align: center;
    }

    .pricing-section {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .pricing-cards {
        display: flex;
        justify-content: space-around;
        flex-wrap: wrap;
        width: 100%;
        max-width: 1200px;
    }

    .pricing-card {
        background: linear-gradient(160deg, #ffffff 1%, #ebebeb 55%);
        border: 1px solid #ccc;
        padding: 20px;
        width: 30%;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        border-radius: 5px;
        text-align: center;
        margin-bottom: 20px;
    }

    .price {
        font-size: 24px;
        color: #333;
        margin-bottom: 20px;
    }

    .pricing-btn {
        background-color: #4285f4;
        color: white;
        padding: 10px 20px;
        text-decoration: none;
        border-radius: 5px;
        border: none;
        cursor: pointer;
        display: block;
        margin: 0 auto;
        transition: background-color 0.2s;
    }

    .pricing-btn:hover {
        background-color: #052d6c;
    }
    
  .subscribe-button {
      background-color: green;
      color: white;
      padding: 10px 20px;
      text-decoration: none;
      border-radius: 5px;
  }
  .subscribe-button.disabled {
      background-color: gray;
      cursor: not-allowed;
  }
  .modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}
.modal-content {
    position: relative;
    margin: 10% auto;
    padding: 20px;
    width: 80%;
    box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2);
    background-color: #ddd;
    overflow: auto;
    border-radius: 15px;
}

.checkout-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
}

.checkout-modal-content {
    position: relative; 
    margin: 5% auto;
    padding: 20px;
    width: 40%; 
    max-width: 600px;
    box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2);
    background-color: #fff; 
    overflow: auto;
    border-radius: 10px; 
    border: 1px solid #ccc; 
}
.checkout-close {
    color: #aaa;
    position: absolute;
    top: 10px; 
    right: 10px; 
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    background-color: rgb(237, 237, 237); 
    border-radius: 50%;
    width: 32px; 
    height: 32px;
    align-items: center;
    justify-content: center;
    line-height: 1; 
    padding: 0; 
    text-align: center; 
    overflow: hidden; 
}

.checkout-close:hover,
.checkout-close:focus {
    color: black;
    text-decoration: none;
}

.checkout-plan-details {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f6f7f9;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    text-align: center;
}

.checkout-plan-name {
    margin: 0;
    font-size: 1.5em;
    font-weight: bold;
    color: #333;
}

.checkout-plan-duration,
.checkout-plan-price {
    margin: 0;
    color: #666;
}

.checkout-btn {
    background-color: #22a6b3; 
    border: none;
    color: white;
    padding: 15px 32px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    margin: 4px 2px;
    cursor: pointer;
    border-radius: 4px;
    width: 100%; 
}

.checkout-btn:hover {
    background-color: #3dc1d3;
}

.checkout-form-group {
    margin-bottom: 1em;
}

.checkout-form-control {
    width: 100%;
    padding: 10px;
    margin: 5px 0 22px 0;
    display: inline-block;
    border: none;
    border-bottom: 2px solid #e1e4e8;
    transition: 0.3s;
}

.checkout-form-control:focus {
    border-bottom: 2px solid #22a6b3;
}

.checkout-error-message {
    color: #e74c3c;
    text-align: center;
    margin-bottom: 20px;
}

  @media only screen and (max-width: 600px) {
      .pricing-cards {
          flex-direction: column;
          align-items: center;
      }

      .pricing-card {
          margin-bottom: 20px;
          width: 100%;
      }
      .dashboard__container {
          padding: 20px;
          background: #f2f2f2;
          border-radius: 8px;
          margin-bottom: 4rem;
      }
  }





/* ============================================================================== MEDIA QUERIES (MEDIUM DEVICES) ================================================================================== */
@media screen and (max-width: 1024px) {

    .container {
        width: var(--container-width-md);
    }

    h2 {
        font-size: 1.6rem;
    }

    h3 {
        font-size: 1.2rem;
    }

    h5 {
        font-size: 0.8rem;
    }

    .modal__content {
        width: 90%;
    }

    .modal-buttons {
        flex-direction: column;
        align-items: center;
        justify-content: center;
      }
     

    .modal-buttons .btn.danger {
        margin-right: 0;
        margin-bottom: 1rem;
        align-items: center;
        justify-content: center;
    }

    .confirm-delete-btn {
        margin-right: 0;
      }

    nav button {
        display: inline-block;
        font-size: 1.5rem;
        background: transparent;
        color: var(--color-white);
        cursor: pointer;
    }

    nav button#close__nav-btn {
        display: none;
    }

    .nav__container {
        position: relative;
    }

    .nav__items {
        position: absolute;
        flex-direction: column;
        top: 100%;
        right: 0;
        width: 12rem;
        align-items: flex-start;
        justify-content: center;
        gap: 0;
        display: none;
        perspective: 300px;
    }

    .nav__items li {
        width: 100%;
        height: 3rem;
        display: flex;
        align-items: center;
        box-shadow: -2rem 3rem 7rem rgba(0, 0, 0, 0.7);
        border-top: 1px solid var(--color-bg);
        animation: animateDropdown 200ms 0s ease forwards;
        transform-origin: top;
    }

    .nav__items li:nth-child(2) {
        animation-delay: 100ms;
    }
    .nav__items li:nth-child(3) {
        animation-delay: 200ms;
    }
    .nav__items li:nth-child(4) {
        animation-delay: 300ms;
    }
    .nav__items li:nth-child(5) {
        animation-delay: 400ms;
    }

    @keyframes animateDropdown {
        0% {
            transform: rotateX(90deg);
        }
        100% {
            transform: rotateX(0deg);
            opacity: 1;
        }
    }

    .nav__items li a {
        border-radius: 0;
        width: 100%;
        height: 100%;
        background: var(--color-bg);
        padding: 0 2rem;
        display: flex;
        align-items: center;
    }

    .nav__profile {
        background: var(--color-bg);
    }

    .nav__profile ul {
        top: 100%;
        width: 100%;
    }

    .nav__profile .avatar {
        margin-left: 2rem;
        border: 0;
    }

    .featured__container {
        gap: 3rem;
    }

    .posts__container {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }

    .footer__container {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }

    .search__bar-container {
        width: 60%;
    }

    .form__section-container {
        padding: 3rem;
    }

    .dashboard__container {
        grid-template-columns: 4.3rem auto;
        padding: 0;
        background: transparent;
    }

    .dashboard aside h5 {
        display: none;
    }

    .dashboard main table thead {
        display: none;
    }

    .dashboard main table tr {
        display: flex;
        flex-direction: column;
    }

    .dashboard main table tr:nth-child(even) {
        background: var(--color-gray-900);
    }

    .dashboard main table tr:hover td {
        background: transparent;
    }
}


/* ============================================================================== MEDIA QUERIES (SMALL DEVICES) ================================================================================== */

@media screen and (max-width: 600px) {
    section {
        margin-top: 2rem;
    }

    h1 {
        font-size: 2rem;
    }

    .featured {
        margin-top: 6rem;
    }

    .featured__container {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .posts__container {
        grid-template-columns: 1fr;
    }

    .category__buttons-container {
        grid-template-columns: 1fr 1fr;
    }

    .footer__container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .search__bar-container {
        width: var(--container-width-md);
    }

    .singlepost__container {
        background-color: transparent;
        padding: 0;
    }

    .form__section-container {
        padding: 0;
    }

    .dashboard {
        margin-top: 5rem;
    }

    .dashboard main {
        margin: 0;
    }

    .dashboard main h2 {
        margin-top: 1rem;
    }

    .dashboard aside a {
        padding: .8rem 1rem;
    }

    .dashboard aside {
        position: fixed;
        box-shadow: 2rem 0 4rem rgba(0, 0, 0, 0.4);
        left: -100%;
        height: 100vh;
        transition: var(--transition);
        background: var(--color-primary);
        z-index: 2;
    }

    .dashboard .sidebar__toggle {
        display: inline-block;
        background: var(--color-green);
        color: var(--color-white);
        position: fixed;
        right: 0;
        bottom: 4rem;
        z-index: 1;
        width: 2.5rem;
        height: 2.5rem;
        border-radius: 50% 0 0 50%;
        font-size: 1.3rem;
        cursor: pointer;
        box-shadow: -1rem 0 2rem rgba(0, 0, 0, 0.4);
    }

    .dashboard aside a h5 {
        display: inline-block;
    }

    #hide__sidebar-btn {
        display: none;
    }

    .checkout-modal-content {
        width: 95%;
    }

    .modal-content {
        margin: 25% auto;
    }

}