/* --- General & Variables --- */
:root {
    --primary-color: #c39ea0;
    --secondary-color: #f8e5e5;
    --accent-color: rgba(0, 175, 240, .1);;
    --text-color: #7e7e7e;
    --light-text: #f0f0f0;
    --border-color: #c39ea028;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial;
    background-color: var(--secondary-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* --- Utility Class --- */
.hidden {
    display: none !important;
}


/* --- Page 1: Gate Page --- */
.gate-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    text-align: center;
    padding: 2rem;
}

.gate-container h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #a3797b;
}

.gate-container p {
    max-width: 600px;
    margin-bottom: 2rem;
    color: rgb(106, 101, 101);
}

.gate-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.btn-dark {
    background-color: #946b6d;
    color: white;
    border-color: #a3797b;
}
.btn-dark:hover {
    background-color: #5c494a;
}

.btn-light {
    background-color: var(--secondary-color);
    color: #845f61;
    border-color: #845f61;
    transition: background-color 0.15s;
}
.btn-light:hover {
    background-color: #fff3f3;
}


/* --- Page 2: Hub Page --- */
header {
    text-align: center;
    padding: 2rem 1rem;
    border-bottom: 1px solid var(--border-color);
}

header .brand h1 {
    font-size: 6rem;
    letter-spacing: 2px;
    color: #9e7c7e;
}

header .brand h2 {
    font-size: 2rem;
    color: #777;
    letter-spacing: 5px;
    margin-top: -10px;
}

header .promo-text {
    margin-top: 1rem;
    font-size: 1.2rem;
    font-weight: 500;
    color: #646363f5;
}

header .description {
    max-width: 700px;
    margin: 0.5rem auto 0;
    color: #646363;
}

nav {
    padding: 1rem;
    background: #fff4f4;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.search-bar {
    display: flex;
    max-width: 500px;
    margin: 0 auto 1rem;
}

.search-bar input {
    flex-grow: 1;
    border: 1px solid var(--border-color);
    padding: 0.4rem;
    border-radius: 5px 0 0 5px;
    font-size: 0.8rem;
}

.search-bar ::placeholder {
    color: rgba(128, 128, 128, 0.562);
}

.search-bar button {
    border: none;
    background-color: var(--primary-color);
    color: white;
    padding: 0 1rem;
    cursor: pointer;
    border-radius: 0 5px 5px 0;
    transition: background-color 0.15s;
}

.search-bar button:hover {
    background-color: rgb(255, 218, 218);
    color: var(--primary-color);
}

.category-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}


.filter-btn {
    background: #ffffff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.15s;
    color: black;
    font-size: 0.8rem;
}

.filter-btn:hover, .filter-btn.active {
    background-color: #8c6b6c;
    color: white;
}

main {
    padding: 1rem;
}

/* Content Sections (Default View) */
.category-section {
    margin-bottom: 2.5rem;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0 0.5rem;
}

.category-header h2 {
    font-size: 1.5rem;
}

/* CAROUSEL & SWIPING STYLES - START */
.thumbnail-carousel {
    position: relative;
}
/* Show arrows on carousel hover */
.thumbnail-carousel:hover .scroll-arrow {
    opacity: 1;
    visibility: visible;
}

.scroll-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all 0.2s ease-in-out;
    opacity: 0;
    visibility: hidden;
}
.scroll-arrow:hover {
    background-color: white;
    transform: translateY(-50%) scale(1.1);
}

.scroll-arrow.left-arrow {
    left: -20px;
}

.scroll-arrow.right-arrow {
    right: -20px;
}

.thumbnail-row {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding-bottom: 1rem; /* for scrollbar space */
    scrollbar-width: none; /* Firefox */
    cursor: grab;
    user-select: none; /* Prevent text selection while dragging */
}
.thumbnail-row.grabbing {
    cursor: grabbing;
    scroll-behavior: auto; /* Use instant scroll during drag */
}

.thumbnail-row::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}
/* CAROUSEL & SWIPING STYLES - END */


/* Grid View (Filtered View) */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.show-all-btn {
    display: block;
    margin: 0 auto 2rem;
    padding: 0.7rem 2rem;
    font-size: 1rem;
}



/* Thumbnail Card Styling */
.thumbnail-card {
    flex: 0 0 250px; /* For carousel */
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}

/* Prevent dragging image from messing up the swipe */
.thumbnail-card img {
    pointer-events: none;
}

.thumbnail-image-container {
    position: relative;
}

.thumbnail-card img {
    width: 100%;
    height: 270px; /* <--- THIS IS THE LINE TO CHANGE */
    object-fit: cover;
    display: block;
}

.thumbnail-duration {
    position: absolute;
    top: 8px;
    right: 8px;
    background-color: rgba(0,0,0,0.5);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
}

.thumbnail-info {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.thumbnail-info h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #646363f5;
}

.thumbnail-info .description {
    font-size: 0.9rem;
    color: #666;
    flex-grow: 1;
    margin-bottom: 1rem;
}

.message-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f8e5e575;
    padding: 0.5rem;
    padding-left: 0.7rem;
    border-radius: 5px;
    margin-bottom: 1rem;
    color: #646363f5;
}

.message-section span {
    font-size: 0.78rem;
    font-weight: 600;
}

.copy-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: #555;
}

.copy-btn:hover { color: var(--primary-color); }


