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

body {
    font-family: Arial, sans-serif;
    color: #fff;
    background: #1b1b2f;
    overflow-x: hidden;
}

/* Header */
.header {
    position: relative;
    text-align: center;
    background: url('./img/AIGame1.webp') no-repeat center center;
    background-size: cover;
    padding: 11rem 2rem;
    color: #fff;
}

.header-content {
    position: relative;
    z-index: 1;
}

.header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.306); /* Overlay para destacar o texto */
    z-index: 0;
}

.header h1 {
    font-size: 3.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.header p {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.cta-button {
    display: inline-block;
    margin-top: 1.5rem;
    background: #e06e17;
    color: #fff;
    padding: 1rem 2rem;
    font-size: 1.2rem;
    border-radius: 8px;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
    z-index: 1;
}

.cta-button:hover {
    transform: scale(1.1);
    background-color: #e64a19;
}

/* Intro Section */
.intro {
    text-align: center;
    padding: 4rem 2rem;
    background: #25274d;
}

.intro h2 {
    font-size: 2.5rem;
    margin: 1rem 0;
    color: #ff9a3d;
}

.intro p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: #d1d1e9;
}

/* Features Section */
.features {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    padding: 4rem 2rem;
    background: linear-gradient(145deg, #4e54c8, #25274d);
}

.feature {
    width: 300px;
    margin: 1rem;
    background: #2c2f5e;
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    transition: transform 0.3s;
    color: #fff;
}

.feature:hover {
    transform: translateY(-10px);
}

.feature img {
    width: 100%;
    border-radius: 10px;
    margin-bottom: 1rem;
    transition: transform 0.3s;
}

.feature img:hover {
    transform: scale(1.05);
}

.feature h3 {
    font-size: 1.5rem;
    margin: 1rem 0;
}

.feature p {
    font-size: 1rem;
    color: #c1c1d9;
}

/* Footer */
.footer {
    text-align: center;
    padding: 1rem;
    background-color: #3a3a3a;
    font-size: 1rem;
    color: #d1d1d1;
}

/* Toast */
#snackbar {
    visibility: hidden;
    min-width: 250px;
    margin-left: -125px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 2px;
    padding: 16px;
    position: fixed;
    z-index: 1;
    left: 50%;
    bottom: 30px;
    font-size: 17px;
}

#snackbar.show {
    visibility: visible;
    -webkit-animation: fadein 0.5s, fadeout 0.5s 2.5s;
    animation: fadein 0.5s, fadeout 0.5s 2.5s;
}

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

.modal-content {
    position: relative;
    margin: 5% auto;
    padding: 20px;
    width: 50%; /* Narrower modal width */
    max-width: 800px;
    max-height: 80vh; /* Maximum height for scroll */
    background: #fff;
    border-radius: 10px;
    color: #333;
    overflow-y: auto; /* Enable vertical scrolling */
}

.modal-content h2 {
    text-align: center;
    color: #4e54c8;
}

.close {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 30px;
    color: #333;
    cursor: pointer;
}

.image-grid {
    display: grid;
    gap: 20px; /* Space between images */
    grid-template-columns: repeat(3, 1fr); /* 3 images per row */
    margin-top: 20px;
}

.image-grid img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    transition: transform 0.3s;
}

.image-grid img:hover {
    transform: scale(1.09);
}

/* 3D Coin */
.coin-container {
    perspective: 1000px; /* Creates 3D depth */
}

.coin {
    width: 200px; /* Adjust size as needed */
    height: 200px;
    position: relative;
    transform-style: preserve-3d;
    animation: flip 4s linear infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 45%;
}

/* Front and Back of the Coin */
.coin-side {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-size: cover;
    backface-visibility: hidden;
}

/* Front Side */
.front {
    background: url("./img/coinFront.png") no-repeat center / cover;
}

/* Back Side */
.back {
    background: url("./img/coinBack.png") no-repeat center / cover;
    transform: rotateY(180deg);
}

/* Edge of the Coin */
.coin-edge-container {
    position: absolute;
    width: 100%;
    height: 10px; /* Adjust thickness as needed */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotateX(90deg);
    transform-style: preserve-3d;
}

.coin-edge-container::before,
.coin-edge-container::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 10px;
    background: linear-gradient(90deg, #d4af37, #b8860b, #d4af37); /* Gold gradient for the coin edge */
}

/* Spin Animation */
@keyframes flip {
    0% {
        transform: rotateY(360deg);
    }
    50% {
        transform: rotateY(180deg);
    }
    100% {
        transform: rotateY(0deg);
    }
}

.spin {
    animation: flip 4s linear infinite;
}