@import url('https://fonts.googgleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600&display=swap');

html {
    overflow-x: hidden;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    list-style: none;
    border: none;
    outline: none;
    scroll-behavior: smooth;
    font-family: "Poppins", sans-serif;
}

body {
    width: 100vw;
    height: 100vh;
}

section {
    min-width: 100vw;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 5rem 20% 5rem;
}

.main-header {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease-in-out;
    backdrop-filter: blur(3px);
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}


.logo {
    font-size: 2rem;
    font-weight: 600;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

nav a {
    text-decoration: none;
    color: #fff;
    font-weight: 500;
    font-weight: bold;
    padding: 10px 15px;
    border-radius: 5px;
    text-shadow: 2px 6px 15px rgba(0, 0, 0, 1);
    transition: background-color 0.3s ease, transform 0.2s ease;
}

nav a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.search-icon {
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.search-icon:hover {
    transform: scale(1.2);
}

.main-header::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 10px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.3), transparent);
    z-index: -1;
}

.home-section {
    background: url('../images/background.png') no-repeat center center fixed;
    background-size: cover;
}

.section-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.game-title {
    font-size: 6rem;
    font-weight: bold;
    letter-spacing: 5px;
    text-transform: uppercase;
    color: #fff;
    text-shadow: 5px 5px 15px rgba(0, 0, 0, 0.6), 0 0 25px rgba(255, 255, 255, 0.5);
    margin-bottom: 3rem;
    padding: 1rem 2rem;
    position: relative;
    display: inline-block;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 10px;
    animation: fadeInTitle 1s ease-out;
}

