/* ========================================
   GAMEVERSE - BASE STYLES
   ======================================== */

/* Remove default browser spacing */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Base page styling */
body {
    font-family: Arial, sans-serif;
    background-color: #0f0f1a;
    color: #f5f5f5;
    line-height: 1.6;
}

/* Make images responsive */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Make links easier to style */
a {
    color: inherit;
    text-decoration: none;
}

/* Keep the main content responsive */
main {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 0;
}

/* ========================================
   HEADER AND NAVIGATION
   ======================================== */

header {
    background-color: #17172a;
    padding: 20px 5%;
    border-bottom: 2px solid #6c4cff;
}

/* Website logo / heading */
header h1 {
    color: #ffffff;
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 15px;
}

/* Navigation list */
nav {
    display: flex;
    justify-content: center;
    gap: 25px;
    flex-wrap: wrap;
}

/* Navigation links */
nav a {
    color: #ffffff;
    font-weight: bold;
    padding: 8px 12px;
    border-radius: 5px;
    transition: 0.3s ease;
}

/* Navigation hover effect */
nav a:hover {
    background-color: #6c4cff;
    color: #ffffff;
}

/* ========================================
   GENERAL SECTION STYLES
   ======================================== */

/* Welcome section */
section {
    margin-bottom: 40px;
}

section h2 {
    color: #ffffff;
    font-size: 2rem;
    margin-bottom: 15px;
    border-left: 4px solid #6c4cff;
    padding-left: 12px;
}

/* Paragraphs inside sections */
section p {
    margin-bottom: 15px;
}

/* Main welcome heading */
main > h2 {
    text-align: center;
    border-left: none;
    border-bottom: 2px solid #6c4cff;
    padding: 0 0 10px;
    margin-bottom: 25px;
}

/* Call-to-action links */
main a {
    color: #ffffff;
}

main a:hover {
    color: #b9a8ff;
}

/* ========================================
   PRODUCTS PAGE
   ======================================== */

/* Product category sections */
.products-page > section {
    background-color: #17172a;
    padding: 25px;
    margin-bottom: 35px;
    border: 1px solid #2d2d4a;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Product category images */
.products-page > section > img 
.products-page > section > picture {
    width: 100%;
    max-width: 500px;
    margin: 0 auto 25px;
    border-radius: 8px;
}
.products-page > section > picture img {
    width: 100%;
    border-radius: 8px;
}

/* Product cards */
.products-page > section > article {
    background-color: #20203a;
    padding: 20px;
    margin-top: 15px;
    border: 1px solid #34345a;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Product card headings */
.products-page > section > article h3 {
    color: #b9a8ff;
    margin-bottom: 10px;
    font-size: 1.3rem;
}

/* Product prices */
.products-page > section > article p:last-child {
    color: #ffffff;
    font-weight: bold;
    margin-top: 10px;
}

/* Product card hover effect */
.products-page > section > article:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(108, 76, 255, 0.25);
}

/* Product grid layout */
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    align-items: stretch;
}

