* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Tahoma, sans-serif;
}

html {
    min-height: 100%;
    -webkit-text-size-adjust: 100%;
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding:
        env(safe-area-inset-top)
        env(safe-area-inset-right)
        env(safe-area-inset-bottom)
        env(safe-area-inset-left);
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 50%, #fecfef 100%);
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
}

/* ذرات متحرک پس‌زمینه */

.particles {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.particles span {
    position: absolute;
    bottom: -50px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    animation: float 15s infinite;
}

.particles span:nth-child(1) {
    width: 80px;
    height: 80px;
    left: 10%;
    animation-duration: 15s;
}

.particles span:nth-child(2) {
    width: 60px;
    height: 60px;
    left: 20%;
    animation-duration: 12s;
    animation-delay: 2s;
}

.particles span:nth-child(3) {
    width: 100px;
    height: 100px;
    left: 35%;
    animation-duration: 18s;
    animation-delay: 4s;
}

.particles span:nth-child(4) {
    width: 40px;
    height: 40px;
    left: 50%;
    animation-duration: 10s;
    animation-delay: 1s;
}

.particles span:nth-child(5) {
    width: 70px;
    height: 70px;
    left: 65%;
    animation-duration: 14s;
    animation-delay: 3s;
}

.particles span:nth-child(6) {
    width: 50px;
    height: 50px;
    left: 80%;
    animation-duration: 16s;
    animation-delay: 5s;
}

.particles span:nth-child(7) {
    width: 90px;
    height: 90px;
    left: 90%;
    animation-duration: 13s;
    animation-delay: 2s;
}

.particles span:nth-child(8) {
    width: 30px;
    height: 30px;
    left: 15%;
    animation-duration: 11s;
    animation-delay: 4s;
}

.particles span:nth-child(9) {
    width: 60px;
    height: 60px;
    left: 45%;
    animation-duration: 17s;
    animation-delay: 1s;
}

.particles span:nth-child(10) {
    width: 80px;
    height: 80px;
    left: 75%;
    animation-duration: 14s;
    animation-delay: 3s;
}

@keyframes float {
    0% {
        opacity: 0;
        transform: translateY(0) rotate(0deg);
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: translateY(-110dvh) rotate(360deg);
    }
}

/* ساختار اصلی صفحه */

.container {
    position: relative;
    z-index: 1;
    width: min(100%, 500px);
    max-width: 500px;
    margin: auto;
    padding: 20px;
}

.welcome-box,
.message-box {
    width: 100%;
    position: relative;
    overflow: hidden;
    padding: 60px 40px;
    border: 3px solid rgba(255, 255, 255, 0.5);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 30px 100px rgba(255, 154, 158, 0.4);
    text-align: center;
    animation: pulse 3s infinite;
}

@keyframes pulse {
    0%,
    100% {
        box-shadow: 0 30px 100px rgba(255, 154, 158, 0.4);
    }

    50% {
        box-shadow: 0 40px 120px rgba(255, 154, 158, 0.6);
    }
}

.welcome-box::before {
    content: "";
    position: absolute;
    inset: -2px;
    z-index: -1;
    border-radius: 30px;
    background: linear-gradient(
        45deg,
        #ff9a9e,
        #fad0c4,
        #fad0c4,
        #a18cd1,
        #fbc2eb,
        #ff9a9e
    );
    background-size: 400%;
    opacity: 0.4;
    animation: gradient 6s ease infinite;
}

@keyframes gradient {
    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.heart-icon,
.mystery-icon {
    margin-bottom: 20px;
    font-size: 60px;
    animation: heartbeat 1.5s infinite;
}

@keyframes heartbeat {
    0%,
    100% {
        transform: scale(1);
    }

    10%,
    30% {
        transform: scale(1.1);
    }

    20%,
    40% {
        transform: scale(1);
    }
}

.welcome-text,
.message-text {
    color: #ff6b81;
    font-size: 36px;
    font-weight: bold;
    line-height: 1.8;
    text-shadow: 2px 2px 8px rgba(255, 107, 129, 0.3);
    animation: fadeInUp 1s ease;
}

.welcome-text {
    margin-bottom: 15px;
}

.message-text {
    margin-bottom: 25px;
    font-size: 28px;
}

.sub-text,
.message-sub {
    color: #888;
    font-size: 18px;
    line-height: 1.8;
    animation: fadeInUp 1.5s ease;
}

.sub-text {
    margin-bottom: 40px;
}

.message-sub {
    margin-bottom: 30px;
    font-size: 20px;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* دکمه‌ها */

button {
    min-height: 48px;
    border: none;
    font-family: Tahoma, sans-serif;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.btn-start,
.btn-reveal,
.btn-mustache,
.btn-yes,
.btn-no {
    position: relative;
    overflow: hidden;
    padding: 18px 50px;
    border-radius: 50px;
    background: linear-gradient(135deg, #ff6b81 0%, #ff8e9e 100%);
    box-shadow: 0 15px 40px rgba(255, 107, 129, 0.5);
    color: #ffffff;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.35s ease;
}

.btn-start::before,
.btn-reveal::before,
.btn-mustache::before,
.btn-yes::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.45),
        transparent
    );
    transition: left 0.5s ease;
}

.btn-start:hover::before,
.btn-reveal:hover::before,
.btn-mustache:hover::before,
.btn-yes:hover::before {
    left: 100%;
}

.btn-start:hover,
.btn-reveal:hover,
.btn-mustache:hover,
.btn-yes:hover {
    transform: translateY(-6px) scale(1.04);
    box-shadow: 0 25px 60px rgba(255, 107, 129, 0.7);
}

.btn-start:active,
.btn-reveal:active,
.btn-mustache:active,
.btn-yes:active,
.btn-no:active {
    transform: translateY(-2px) scale(0.98);
}

.btn-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 18px;
    margin-top: 25px;
}

.btn-no {
    background: linear-gradient(135deg, #919191, #b9b9b9);
    box-shadow: 0 12px 25px rgba(70, 70, 70, 0.25);
}

/* مودال‌ها */

.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(62, 24, 43, 0.62);
    backdrop-filter: blur(6px);
}

.modal.show {
    display: flex;
}

.modal-content {
    width: min(100%, 500px);
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    padding: 38px 28px;
    border: 3px solid rgba(255, 107, 129, 0.3);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 40px 150px rgba(255, 107, 129, 0.5);
    text-align: center;
    animation: slideDown 0.4s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-60px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-icon {
    margin-bottom: 18px;
    font-size: 58px;
    animation: heartbeat 1.5s infinite;
}

.modal-text {
    margin-bottom: 18px;
    color: #ff6b81;
    font-size: 24px;
    font-weight: bold;
    line-height: 1.7;
}

.modal-sub {
    margin-bottom: 18px;
    color: #888;
    font-size: 17px;
    line-height: 1.8;
}

.batman-suit {
    display: block;
    width: 100%;
    max-width: 300px;
    max-height: 38dvh;
    margin: 18px auto;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(255, 107, 129, 0.4);
    object-fit: contain;
}

/* بازی سنگ، کاغذ، قیچی */

.game-info {
    margin: 18px 0;
    padding: 13px;
    border-radius: 15px;
    background: rgba(255, 107, 129, 0.1);
}

.game-info p {
    margin: 5px 0;
    color: #ff6b81;
    font-size: 15px;
    font-weight: bold;
}

.game-choices {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 16px;
}

.game-btn {
    min-height: 46px;
    padding: 12px 18px;
    border: none;
    border-radius: 16px;
    background: linear-gradient(135deg, #ff6b81, #ff8e9e);
    box-shadow: 0 10px 24px rgba(255, 107, 129, 0.28);
    color: #ffffff;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.25s ease;
}

.game-btn:hover {
    transform: translateY(-4px) scale(1.04);
}

.game-btn:disabled {
    cursor: not-allowed;
    opacity: 0.55;
    transform: none;
}

.game-result {
    min-height: 70px;
    margin-top: 18px;
    color: #d95378;
    font-size: 17px;
    font-weight: bold;
    line-height: 1.9;
}

/* همه عکس‌ها داخل صفحه می‌مانند */

img {
    max-width: 100%;
    height: auto;
}

/* تبلت و صفحه بزرگ‌تر */

@media (min-width: 768px) {
    .container {
        max-width: 560px;
        padding: 24px;
    }
}

/* موبایل استاندارد */

@media (max-width: 480px) {
    .container {
        padding: 14px;
    }

    .welcome-box,
    .message-box {
        padding: 42px 22px;
        border-radius: 26px;
    }

    .welcome-text {
        font-size: clamp(25px, 7vw, 34px);
    }

    .message-text {
        font-size: clamp(20px, 5.8vw, 27px);
        line-height: 1.9;
    }

    .sub-text,
    .message-sub {
        font-size: clamp(15px, 4.3vw, 18px);
        line-height: 1.9;
    }

    .heart-icon,
    .mystery-icon {
        margin-bottom: 14px;
        font-size: 54px;
    }

    .btn-start,
    .btn-reveal,
    .btn-mustache,
    .btn-yes,
    .btn-no {
        max-width: 100%;
        padding: 15px 25px;
        font-size: 16px;
        line-height: 1.5;
        white-space: normal;
    }

    .btn-container {
        gap: 12px;
        margin-top: 22px;
    }

    .modal-content {
        width: calc(100% - 20px);
        max-height: calc(100dvh - 20px);
        margin: 10px;
        padding: 28px 18px;
        border-radius: 24px;
    }

    .modal-text {
        font-size: 21px;
    }

    .modal-sub {
        font-size: 16px;
    }
}

/* گوشی‌های خیلی کوچک */

@media (max-width: 360px) {
    .container {
        padding: 10px;
    }

    .welcome-box,
    .message-box {
        padding: 34px 16px;
    }

    .welcome-text {
        font-size: 24px;
    }

    .message-text {
        font-size: 19px;
    }

    .sub-text,
    .message-sub {
        font-size: 14px;
    }

    .btn-start,
    .btn-reveal,
    .btn-mustache,
    .btn-yes,
    .btn-no {
        padding: 13px 18px;
        font-size: 14px;
    }
}

/* موبایل با ارتفاع کم */

@media (max-height: 650px) and (orientation: portrait) {
    body {
        align-items: flex-start;
        padding-top: 18px;
        padding-bottom: 18px;
    }

    .welcome-box,
    .message-box {
        padding-top: 30px;
        padding-bottom: 30px;
    }

    .heart-icon,
    .mystery-icon {
        margin-bottom: 10px;
        font-size: 46px;
    }

    .sub-text,
    .message-sub {
        margin-bottom: 22px;
    }
}

/* سایت فقط در حالت عمودی استفاده می‌شود */

@media (orientation: landscape) and (max-width: 900px) {
    body {
        overflow: hidden;
    }

    body::before {
        content: "لطفاً گوشی را عمودی بگیر 📱↕️";
        position: fixed;
        inset: 0;
        z-index: 99999;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 30px;
        background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
        color: #7a334e;
        font-family: Tahoma, sans-serif;
        font-size: 22px;
        font-weight: bold;
        line-height: 2;
        text-align: center;
    }

    body > * {
        visibility: hidden;
    }

    body::before {
        visibility: visible;
    }
}