@keyframes fadeInTitle {
    0% {
        opacity: 0;
        transform: translateY(-50px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInButton {
    0% {
        opacity: 0;
        transform: translateY(50px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.play-button {
    display: inline-block;
    padding: 1.2rem 3rem;
    font-size: 2rem;
    font-weight: bold;
    background: linear-gradient(135deg, #ff7e5f, #feb47b);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    cursor: pointer;
    margin-top: 1rem;
    opacity: 0;
    transform: translateY(50px);
}

.play-button.visible {
    animation: fadeInButton 0.7s ease-out forwards;
}

.play-button:hover {
    background: linear-gradient(135deg, #feb47b, #ff7e5f);
    transform: scale(1.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.play-button:active {
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .game-title {
        font-size: 4rem;
        letter-spacing: 3px;
    }

    .play-button {
        font-size: 1.5rem;
        padding: 1rem 2rem;
    }
}

/* GAME STYLES */
.game-section {
    background: black;
    min-height: 100vh;
}

.heading {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    gap: 10px;
    color: white;
}

.searchInput {
    padding: 12px 20px;
    margin-bottom: 20px;
    font-size: 18px;
    border-radius: 0.7rem;
    border: 2px solid #ccc;
}

.searchInput:focus {
    outline: none;
    border-color: #ff7e5f;
}

.header-game-section, .header {
    width: 100%;
    /* position: fixed; */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.div {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    /* background: cyan; */
}

.results {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    list-style-type: none;
    padding: 0;
}

.results li {
    padding: 8px 15px;
    background-color: #fff;
    border: 1px solid #ccc;
    margin-bottom: 5px;
    cursor: pointer;
    border-radius: 5px;
    font-size: 1.2rem;
    transition: background-color 0.3s ease;
}

.results li:hover {
    background-color: #f0f0f0;
}

.answers-container {
    padding: 5rem 20% 5rem;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.answers {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    list-style-type: none;
}

.answers li {
    font-size: 1rem;
    padding: 10px 20px;
    border-radius: 1rem;
    border: 1px solid black;
    color: black;
    max-width: 350px;
    text-align: center;
}

.wrong {
    background: rgb(245, 110, 110);
}

.correct {
    background: rgb(134, 231, 134);
}

.game-background {
    height: 100vh;
    background: linear-gradient(120deg, #1a237e, #3949ab, #5c6bc0, #42a5f5, #81d4fa);
    background-size: 300% 300%;
    animation: gradientAnimation 15s ease infinite;
    position: relative;
    overflow: hidden;
}

@keyframes gradientAnimation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.bubble {
    position: absolute;
    background-color: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1;
}

.bubble.small { 
    width: 40px; height: 40px; 
}

.bubble.medium { 
    width: 70px; height: 70px; 
}

.bubble.large { 
    width: 100px; height: 100px; 
}



/* GAME MODES */
.game-mode-container {
    /* display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    text-align: center;
    width: 90%;
    max-width: 1200px; */

    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.continent-card {
    /* position: relative;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden; */

    background: linear-gradient(135deg, #1e293b, #334155);
    border-radius: 20px;
    padding: 20px;
    cursor: pointer;
    box-shadow: 0 6px 12px rgba(0,0,0,0.4);
    transition: all 0.3s ease;
    position: relative;
}

.continent-card.inactive {
    background: linear-gradient(135deg, #1e293b, #334155);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2), 0 0 6px rgba(255, 255, 255, 0.8);
}

.continent-card.inactive:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.6;
    z-index: 1;
    pointer-events: none;
    filter: drop-shadow(0px 4px 6px rgba(255, 99, 99, 0.3));
}

.continent-card.active {
    /* background: linear-gradient(45deg, #2c2c2c, #1a1a1a); */

    background: linear-gradient(135deg, #10b981, #34d399);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2), 0 0 6px rgba(255, 255, 255, 0.8);
    color: #0f172a;
}

.continent-card.active:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.6;
    z-index: 1;
    pointer-events: none;
    filter: drop-shadow(0px 4px 6px rgba(144, 238, 144, 0.3));
}

.continent-card.active:hover {
    /* transform: translateY(-5px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.2); */

    transform: scale(1.08);
    box-shadow: 0 10px 20px rgba(16,185,129,0.6);
}

.continent-card.inactive:hover {
    transform: scale(1.08);
    box-shadow: 0 10px 20px rgba(239, 68, 68, 0.459)
;
}

.icon {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.continent-name {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 10px;
    position: relative;
    z-index: 2;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5), 0 0 6px rgba(255, 255, 255, 0.8);
}

.toggle-container {
    margin-top: 10px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
}

.toggle {
    position: relative;
    width: 50px;
    height: 25px;
    background: #ccc;
    border-radius: 25px;
    cursor: pointer;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2), 0 0 6px rgba(255, 255, 255, 0.8);
}

.toggle:before {
    content: "";
    position: absolute;
    width: 21px;
    height: 21px;
    background: #fff;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2), 0 0 6px rgba(255, 255, 255, 0.8);
}

.toggle-container.active .toggle {
    background: #90ee90;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2), 0 0 6px rgba(255, 255, 255, 0.8);
}

.toggle-container.active .toggle:before {
    transform: translateX(25px);
}

.toggle-container.inactive .toggle {
    /* background: #ff6363; */
    box-shadow: none;
}

.game-mode-section {
    width: 100%;
    height: 100%;
    background: #1E2A47;
    position: relative;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    animation: particleAnim 5s infinite ease-in-out;
    z-index: 1;
}

@keyframes particleAnim {
    0% {
        transform: translate3d(0, 0, 0);
        opacity: 0.5;
    }
    50% {
        transform: translate3d(200px, 300px, 0);
        opacity: 1;
    }
    100% {
        transform: translate3d(-200px, -300px, 0);
        opacity: 0.5;
    }
}

.wave {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.2));
    background-size: 100% 100%;
    transform: rotate(45deg);
    animation: waveAnim 10s infinite ease-in-out;
}

@keyframes waveAnim {
    0% {
        transform: rotate(45deg) translateX(0);
    }
    50% {
        transform: rotate(45deg) translateX(10%);
    }
    100% {
        transform: rotate(45deg) translateX(0);
    }
}

.how-to-play {
    background: linear-gradient(to bottom, #1E2A47, #5c6bc0);
    color: #f9fafb;
    padding: 4rem 1rem;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.how-to-play-container {
    width: 95%;
    margin: 0 auto;
    padding: 0 2rem;
}

.how-to-play h2, .header nav h1, .game-examples h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: white;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.how-to-play h2:after, .header nav h1:after, .game-examples h2:after {
    content: "";
    display: block;
    width: 80px;
    height: 4px;
    background: #00ffc3;
    margin: 10px auto 0;
}

.highlight {
    color: #00ffc3;
    font-weight: bold;
}

.steps-grid {
    display: flex;
    gap: 2.5rem;
    justify-content: center;
}

.steps-column {
    flex: 1;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.step-card {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 2rem;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
}

.step-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.12);
}

.step-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: #00ffc3;
    margin-right: 1.5rem;
    line-height: 1;
    min-width: 50px;
}

.step-content {
    flex: 1;
}

.step-content h3 {
    font-size: 1.4rem;
    margin-top: 0.3rem;
    margin-bottom: 1rem;
    color: white;
}

.step-content p {
    line-height: 1.6;
    margin-bottom: 0.8rem;
}

.step-content ul {
    padding-left: 1.2rem;
    margin: 0.8rem 0;
}

.step-content li {
    margin-bottom: 0.5rem;
}

.hints-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1rem;
}

.hints-row {
    display: flex;
    gap: 1.5rem;
}

.hint-item {
    flex: 1;
    background: rgba(0, 0, 0, 0.2);
    padding: .5rem;
    border-radius: 8px;
}

.hint-item h4 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: #00ffc3;
    font-size: 1.1rem;
}

.hint-item img {
    max-width: 100%;
    border-radius: 6px;
    margin-top: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.note {
    font-style: italic;
    opacity: 0.8;
}

.example {
    background: rgba(0, 255, 195, 0.1);
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    display: inline-block;
    margin-top: 0.5rem;
}

.green {
    color: #00ff7f;
    font-weight: bold;
}

.red {
    color: #ff4d4d;
    font-weight: bold;
}

.cta-button {
    background: #00ffc3;
    color: #1E2A47;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-weight: bold;
    display: inline-block;
    margin-top: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.cta-button:hover {
    background: white;
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 255, 195, 0.4);
}

@media (max-width: 900px) {
    .steps-grid {
        flex-direction: column;
        align-items: center;
    }
    
    .steps-column {
        max-width: 100%;
        width: 100%;
    }
    
    .how-to-play h2 {
        font-size: 2rem;
    }
}

@media (max-width: 600px) {
    .hints-row {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hint-item {
        width: 100%;
    }
    
    .how-to-play-container {
        padding: 0 1rem;
    }
}

.hint-item div {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hint-item div button {
  background: #00ffc342;
  padding: 0.7rem 1.2rem;
  border-radius: .55rem;
  border: 2px solid black;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  cursor: pointer;
  color: white;
}

.images-how-to-play {
    display: none;
}

.images-how-to-play.active {
    z-index: 10000;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.253);
    backdrop-filter: blur(2px);
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    animation: animImagesHowToPlay .8s ease;
}

@keyframes animImagesHowToPlay {
  from {
    transform: translateY(-50%);
  } to {
    transform: translateY(0);
  }
}

.images-how-to-play div {
    max-width: 65%;
    max-height: 55%;
    background: white;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    border-radius: 15px;
    padding: 15px 20px;
}

.images-how-to-play div .x button {
    padding: 15px 20px;
    border: 1px solid black;
    border-radius: 15px;
    cursor: pointer;
    font-weight: 500;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.images-how-to-play div .x button:hover {
  transform: scale(1.1);
}

.images-how-to-play div .image {
    max-width: 60%;
    max-height: 35%;
}

.game-examples {
    background: linear-gradient(to bottom, #5c6bc0, #1E2A47);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.flex-column {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.flex-column div div {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.saveGameMode {
    opacity: 0;
}

.saveGameMode.active {
    opacity: 1;
}