html,
body {
    position: relative;
    background-color: #ffffff;
    color: #111;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.5s, color 0.5s;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image: url('noise.png');
    background-repeat: repeat;
    opacity: 1;
    /* Optional: reduce intensity */
    pointer-events: none;
}

html {
    scroll-behavior: smooth;
}

.page-wrapper {
    display: flex;
    flex-direction: column;
}

main {
    flex-grow: 1;
}


html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
}

.page-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex-grow: 1;
}

/* Grid and overflow fixes */

html,
body {
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* === Enhanced Landing Page Styling === */

/* ====== General Enhancements ====== */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(to bottom, #1e1e2f, #2a2a3d);
    color: #f1f1f1;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ====== Header Styling ====== */
header {
    background-color: #111;
    padding: 1rem 2rem;
    color: #f9f9f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header a {
    color: white !important;
    text-decoration: none !important;
    font-weight: bold;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1130px;
    width: 100%;
    margin: 0 auto;
    padding: 0 2rem;
}

.logo-link {
    display: inline-block;
    width: 20%;
}

.logo {
    max-width: 200px;
    height: auto;
    display: block;
}

.site-title {
    font-weight: bold;
    font-size: 1.2rem;
    color: white;
}

/* ======  Search wrapper ====== */

.search-container {
    flex-grow: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

#searchInput {
    padding: 0.5rem 1rem;
    font-size: 1rem;
    border-radius: 999px;
    border: 1px solid #ccc;
    width: 100%;
    max-width: 700px;
    transition: all 0.3s ease;
}

.search-wrapper {
    position: relative;
    width: 100%;
    max-width: 400px;
}

.search-wrapper input {
    width: 100%;
    padding: 0.5rem 1rem;
    padding-right: 2.5rem;
    font-size: 1rem;
    border-radius: 999px;
    border: 1px solid #ccc;
}

.search-icon {
    position: absolute;
    right: 0.1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    opacity: 0.6;
}

/* ======  Latest section ====== */

.section-header {
    max-width: 1200px;
    margin: 1rem auto -0.5rem auto;
    padding-left: 2rem;
    /* Match the .review-grid padding */
    padding-right: 2rem;
    /* Keep consistent for responsiveness */
    box-sizing: border-box;
}

.section-header h2 {
    font-size: 1.2rem;
    font-weight: bold;
    margin: 0;
    color: #111;
    letter-spacing: 0.5px;
    text-align: left;
    /* Explicitly align text left */
}

.section-header .underline {
    height: 2px;
    background-color: red;
    width: 160px;
    margin-top: 6px;
}


/* ====== Review Card Grid ====== */

.review-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    padding: 2rem;
    justify-items: center;
    max-width: 1200px;
    margin: 0 auto;
    align-items: stretch;
}

.review-card {
    color: white;
    width: 100%;
    height: 100%;
    max-width: 400px;
    overflow: hidden;
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: column;
}

.thumbnail-wrapper {
    width: 100%;
}

.review-thumb {
    width: 100%;
    display: block;
    object-fit: cover;
}

.review-info {
    padding: 1rem;
    background: #000;
    text-align: left;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    /* FIX: align text left */
}

.review-info a,
.review-info a:visited,
.review-info a:active {
    text-decoration: none !important;
    color: inherit !important;
}

.review-info p,
.review-info p:visited,
.review-info p:active {
    text-decoration: none !important;
    color: inherit !important;
}

.review-info h3,
.review-info h3:visited,
.review-info h3:active {
    text-decoration: none !important;
    color: inherit !important;
}

.review-info h3 {
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
    font-weight: bold;
    text-transform: uppercase;
}

.review-info em {
    font-style: italic;
    font-weight: normal;
}

.review-info p {
    font-size: 0.7rem;
    color: #bbb;
    /* border-top: 1px solid #7faeb8; */
    padding-top: 0.5rem;
    margin-top: 0.5rem;
    line-height: 1.4;
}

.review-card.alanwake-theme .review-info p {
  border-top: 3px solid #88928e; 
}

.review-card.expedition-theme .review-info p {
  border-top: 3px solid #cc9847; 
}

.review-card.awr-theme .review-info p {
  border-top: 3px solid #88928e; 
}

.review-card.meta-theme .review-info p {
  border-top: 3px solid #444b47; 
}

.review-card.ff-theme .review-info p {
  border-top: 3px solid #7faeb8; 
}

.review-card.p3-theme .review-info p {
  border-top: 3px solid #dc4c60; 
}

.review-card.ds2-theme .review-info p {
  border-top: 3px solid #ebebeb; 
}

/* === White & Black Theme with Page Transitions === */

/* === Updated Theme: White & Black with Effects === */

body {
    background: #ffffff;
    color: #111;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.5s, color 0.5s;
}

/* Page fade-in */
body {
    opacity: 0;
    animation: fadeIn 0.6s ease-in forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

footer {
    background-color: #111;
    color: white;
    padding: 1.02rem 2.2rem;
    font-size: 0.9rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: nowrap;
    /* Prevents wrapping to the next line */
}

footer a {
    display: inline-flex;
    align-items: center;
}

footer a img {
    height: 32px;
    display: block;
}

footer p {
    margin: 0;
    font-size: 0.9rem;
}

.kofi-link {
    display: inline-flex;
    align-items: center;
}

@media (max-width: 600px) {
    .header-content {
        flex-direction: column;
        align-items: normal;
        gap: 1rem;
        padding: 0.5rem 0.5rem;
    }

    .logo {
        width: 140px;
        /* Increase size */
        margin-bottom: 0.5rem;
    }

    .search-container {
        width: 100%;
        justify-content: center;
    }

    .search-wrapper {
        max-width: 90%;
    }

    .review-grid {
        grid-template-columns: 1fr;
        padding: 1rem;
    }

    .review-card {
        max-width: 210px;
        width: 100%;
    }
}