/* Responsive product grid */
@media (max-width: 900px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   ABOUT US PAGE
   ======================================== */

/* About Us sections */
.about-page > section {
    background-color: #17172a;
    padding: 25px;
    margin-bottom: 35px;
    border: 1px solid #2d2d4a;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* About Us image */
.about-page > section > picture {
    display: block;
    width: 100%;
    max-width: 500px;
    margin: 0 auto 25px;
}

.about-page > section > picture img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Values headings */
.about-page > section > h3 {
    color: #b9a8ff;
    border-left: 3px solid #6c4cff;
    padding-left: 10px;
    margin-top: 20px;
    margin-bottom: 5px;
}

/* About Us image hover effect */
.about-page > section > picture img {
    transition: transform 0.3s ease;
}

.about-page > section > picture img:hover {
    transform: scale(1.02);
}

.about-page > section > h3 + p {
    margin-left: 13px;
}

/* ========================================
   ENQUIRY PAGE
   ======================================== */

/* Enquiry page heading */
.enquiry-page > h2 {
    text-align: center;
    color: #ffffff;
    font-size: 2rem;
    margin-bottom: 15px;
    border-left: none;
    border-bottom: 2px solid #6c4cff;
    padding-bottom: 10px;
}

/* Enquiry introduction */
.enquiry-page > p {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 30px;
}

/* Enquiry form */
.enquiry-page form {
    max-width: 700px;
    margin: 0 auto 40px;
    padding: 30px;
    background-color: #17172a;
    border: 1px solid #2d2d4a;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Form labels */
.enquiry-page form label {
    display: block;
    color: #ffffff;
    font-weight: bold;
    margin-bottom: 6px;
}

/* Form input fields and dropdown */
.enquiry-page form input,
.enquiry-page form select,
.enquiry-page form textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 18px;
    background-color: #20203a;
    color: #ffffff;
    border: 1px solid #34345a;
    border-radius: 6px;
    font-family: Arial, sans-serif;
    font-size: 1rem;
}

/* Form field focus effect */
.enquiry-page form input:focus,
.enquiry-page form select:focus,
.enquiry-page form textarea:focus {
    outline: none;
    border-color: #6c4cff;
    box-shadow: 0 0 6px rgba(108, 76, 255, 0.5);
}

/* Submit button */
.enquiry-page form button {
    display: block;
    width: 100%;
    padding: 12px;
    background-color: #6c4cff;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s ease;
}

/* Submit button hover effect */
.enquiry-page form button:hover {
    background-color: #5740cc;
    transform: translateY(-2px);
}

/* Responsive enquiry form */
@media (max-width: 600px) {
    .enquiry-page form {
        padding: 20px;
    }

    .enquiry-page form input,
    .enquiry-page form select,
    .enquiry-page form textarea {
        font-size: 0.95rem;
    }
}

/* Enquiry form validation error messages */
.enquiry-page form .error-message {
    color: #ff6b81;
    font-size: 0.9rem;
    font-weight: bold;
    display: block;
    margin-top: -12px;
    margin-bottom: 12px;
}

/* Make invalid fields easier to identify */
.enquiry-page form input[aria-invalid="true"],
.enquiry-page form select[aria-invalid="true"],
.enquiry-page form textarea[aria-invalid="true"] {
    border: 2px solid #ff6b81;
}

/* Validation status message */
.enquiry-page form #formStatus {
    color: #ff6b81;
    font-weight: bold;
    margin-top: 12px;
}

/* ========================================
   CONTACT PAGE
   ======================================== */

/* Contact page heading */
.contact-page > h2 {
    text-align: center;
    color: #ffffff;
    font-size: 2rem;
    margin-bottom: 30px;
    border-left: none;
    border-bottom: 2px solid #6c4cff;
    padding-bottom: 10px;
}

/* Contact information cards */
.contact-page > section {
    background-color: #17172a;
    padding: 25px;
    margin-bottom: 20px;
    border: 1px solid #2d2d4a;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Contact card headings */
.contact-page > section > h3 {
    color: #b9a8ff;
    font-size: 1.3rem;
    margin-bottom: 12px;
}

/* Contact information spacing */
.contact-page > section > p {
    margin-bottom: 6px;
}

/* General contact email */
.contact-page > section > p:last-child {
    color: #ffffff;
}

/* Contact card hover effect */
.contact-page > section:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(108, 76, 255, 0.25);
    transition: 0.3s ease;
}

/* ========================================
   HOME PAGE
   ======================================== */

/* Main welcome section */
.home-page > section:first-child {
    text-align: center;
    padding: 35px 25px;
}

/* Welcome image */
.home-page > section:first-child img {
    width: 100%;
    max-width: 500px;
    margin: 0 auto 25px;
    border-radius: 10px;
}

/* Home page tagline */
.home-page > section:first-child p:first-of-type {
    color: #b9a8ff;
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 20px;
}

/* Home page feature headings */
.home-page > section > h3 {
    color: #b9a8ff;
    border-left: 3px solid #6c4cff;
    padding-left: 10px;
    margin-top: 20px;
    margin-bottom: 5px;
}

/* Home page feature descriptions */
.home-page > section > h3 + p {
    margin-left: 13px;
}

/* Home page product button */
.home-page > section:last-child a {
    display: inline-block;
    background-color: #6c4cff;
    color: #ffffff;
    padding: 12px 20px;
    border-radius: 6px;
    font-weight: bold;
    transition: 0.3s ease;
}

/* Home page product button hover */
.home-page > section:last-child a:hover {
    background-color: #5740cc;
    color: #ffffff;
    transform: translateY(-2px);
}

/* ========================================
   PAGE-SPECIFIC SECTION STYLING
   ======================================== */

/* Home page sections */
main > section {
    background-color: #17172a;
    padding: 25px;
    border: 1px solid #2d2d4a;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* ========================================
   FOOTER
   ======================================== */

footer {
    background-color: #17172a;
    color: #b9a8ff;
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    border-top: 2px solid #6c4cff;
}

footer p {
    margin: 0;
    font-size: 0.9rem;
}

/* Active navigation link */
nav a.active {
    background-color: #6c4cff;
    color: #ffffff;
}

/* Active navigation link hover */
nav a.active:hover {
    background-color: #5740cc;
}

/* Keyboard focus effect */
nav a:focus-visible {
    outline: 2px solid #b9a8ff;
    outline-offset: 3px;
    border-radius: 5px;
}

/* Responsive heading sizes */
@media (max-width: 600px) {
    header h1 {
        font-size: 1.8rem;
    }

    section h2,
    main > h2 {
        font-size: 1.6rem;
    }
}

/* Smaller product cards on mobile */
@media (max-width: 600px) {
    .products-page > section > article {
        padding: 15px;
    }
}

/* Responsive footer */
@media (max-width: 600px) {
    footer {
        padding: 15px;
    }

    footer p {
        font-size: 0.85rem;
    }
}

/* Improve mobile navigation */
@media (max-width:600px) {
    nav {
        gap:10px;
    }

    nav a {
        padding:7px 10px;
        font-size:0.95rem;
    }
}

/* Improve mobile paragraph text */
@media (max-width:600px) {
    body {
        font-size:0.95rem;
    }

    section p {
        line-height:1.5;
    }
}

/* Improve small-screen main spacing */
@media (max-width:600px) {
    main {
        width:94%;
        padding:1.5rem 0;
    }
}

/* Product Image Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: #0f0f1a;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 60px 24px 24px;
    box-sizing: border-box;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.lightbox.lightbox-open {
    opacity: 1;
}

.lightbox-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 80%;
    max-height: 100%;
}

.lightbox-image {
    display: block;
    max-width: 100%;
    max-height: 72vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.lightbox-caption {
    color: #f5f5f5;
    text-align: center;
    margin: 14px 0 4px;
    font-size: 1rem;
}

.lightbox-counter {
    color: #c9c5e8;
    text-align: center;
    margin: 4px 0;
    font-size: 0.9rem;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f5f5f5;
    background: #17172a;
    border: 1px solid #6c4cff;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: #6c4cff;
    transform: scale(1.08);
}

.lightbox-close:focus-visible,
.lightbox-prev:focus-visible,
.lightbox-next:focus-visible {
    outline: 3px solid #f5f5f5;
    outline-offset: 3px;
}

.lightbox-close {
    position: absolute;
    top: 18px;
    right: 24px;
    width: 46px;
    height: 46px;
    font-size: 2rem;
    line-height: 1;
}

.lightbox-prev,
.lightbox-next {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    font-size: 1.4rem;
}

.lightbox button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

@media (max-width: 600px) {
    .lightbox {
        position: fixed;
        inset: 0;
        width: 100%;
        height: 100%;
        height: 100dvh;
        display: none;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 8px;
        padding: 60px 8px 20px;
        box-sizing: border-box;
        background: #0f0f1a !important;
        z-index: 99999;
        isolation: isolate;
    }

    .lightbox.lightbox-open {
        opacity: 1;
    }

    .lightbox-content {
        flex: 1;
        min-width: 0;
        max-width: calc(100% - 72px);
        max-height: 100%;
    }

    .lightbox-image {
        max-width: 100%;
        max-height: 60dvh;
        width: auto;
        height: auto;
        object-fit: contain;
    }

    .lightbox-prev,
    .lightbox-next {
        flex-shrink: 0;
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }

    .lightbox-close {
    position: fixed;
    top: 75px;
    right: 16px;
    left: auto;
    z-index: 10;

    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 2rem;
    line-height: 1;
    padding: 0;
    border-radius: 50%;
    background: #17172a;
    color: #f5f5f5;
    border: 2px solid #6c4cff;
}

    .lightbox-caption {
        font-size: 0.9rem;
    }

    .lightbox-counter {
        font-size: 0.85rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .lightbox,
    .lightbox-close,
    .lightbox-prev,
    .lightbox-next {
        transition: none;
    }
}

/* FAQ Accordion */
.faq-section {
    max-width: 900px;
    margin: 40px auto;
    padding: 20px;
}

.faq-section h2 {
    text-align: center;
    margin-bottom: 24px;
}

.faq-item {
    margin-bottom: 12px;
    border: 1px solid #6c4cff;
    border-radius: 8px;
    overflow: hidden;
    background: #17172a;
}

.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    padding: 18px;
    border: none;
    background: #17172a;
    color: #f5f5f5;
    font: inherit;
    font-weight: bold;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s ease;
}

.faq-question:hover,
.faq-question[aria-expanded="true"] {
    background: #292044;
}

.faq-question:focus-visible {
    outline: 3px solid #6c4cff;
    outline-offset: -3px;
}

.faq-icon {
    flex-shrink: 0;
    color: #a99aff;
    font-size: 1.4rem;
}

.faq-answer {
    padding: 0 18px 16px;
    color: #f5f5f5;
    line-height: 1.6;
}

.faq-answer p {
    margin: 0;
}

@media (max-width: 600px) {
    .faq-section {
        margin: 24px auto;
        padding: 14px;
    }

    .faq-question {
        padding: 15px;
        font-size: 0.95rem;
    }

    .faq-answer {
        padding: 0 15px 15px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .faq-question {
        transition: none;
    }
}

/* Fix FAQ styling on mobile devices */
@media (max-width: 600px) {
    .faq-section .faq-item {
        background-color: #17172a !important;
        border: 1px solid #6c4cff;
    }

    .faq-section .faq-question,
    .faq-section .faq-question:hover,
    .faq-section .faq-question:focus,
    .faq-section .faq-question[aria-expanded="true"] {
        background-color: #17172a !important;
        color: #f5f5f5 !important;
        -webkit-appearance: none;
        appearance: none;
    }

    .faq-section .faq-icon {
        color: #a99aff !important;
    }

    .faq-section .faq-answer {
        background-color: #17172a !important;
        color: #f5f5f5 !important;
    }
}

/* Part 3: Product Card Entrance Animation */
@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(35px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card {
    animation: cardFadeIn 1.2s ease-out both;
}

@media (prefers-reduced-motion: reduce) {
    .product-card {
        animation: none;
    }
}

/* Part 3: Interactive Product Card Hover Effect */
.product-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 20px rgba(108, 76, 255, 0.3);
}

@media (hover: none) {
    .product-card:hover {
        transform: none;
        box-shadow: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .product-card {
        transition: none;
    }
}

/* Part 3: Product Image Hover Zoom */
.product-category picture {
    display: block;
    overflow: hidden;
    border-radius: 8px;
}

.product-category picture img {
    transition: transform 0.35s ease;
}

@media (hover: hover) and (pointer: fine) {
    .product-category picture img:hover {
        transform: scale(1.06);
    }
}

@media (prefers-reduced-motion: reduce) {
    .product-category picture img {
        transition: none;
    }
}

/* Part 3: Back to Top Button */
#backToTop {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 50px;
    height: 50px;
    display: none;
    align-items: center;
    justify-content: center;
    background: #6c4cff;
    color: #f5f5f5;
    border: 2px solid #a99aff;
    border-radius: 50%;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: background 0.3s ease, transform 0.3s ease;
}

#backToTop:hover {
    background: #292044;
    transform: translateY(-4px);
}

#backToTop:focus-visible {
    outline: 3px solid #a99aff;
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    #backToTop {
        transition: none;
    }
}

