/* Design System & Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg-gradient: linear-gradient(135deg, #7baee3 0%, #a6a8e8 60%, #b99de2 100%);
    --dark-color: #1a1a1a;
    --white-color: #ffffff;
    
    /* Game Colors */
    --blue-tile: #508ad3;
    --red-tile: #e95b54;
    --green-tile: #7ab153;
    --orange-tile: #ec9f3c;
    --yellow-tile: #f5c443;
    
    /* Font */
    --font-family: 'Fredoka', 'Nunito', 'Segoe UI', sans-serif;
}

body {
    font-family: var(--font-family);
    background: var(--bg-gradient) no-repeat center center fixed;
    background-size: cover;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow-x: hidden;
    color: var(--dark-color);
}

/* Floating background hexagons */
.background-hexagons {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.hexagon {
    position: absolute;
    color: rgba(255, 255, 255, 0.14);
    aspect-ratio: 1 / 1;
    transition: transform 0.3s ease;
}

.hexagon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
    stroke: currentColor;
    stroke-width: 9px;
    stroke-linejoin: round;
}

/* Positioning matching a rich background distribution */
.hex-1 {
    width: 200px;
    top: 2%;
    left: -60px;
    rotate: 15deg;
    animation-delay: 0s;
    animation-duration: 14s;
}

.hex-2 {
    width: 100px;
    top: 10%;
    right: 5%;
    rotate: -25deg;
    animation-delay: 1s;
    animation-duration: 10s;
}

.hex-3 {
    width: 120px;
    top: 20%;
    left: 20%;
    rotate: 10deg;
    animation-delay: 2s;
    animation-duration: 12s;
}

.hex-4 {
    width: 240px;
    top: 26%;
    right: -80px;
    rotate: 35deg;
    animation-delay: 0.5s;
    animation-duration: 16s;
}

.hex-5 {
    width: 80px;
    top: 38%;
    left: 38%;
    rotate: 45deg;
    animation-delay: 3s;
    animation-duration: 9s;
}

.hex-6 {
    width: 160px;
    top: 46%;
    right: 25%;
    rotate: -15deg;
    animation-delay: 1.5s;
    animation-duration: 13s;
}

.hex-7 {
    width: 140px;
    top: 56%;
    left: 28%;
    rotate: 20deg;
    animation-delay: 4s;
    animation-duration: 11s;
}

.hex-8 {
    width: 220px;
    top: 64%;
    right: -50px;
    rotate: -30deg;
    animation-delay: 2.5s;
    animation-duration: 15s;
}

.hex-9 {
    width: 90px;
    top: 72%;
    left: 45%;
    rotate: 5deg;
    animation-delay: 0.8s;
    animation-duration: 10s;
}

.hex-10 {
    width: 130px;
    top: 80%;
    right: 32%;
    rotate: 50deg;
    animation-delay: 3.5s;
    animation-duration: 12s;
}

.hex-11 {
    width: 180px;
    top: 87%;
    left: -40px;
    rotate: -10deg;
    animation-delay: 1.8s;
    animation-duration: 14s;
}

.hex-12 {
    width: 110px;
    top: 93%;
    right: 22%;
    rotate: 18deg;
    animation-delay: 0.2s;
    animation-duration: 11s;
}

.hex-13 {
    width: 70px;
    top: 6%;
    left: 52%;
    rotate: 30deg;
    animation-delay: 5s;
    animation-duration: 8s;
}

/* Layout container */
.main-container {
    width: 100%;
    max-width: 960px;
    padding: 40px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
    flex: 1;
}

/* Header & Logo styling */
.logo-header {
    margin-bottom: 30px;
    text-align: center;
}