.action-button {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px; /* Adds space between text and logo */
    width: 100%;
    background-color: var(--accent-color);
    color: #0075ab;;
    text-align: center;
    padding: 0.7rem;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    cursor: pointer;
    transition: box-shadow opacity 0.15;
}
.action-button:hover {
    opacity: 0.9;
    box-shadow: 0 2px 5px rgba(0,0,0,0.12);
}

/* This is a new rule you need to add */
.action-button img {
    height: 25px; /* Adjust height as needed */
    width: auto;
}

/* =================================================================
// These styles were for the previous expand/collapse logic, keeping them.
// ================================================================= */
.category-section .content-grid {
    display: none;
}
.btn-show-all-section {
    display: block;
    margin: 1rem auto 0;
    cursor: pointer;
    padding: 0.8rem 1.8rem;
    border: 1px solid #ccc;
    background-color: #f8e5e5;
    border-radius: 5px;
    font-weight: 600;
    transition: background-color color 0.15s;
    transition: color 0.15s;
    border: 1px solid;
    border-radius: 5px;
    text-decoration: none;
    font-size: 16px;
    color: #7d5c5f;
}
.btn-show-all-section:hover {
    background-color: #8c6b6c;
    color: white;
    border-color: #8c6b6c;
}
.category-section.is-expanded .content-grid {
    display: grid;
}
.category-section.is-expanded .thumbnail-carousel {
    display: none;
}
.category-section.is-expanded .btn-show-all-section {
    background-color: #fdf5f5;
    border-color: #8c6b6c;
    color: #7d5c5f;
}

/* ========================================= */
/* --- Footer Styles --- */
/* ========================================= */

footer {
    width: 100%;                  /* Make the footer span the full page width */
    text-align: right;           /* THIS IS THE KEY: It centers the text inside */
    padding-right: 2.3rem;
    padding-top: 1.9rem;
    padding-bottom: 2rem;
}

footer a {
    color: #7d5c5f;                  /* Sets a light gray color for the link */
    text-decoration: underline;   /* Underlines the link */
    font-size: 1.2rem;            /* Makes the font slightly smaller than body text */
}

footer a:hover {
    color: #fff;                  /* Makes the link turn white on hover */
}

/* ========================================= */
/* --- Terms of Service Page Styles --- */
/* ========================================= */

.terms-container {
    max-width: 800px;
    width: 100%;
    margin: 4rem auto; /* Adds space from top/bottom and centers it */
    background-color: #867070;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(10, 10, 10, 0.5);
    color: white;
}

.terms-container h1 {
    margin-bottom: 1.5rem;
    text-align: center;
}

.terms-container p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.back-link {
    display: block;
    margin-top: 2rem;
    text-align: center;
    font-weight: bold;
    text-decoration: underline;
}

/* ========================================= */
/* --- Verification Screen Styles --- */
/* ========================================= */

#verification-screen {
    /* Flexbox properties to center the content */
    display: flex;
    flex-direction: column; /* Stack items vertically */
    align-items: center;    /* Center items horizontally */
    justify-content: center;/* Center the whole block vertically */

    /* Layout and Spacing */
    max-width: 700px;       /* Prevents text from being too wide on large screens */
    margin: 4rem auto;      /* Adds space from top/bottom and centers the block */
    padding: 2rem;          /* Adds breathing room inside the container */
    text-align: left;     /* Ensures the text itself is centered */
    color: #636363;            /* A light color for the text */
}

#verification-screen h1 {
    margin-bottom: 1.5rem;  /* Space below the main title */
}

#verification-screen p {
    margin-bottom: 1rem;    /* Space below each paragraph */
    line-height: 1.6;       /* Makes the text easier to read */
}

#veriff-root {
    margin-top: 2rem;
    width: 100%;
    display: flex;
    justify-content: center;

}

/* --- Mobile Responsive Design --- */
@media (max-width: 768px) {
    header .brand h1 { font-size: 2.5rem; }
    .category-filters { gap: 0.5rem; }

    .thumbnail-card { flex-basis: 45%; } 
    .content-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
    
    .scroll-arrow {
        width: 35px;
        height: 35px;
    }
    .scroll-arrow.left-arrow { left: 5px; }
    .scroll-arrow.right-arrow { right: 5px; }
}

@media (max-width: 480px) {
    body { font-size: 14px; }
    header .brand h1 { font-size: 2rem; }
    header .brand h2 { font-size: 0.8rem; }
    nav { padding: 1rem 0.5rem; }
    main { padding: 0.5rem; }
    .category-header h2 { font-size: 1.2rem; }
    .category-filters { gap: 0.3rem; }

    .gate-buttons { flex-direction: column; }

    .content-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
   /* --- START: NEW CAROUSEL SNAPPING RULES --- */

    /* This is the scroll container */
    .thumbnail-row {
        scroll-snap-type: x mandatory;
        /* Add padding to allow the card to center with a "peek" */
        scroll-padding: 0 10%; 

        /* THE FIX: Force all cards to stay in a single line */
        flex-wrap: nowrap;
    }

    /* This is each individual card */
    .thumbnail-card {
        scroll-snap-align: center;
        /* Make each card take up 80% of the width */
        flex-basis: 65%; 
    }

    .thumbnail-info { padding: 0.5rem; }
    .thumbnail-info h3 { font-size: 1rem; }
}