/* Part 3: Contact Form Styling */
.contact-form-section {
    max-width: 700px;
    margin: 40px auto;
    padding: 25px;
    background: #17172a;
    border: 1px solid #6c4cff;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.contact-form-section h3 {
    margin-top: 0;
    color: #f5f5f5;
}

.contact-form-section > p {
    color: #d0d0df;
    line-height: 1.6;
}

.contact-form-section .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.contact-form-section label {
    color: #f5f5f5;
    font-weight: bold;
}

.contact-form-section input,
.contact-form-section select,
.contact-form-section textarea {
    width: 100%;
    padding: 12px;
    box-sizing: border-box;
    border: 1px solid #555570;
    border-radius: 6px;
    background: #0f0f1a;
    color: #f5f5f5;
    font: inherit;
}

.contact-form-section input:focus,
.contact-form-section select:focus,
.contact-form-section textarea:focus {
    outline: 2px solid #a99aff;
    outline-offset: 2px;
    border-color: #6c4cff;
}

.contact-form-section textarea {
    resize: vertical;
    min-height: 140px;
}

.contact-form-section button[type="submit"] {
    padding: 12px 22px;
    background: #6c4cff;
    color: #f5f5f5;
    border: none;
    border-radius: 6px;
    font: inherit;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.contact-form-section button[type="submit"]:hover {
    background: #5135d8;
    transform: translateY(-2px);
}

.contact-form-section .error-message {
    color: #ff8c9b;
    font-size: 0.9rem;
}

#contactFormStatus {
    margin-bottom: 0;
    line-height: 1.5;
}