.logo-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo-text {
    font-size: 3.2rem;
    font-weight: 700;
    color: var(--white-color);
    letter-spacing: 2px;
    text-shadow:
        -3.5px -3.5px 0 var(--dark-color),
         3.5px -3.5px 0 var(--dark-color),
        -3.5px  3.5px 0 var(--dark-color),
         3.5px  3.5px 0 var(--dark-color),
        -3.5px  0px 0 var(--dark-color),
         3.5px  0px 0 var(--dark-color),
         0px -3.5px 0 var(--dark-color),
         0px  3.5px 0 var(--dark-color),
         0px  7px 0 var(--dark-color);
    line-height: 0.95;
}

.logo-tiles {
    display: flex;
    justify-content: center;
    margin: 8px 0;
}

.logo-tile {
    width: 32px;
    height: 32px;
    border: 3px solid var(--dark-color);
    border-radius: 8px;
    box-shadow: 0px 3px 0px var(--dark-color);
}

.tile-blue {
    background-color: var(--blue-tile);
    transform: rotate(-12deg) translateX(4px);
    z-index: 1;
}

.tile-red {
    background-color: var(--red-tile);
    transform: rotate(15deg) translateX(-4px);
    z-index: 2;
}

/* Device Mockup Section */
.device-section {
    margin-bottom: 35px;
    perspective: 1000px;
}

.smartphone-mockup {
    width: 278px;
    height: 588px;
    border: 11px solid var(--dark-color);
    border-radius: 40px;
    background-color: var(--dark-color);
    box-shadow: 
        0px 10px 0px var(--dark-color),
        0px 20px 25px rgba(0, 0, 0, 0.2);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Physical side buttons (volume and power) */
.phone-btn {
    position: absolute;
    width: 4px;
    height: 38px;
    background-color: var(--dark-color);
    z-index: 1;
}

.phone-btn-vol-up {
    left: -15px; /* outside left border */
    top: 100px;
    border-radius: 4px 0 0 4px;
}

.phone-btn-vol-down {
    left: -15px;
    top: 154px;
    border-radius: 4px 0 0 4px;
}

.phone-btn-power {
    right: -15px; /* outside right border */
    top: 130px;
    height: 48px;
    border-radius: 0 4px 4px 0; /* correctly rounded outwards to the right */
}

.smartphone-inner {
    width: 100%;
    height: 100%;
    background-color: #eef2f7;
    border-radius: 28px;
    overflow: hidden;
    position: relative;
    padding: 0;
}

.smartphone-screenshot {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Stars Bar inside phone */
.stars-bar {
    display: flex;
    justify-content: center;
    gap: 6px;
}

.star {
    width: 26px;
    height: 26px;
    filter: drop-shadow(0px 2.5px 0px var(--dark-color));
}

.star-filled {
    fill: var(--yellow-tile);
    stroke: var(--dark-color);
    stroke-width: 2.2px;
}

.star-empty {
    fill: #d5dce6;
    stroke: var(--dark-color);
    stroke-width: 2.2px;
}

/* Game Grid inside phone */
.game-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin: auto 0;
}

.grid-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    width: 100%;
}

.game-tile {
    border: 3px solid var(--dark-color);
    box-shadow: 0px 4.5px 0px var(--dark-color);
    transition: transform 0.1s ease;
}

/* Tile Shapes */
.shape-square {
    width: 38px;
    height: 38px;
    border-radius: 8px;
}

.shape-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
}

.shape-triangle {
    width: 38px;
    height: 38px;
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    border: none;
    box-shadow: none;
    position: relative;
    /* Drawing a bordered triangle in clip-path is hard, we can use SVG or border hacks.
       Since we want it bordered, we can use an outline border style or custom SVG.
       Let's implement a neat pseudo-element or style it elegantly.
       Wait! We can styling shape-triangle with a background image or standard CSS triangle border hack.
       Actually, SVG is the cleanest way. But let's check: can we just make a CSS pseudo-element for border?
       Yes, or a simple clip-path mask. Let's make the triangle draw using borders so it has an outline. */
    background: transparent;
}

