:root {
    --card: #f6e9d5;
    --card-hover: #f5d6a8;
    --muted: #9fb3c8;
    --accent: #22c1c3;
    --accent-hover: #01a6a8;
    --card-border: rgb(255, 165, 0);
    --card-color: #0a192f;
}

[data-theme='dark'] {
    --card: #ae6903;
    --card-hover: #a26202;
    --muted: #475569;
    --accent: #0ea5a3;
    --accent-hover: #018f8d;
    --card-border: rgb(0, 255, 255);
    --card-color: rgb(0, 255, 255);
}

.container {
    max-width: 100vw;
    margin: 0.4vw auto;
    padding: 0.6vw
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center
}

.brand {
    display: flex;
    gap: 1.2vw;
    align-items: center;
    margin: 0vw;
}

.title {
    margin: 0.2vw;
}

.hdrbtns {
    display: flex;
    flex-direction: column;
}

.hdr-child-div {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
}

.logo {
    width: 7vw;
    height: 7vw;
    border-radius: 1vw;
    background: linear-gradient(135deg, var(--accent), #60a5fa);
    display: grid;
    place-items: center;
    color: white;
    font-weight: 700
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(26vw, 1fr));
    gap: 1.4vw;
    margin-top: 0.8vw
}

.game-card {
    background-color: rgba(255, 255, 255, 0.1);
    border: 2px solid var(--card);
    backdrop-filter: blur(1vw);
    padding: 1vw;
    margin: 0.2vw;
    border-radius: 1vw;
    overflow: hidden;
    box-shadow:
        0 0 2px var(--card),
        0 0 4px var(--card),
        0 0 6px var(--card),
        0 0 10px var(--card) inset;
    transition: box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    color: var(--card-color);
    border: var(--card-border) 0.125em solid;
    box-shadow: inset 0 0 0.5em 0 var(--card-border), 0 0 0.5em 0 var(--card-border);
}

.game-card:hover {
    box-shadow: 0 0 20px var(--card-border), 0 0 40px var(--card-border), 0 0 60px var(--card-border);
}

.thumb {
    width: 100%;
    height: 14vh;
    object-fit: cover
}

.content {
    padding: 1vw
}

.play-btn {
    display: inline-block;
    width: 90%;
    text-align: center;
    margin: 1vw;
    padding: 0.8vw 1vw;
    border-radius: 1vw;
    background: var(--accent);
    color: white;
    font-weight: bold;
    font-size: 4vw;
    text-decoration: none;
    box-shadow: 0 1vw 4vw var(--box-shadow);
}

.play-btn:hover {
    background: var(--accent-hover);
}