@media (max-width: 600px) {
    .contact-form-section {
        margin: 25px 14px;
        padding: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .contact-form-section button[type="submit"] {
        transition: none;
    }
}

/* Contact form validation error messages */
.contact-form-section .error-message {
    color: #ff6b81;
    font-size: 0.9rem;
    font-weight: bold;
    display: block;
    margin-top: -12px;
    margin-bottom: 12px;
}

/* Highlight invalid contact form fields */
.contact-form-section input[aria-invalid="true"],
.contact-form-section select[aria-invalid="true"],
.contact-form-section textarea[aria-invalid="true"] {
    border: 2px solid #ff6b81;
    box-shadow: 0 0 6px rgba(255, 107, 129, 0.3);
}

/* Contact form validation status */
.contact-form-section #contactFormStatus {
    color: #ff6b81;
    font-weight: bold;
    margin-top: 12px;
}

/* Google Forms Enquiry Section */
.google-enquiry-form {
    max-width: 800px;
    margin: 40px auto;
    padding: 20px;
    background: #17172a;
    border: 1px solid #6c4cff;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.google-enquiry-form h3 {
    color: #f5f5f5;
    margin-top: 0;
}

.google-enquiry-form p {
    color: #d0d0df;
    line-height: 1.6;
}

.google-enquiry-form iframe {
    display: block;
    width: 100%;
    max-width: 100%;
    border: none;
    border-radius: 8px;
    background: #ffffff;
}

@media (max-width: 600px) {
    .google-enquiry-form {
        margin: 25px 10px;
        padding: 12px;
    }

    .google-enquiry-form iframe {
        height: 1250px;
    }
}