/* Let's redefine the triangle as standard SVG inside the HTML or style it with borders */
.color-blue { background-color: var(--blue-tile); }
.color-red { background-color: var(--red-tile); }
.color-green { background-color: var(--green-tile); }
.color-yellow { background-color: var(--yellow-tile); }

/* Standard custom triangle drawing hack in CSS: */
.game-tile.shape-triangle {
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-bottom: 36px solid var(--green-tile);
    box-shadow: none;
    background: transparent;
    filter: drop-shadow(0px 4px 0px var(--dark-color));
}

/* Slogan Styling */
.slogan-section {
    text-align: center;
    margin-bottom: 30px;
}

.slogan {
    font-size: 2.3rem;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: 0.5px;
    text-shadow:
        -2.2px -2.2px 0 var(--dark-color),
         2.2px -2.2px 0 var(--dark-color),
        -2.2px  2.2px 0 var(--dark-color),
         2.2px  2.2px 0 var(--dark-color),
        -2.2px  0px 0 var(--dark-color),
         2.2px  0px 0 var(--dark-color),
         0px -2.2px 0 var(--dark-color),
         0px  2.2px 0 var(--dark-color),
         0px  5px 0 var(--dark-color);
}

.slogan-green {
    color: #b3df66; /* Light green as in mockup */
}

.slogan-orange {
    color: #f7ab43; /* Light orange as in mockup */
}

/* Badges / Download Buttons */
.badges-section {
    margin-bottom: 50px;
    display: flex;
    justify-content: center;
}

.download-badge {
    display: flex;
    align-items: center;
    background-color: #01875f;
    color: var(--white-color);
    text-decoration: none;
    padding: 12px 28px;
    border-radius: 16px;
    border: 3.5px solid var(--dark-color);
    box-shadow: 0px 6px 0px var(--dark-color);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
    cursor: pointer;
}

.download-badge:hover {
    transform: translateY(-3px);
    background-color: #009e6e;
    box-shadow: 0px 9px 0px var(--dark-color);
}

.download-badge:active {
    transform: translateY(2px);
    background-color: #00704e;
    box-shadow: 0px 3px 0px var(--dark-color);
}

.badge-logo-img {
    width: 28px;
    height: 28px;
    margin-right: 14px;
    object-fit: contain;
}

.badge-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.badge-subtext {
    font-size: 0.75rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #ccd5e0;
}

.badge-maintext {
    font-size: 1.35rem;
    font-weight: 700;
}

/* Features Grid */
.features-section {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 20px;
}

.feature-card {
    background-color: var(--white-color);
    border: 4px solid var(--dark-color);
    border-radius: 24px;
    box-shadow: 0px 8px 0px var(--dark-color);
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
    transform: translate(-3px, -3px);
    box-shadow: 3px 11px 0px var(--dark-color);
}

.card-icon-container {
    width: 100%;
    height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 16px;
}

.card-icon-svg {
    width: auto;
    height: 75px;
    max-width: 100%;
}

.card-icon-img {
    height: 80px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

.card-content {
    width: 100%;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--dark-color);
}

.card-text {
    font-size: 1.05rem;
    font-weight: 400;
    line-height: 1.45;
    color: #4a4a4a;
}

/* Footer styling */
.page-footer {
    width: 100%;
    text-align: center;
    padding: 30px 20px;
    margin-top: auto;
    z-index: 1;
}

.page-footer p {
    font-size: 0.95rem;
    color: rgba(26, 26, 26, 0.7);
    font-weight: 600;
}