.chip {
    gap: 8px;
    border-radius: 5px;
    padding: 5px 5px;
    margin: 5px 2px 5px 2px;
    margin-top: 0.1vh;
    transition: background-color 0.3s, transform 0.2s;
    box-shadow: 0 5px 25px 0 var(--box-shadow);
    background: linear-gradient(90deg, var(--accent), #7c3aed);
    cursor: pointer;
    /* color: var(--text); */
    color: #fff;
    /* border: 0.2vw solid var(--cell-border); */
    border-color: transparent;
    background: linear-gradient(180deg, #10b981, #059669);
    border: 2px solid #10b981;
    text-decoration: none;
}

.chip:hover {
    background: linear-gradient(180deg, #059669, #10b981);
}

.lead {
    font-size: 1.6vw;
    margin: 0.2vw;
}

.tic-grid {
    display: grid;
    grid-template-columns: repeat(3, 80px);
    gap: 6px
}

.game-card>h3 {
    font-size: 3vw;
    text-align: center;
}

/* 🧭 Portrait (Top-Bottom layout) */
@media(max-width:520px),
(max-aspect-ratio: 1/1) {
    header {
        flex-direction: column;
    }

    h1 {
        font-size: 10px;
        padding: 1px 2px;
        margin: 2px 1px 2px 1px;
        letter-spacing: 5px;
    }

    .game-card {
        padding: 1vw;
        margin: 1vw 5vw;
    }

    .game-card>h3 {
        font-size: 4vw;
    }

    .play-btn {
        font-size: 4vw;
        width: 100%;
        margin: 0.5vw;
    }

    .title .lead {
        font-size: 2.5vw;
    }

    .lead {
        font-size: 4.5vw;
    }

    .brand {
        width: 100%;
        justify-content: center;
    }

    .grid {
        grid-template-columns: repeat(auto-fill, minmax(50vw, 1fr));
    }

    .tic-grid {
        grid-template-columns: repeat(3, 60px)
    }

    .hdrbtns {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero h1 {
        font-size: 8vw;
    }

    .hero p {
        font-size: 4vw;
    }

    .hero img {
        width: 35vw;
    }

    .section-title {
        font-size: 6vw;
    }
}

.muted {
    color: var(--muted);
    font-size: 12px
}

/* app useed */
.hero {
    text-align: center;
    padding: 3vw 2vw;
}

.hero h1 {
    font-size: 4vw;
    margin-bottom: 0.5vw;
}

.hero p {
    font-size: 1.6vw;
    color: var(--muted);
}

.hero img {
    width: 18vw;
    max-width: 220px;
    margin-bottom: 1vw;
}

.section-title {
    text-align: center;
    font-size: 2.5vw;
    margin: 1vw 0 1vw;
    color: var(--card-color);
}

.feq {
    /* display:grid; */
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5vw;
    margin: 2vw 0;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5vw;
    margin: 2vw 0;
}

.feature {
    background: rgba(255, 255, 255, .08);
    border: 2px solid var(--card-border);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    color: var(--card-color);
    transition: .3s;
}

.feature:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 20px var(--card-border);
}

.screenshots {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.screenshots img {
    width: 100%;
    border-radius: 15px;
    border: 2px solid var(--card-border);
}

.footer {
    text-align: center;
    padding: 10px;
    color: var(--muted);
}

/* FEQ and why RGH CSS */
* {
    box-sizing: border-box;
}

/* MAIN SECTION */
.message-section {
    width: 100%;
    margin: 10px auto;
    padding: 0 5px;
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 10px;
}

/* MESSAGE BOX */
.message-box {
    /* Maximum width = screen का 30% */
    width: 100%;
    max-width: 100%;
    min-width: 0;
    /* background: #ffffff; */
    border-radius: 15px;
    padding: 2px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    border: 1px solid #ddd;
    display: flex;
    flex-direction: column;
}

/* Heading */
.slide-h3 {
    /* text-align: left; */
    display: block;
    font: 1rem sans-serif;
    font-weight: bold;
    margin-block-start: 0.3em;
    margin-block-end: 0.3em;
    margin-inline-start: 0.5em;
    margin-inline-end: 0em;
    unicode-bidi: isolate;
}

.message-box h2 {
    text-align: left;
    display: block;
    font-weight: bold;
    margin-block-start: 0.1em;
    margin-block-end: 0.1em;
    margin-inline-start: 0.5em;
    margin-inline-end: 0em;
    text-align: center;
    font-size: clamp(17px, 2vw, 25px);
    flex-shrink: 0;
}

/* SLIDER */
.message-slider {
    width: 100%;
    display: flex;
    align-items: center;
    min-width: 0;
}

/* MESSAGE CONTENT */
.message-content {
    flex: 1;
    min-width: 0;
    /* Message की maximum height */
    max-height: 150px;
    min-height: 100px;
    padding: 2px;
    /* background: #f5f5f5; */
    background: var(--card-border);
    border-radius: 12px;
    /* ज्यादा text होने पर vertical scrollbar */
    overflow-y: auto;
    /* horizontal scrollbar नहीं */
    overflow-x: hidden;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    text-align: center;
}

/* Actual text */
.message-content div {
    width: 100%;
    font-size: clamp(13px, 1.4vw, 19px);
    line-height: 1.2;
    color: #222;
    overflow-wrap: anywhere;
    transition:
        opacity 0.3s ease,
        transform 0.3s ease;
}

.slide-p {
    display: block;
    margin-block-start: 0.3em;
    margin-block-end: 0.3em;
    margin-inline-start: 0.5em;
    margin-inline-end: 0px;
    unicode-bidi: isolate;
    width: 100%;
}

/* ARROWS */

.msg-arrow {
    flex-shrink: 0;
    /* width: 10px;
    height: 10px; */
    border: none;
    border-radius: 50%;
    /* background: #333; */
    /* color: white; */
    font-size: 8px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.msg-arrow:hover {
    /* background: #555; */
    background: white;
    transform: scale(1.08);
}


/* MESSAGE ANIMATION */
.message-exit {
    opacity: 0;
    transform: translateX(-30px);
}

.message-enter {
    opacity: 0;
    transform: translateX(30px);
}

/* TABLET */
@media (max-width: 900px) {
    .message-section {
        gap: 5px;
    }

    .message-box {
        /* Tablet पर भी maximum 30% */
        width: 100%;
        max-width: 100%;
        padding: 1px;
    }

    .message-content {
        max-height: 140px;
        min-height: 90px;
    }
}

/* MOBILE */

@media (max-width: 600px) {
    .message-section {
        flex-direction: column;
        align-items: center;
        gap: 2px;
        padding: 0 10px;
    }

    .message-box {
        /* Mobile पर पूरा available width */
        width: 100%;
        max-width: 100%;
        padding: 1px;
    }

    .message-content {
        max-height: 160px;
        min-height: 90px;
    }

    .msg-arrow {
        /* width: 10px;
        height: 10px; */
        font-size: 5px;
        font-weight: bold;
    }
}

/* Screenshot slide CSS */
/* GALLERY */
.gallery {
    width: 100%;
    max-width: 1200px;
    margin: 10px auto;
    padding: 0 50px;
    position: relative;
}

/* FRAME */
.gallery-frame {
    width: 100%;
    /* Photo की maximum height creen height का 30% */
    max-height: 30vh;
    overflow: hidden;
    border-radius: 15px;
}

/* PHOTOS */
.photos {
    display: flex;
    gap: 12px;
    transition: transform 0.6s ease;
}

/* PHOTO */
.photo {
    /* Desktop: एक साथ 6 photos */
    flex: 0 0 calc((100% - 60px) / 6);
    /* Portrait ratio */
    aspect-ratio: 9 / 16;
    /* 30vh से ज्यादा height नहीं */
    max-height: 30vh;
    text-align: center;
    min-width: 0;
}


/* IMAGE */
.photo img {
    /* width कम हो सकती है, लेकिन height 30vh से ज्यादा नहीं */
    width: 100%;
    height: 27vh;
    max-height: 30vh;
    /* IMPORTANT: पूरी photo दिखाई जाएगी */
    object-fit: contain;
    object-position: center;
    display: block;
    border-radius: 10px;
}

/* PHOTO NAME */
.photo-name {
    /* color: white; */
    font-weight: bold;
    font-size: clamp(12px, 1.3px, 16px);
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* ARROWS */
.arrow {
    position: absolute;
    top: 45%;
    transform: translateY(-50%);
    /* width: 12px;
    height: 12px; */
    border: none;
    border-radius: 50%;
    /* background: rgba(255, 255, 255, 0.85); */
    /* color: #111; */
    font-size: 10px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
}

.arrow:hover {
    background: white;
    transform: scale(1.08);
}

.prev {
    left: 5px;
}

.next {
    right: 5px;
}


/* TABLET */
@media (max-width: 900px) {
    .photo {
        /* Tablet: 4 photos */
        flex: 0 0 calc((100% - 36px) / 4);
        aspect-ratio: 9 / 16;
    }
    .photo-name {
        font-size: clamp(12px, 1.3px, 16px);
    }
}


/* MOBILE */
@media (max-width: 600px) {
    .gallery {
        padding: 0 40px;
    }

    .photo {
        /* Mobile: 2 photos */
        flex: 0 0 calc((100% - 12px) / 2);
        aspect-ratio: 9 / 16;
    }

    .photo img {
        height: 27vh;
        max-height: 30vh;
        object-fit: contain;
    }

    .arrow {
        /* width: 12px;
        height: 12px; */
        font-size: 10px;
    }

    .photo-name {
        font-size: clamp(12px, 1.3px, 16px);
    }
}