/* Responsive queries */
@media (max-width: 800px) {
    .features-section {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .logo-text {
        font-size: 2.6rem;
        text-shadow:
            -2.8px -2.8px 0 var(--dark-color),
             2.8px -2.8px 0 var(--dark-color),
            -2.8px  2.8px 0 var(--dark-color),
             2.8px  2.8px 0 var(--dark-color),
            -2.8px  0px 0 var(--dark-color),
             2.8px  0px 0 var(--dark-color),
             0px -2.8px 0 var(--dark-color),
             0px  2.8px 0 var(--dark-color),
             0px  5.5px 0 var(--dark-color);
    }
    
    .slogan {
        font-size: 1.8rem;
        text-shadow:
            -1.8px -1.8px 0 var(--dark-color),
             1.8px -1.8px 0 var(--dark-color),
            -1.8px  1.8px 0 var(--dark-color),
             1.8px  1.8px 0 var(--dark-color),
            -1.8px  0px 0 var(--dark-color),
             1.8px  0px 0 var(--dark-color),
             0px -1.8px 0 var(--dark-color),
             0px  1.8px 0 var(--dark-color),
             0px  4px 0 var(--dark-color);
    }
}

/* Top Controls (Privacy & Language Selection) */
.top-controls {
    position: absolute;
    top: 24px;
    right: 24px;
    display: flex;
    gap: 12px;
    z-index: 100;
    align-items: center;
}

.control-btn {
    background-color: var(--white-color);
    border: 3.5px solid var(--dark-color);
    border-radius: 14px;
    box-shadow: 0px 4px 0px var(--dark-color);
    padding: 8px 16px;
    font-family: var(--font-family);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--dark-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.1s ease, background-color 0.15s ease;
}

.control-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0px 6px 0px var(--dark-color);
    background-color: #f7f9fc;
}

.control-btn:active {
    transform: translateY(2px);
    box-shadow: 0px 2px 0px var(--dark-color);
    background-color: #eef2f7;
}

.control-icon {
    width: 18px;
    height: 18px;
    stroke: var(--dark-color);
    display: block;
}

/* Custom language dropdown */
.lang-dropdown {
    position: relative;
}

.lang-dropdown-trigger {
    background-color: var(--white-color);
    border: 3.5px solid var(--dark-color);
    border-radius: 14px;
    box-shadow: 0px 4px 0px var(--dark-color);
    padding: 8px 14px;
    font-family: var(--font-family);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.1s ease, background-color 0.15s ease;
    white-space: nowrap;
}

.lang-dropdown-trigger:hover {
    transform: translateY(-2px);
    box-shadow: 0px 6px 0px var(--dark-color);
    background-color: #f7f9fc;
}

.lang-dropdown-trigger:active {
    transform: translateY(2px);
    box-shadow: 0px 2px 0px var(--dark-color);
    background-color: #eef2f7;
}

.lang-dropdown-arrow {
    stroke: var(--dark-color);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.lang-dropdown.open .lang-dropdown-arrow {
    transform: rotate(180deg);
}

.lang-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background-color: var(--white-color);
    border: 3.5px solid var(--dark-color);
    border-radius: 14px;
    box-shadow: 0px 6px 0px var(--dark-color);
    list-style: none;
    padding: 6px;
    min-width: 140px;
    z-index: 200;
    animation: dropdownFadeIn 0.15s ease;
}

.lang-dropdown-menu.open {
    display: block;
}

@keyframes dropdownFadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.lang-option {
    padding: 9px 14px;
    border-radius: 9px;
    font-family: var(--font-family);
    font-weight: 600;
    font-size: 1rem;
    color: var(--dark-color);
    cursor: pointer;
    transition: background-color 0.12s ease;
}

.lang-option:hover {
    background-color: #eef2f7;
}

.lang-option.active {
    background-color: var(--blue-tile);
    color: var(--white-color);
}

.lang-option.active:hover {
    background-color: #3f7cc2;
}


/* Adjust for mobile viewports to prevent overlap or layout issues */
@media (max-width: 600px) {
    .top-controls {
        position: relative;
        top: 0;
        right: 0;
        margin-top: 10px;
        margin-bottom: 20px;
        justify-content: center;
        width: 100%;
    }
}



