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

html {
    width: 100%;
    height: 100%;
    height: -webkit-fill-available;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

#root {
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Helvetica Neue', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.5;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    position: relative;
}

/* Container */
.container {
    min-height: 100vh;
    min-height: -webkit-fill-available;
    background-image: url('/resources/Bg_img.png');
    background-size: 100% 100%;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: scroll;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 0;
    display: flex;
    flex-direction: column;
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

.thank-container {
    min-height: 100vh;
    min-height: -webkit-fill-available;
    background-image: url('/resources/bg-2.png');
    background-size: 100% 100%;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: scroll;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 0;
    display: flex;
    flex-direction: column;
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

/* Header - Hidden since it's in the background image */
.header {
    display: none;
}

.logo {
    display: none;
}

.decorative-bow {
    display: none;
}

/* Main Content */
.main-content {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    padding: 31vh 20px 40px 20px;
    min-height: 100vh;
    box-sizing: border-box;
}

/* Offer Section - Hidden since it's in the background image */
.offer-section {
    display: none;
}

.offer-amount {
    display: none;
}

.offer-text {
    display: none;
}

.offer-subtext {
    display: none;
}

/* Form */
.cashback-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}

/* Form Inputs */
.form-input,
.form-select {
    width: 100%;
    max-width: 100%;
    padding: 13px 16px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    background-color: #FFFFFF;
    color: #333333;
    outline: none;
    transition: box-shadow 0.2s ease;
    box-sizing: border-box;
    -webkit-appearance: none;
    -moz-appearance: none;
    touch-action: manipulation;
}

.form-input::placeholder,
.form-select {
    color: #E31E24;
    font-weight: 500;
}

.form-input:focus,
.form-select:focus {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

/* Select Dropdown */
.form-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23E31E24' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
    cursor: pointer;
    font-weight: 500;
    color: #E31E24;
    text-overflow: ellipsis;
}

.form-select option {
    color: #333333;
    font-weight: 400;
}

/* Form Hints */
.form-hint {
    color: #FFFFFF;
    font-size: 10px;
    font-weight: 400;
    margin-top: 2px;
    margin-left: 2px;
    line-height: 1.2;
}

/* Scratch Instruction */
.scratch-instruction {
    color: #FFFFFF;
    font-size: 12px;
    font-weight: 400;
    margin-bottom: 4px;
    line-height: 1.3;
}

/* Checkbox */
.checkbox-group {
    margin-top: 2px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
    color: #FFFFFF;
    font-size: 12px;
    line-height: 1.4;
    -webkit-tap-highlight-color: transparent;
}

.checkbox-input {
    width: 18px;
    height: 18px;
    min-width: 18px;
    cursor: pointer;
    accent-color: #E31E24;
    margin-top: 1px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.checkbox-text {
    flex: 1;
    line-height: 1.4;
}

.terms-link {
    color: #FFFFFF;
    text-decoration: underline;
    font-weight: 600;
}

.terms-link:hover {
    opacity: 0.8;
}

/* Submit Button */
.submit-btn {
    width: 100%;
    max-width: 100%;
    padding: 13px;
    border: none;
    border-radius: 8px;
    background-color: #FFFFFF;
    color: #E31E24;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1.5px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    min-height: 44px;
}

.submit-btn:hover {
    background-color: #F5F5F5;
    transform: translateY(-1px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

.submit-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Thank You Card */
.thank-you-card {
    background-color: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 12px;
    padding: 40px 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Desktop Restriction Overlay */
#desktop-restriction-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
}

.desktop-message-box {
    color: #FFFFFF;
    font-size: 1.2rem;
    font-weight: 500;
    line-height: 1.6;
}

/* Footer - Hidden since it's in the background image */
.footer {
    display: none;
}

.powered-by {
    display: none;
}

.powered-by strong {
    display: none;
}

/* Responsive Design */
/* Extra small devices (phones, less than 360px) */
@media (max-width: 359px) {
    .main-content {
        padding: 29vh 15px 30px 15px;
        max-width: 100%;
    }

    .cashback-form {
        gap: 12px;
    }

    .form-input,
    .form-select {
        padding: 11px 14px;
        font-size: 14px;
    }

    .submit-btn {
        padding: 11px;
        font-size: 14px;
    }

    .checkbox-label {
        font-size: 11px;
    }

    .form-hint {
        font-size: 9px;
    }

    .scratch-instruction {
        font-size: 11px;
    }
}

/* Small devices (phones, 360px to 480px) */
@media (min-width: 360px) and (max-width: 480px) {
    .main-content {
        padding: 30vh 18px 35px 18px;
        max-width: 100%;
    }
}

/* Small to medium devices (large phones, 481px to 640px) */
@media (min-width: 481px) and (max-width: 640px) {
    .main-content {
        padding: 31vh 20px 40px 20px;
        max-width: 420px;
    }
}

/* Medium devices (tablets, 641px to 768px) */
@media (min-width: 641px) and (max-width: 768px) {
    .main-content {
        padding: 32vh 25px 45px 25px;
        max-width: 450px;
    }
}

/* Large devices (desktops, 769px and up) */
@media (min-width: 769px) and (max-width: 1024px) {
    .main-content {
        padding: 33vh 30px 50px 30px;
        max-width: 480px;
    }
}

/* Extra large devices (large desktops, 1025px and up) */
@media (min-width: 1025px) {
    .container {
        justify-content: center;
    }

    .main-content {
        padding: 33vh 30px 50px 30px;
        max-width: 500px;
    }
}

/* Landscape orientation adjustments for mobile devices */
@media (max-height: 600px) and (orientation: landscape) {
    .main-content {
        padding: 200px 20px 30px 20px;
    }

    .cashback-form {
        gap: 10px;
    }
}

@media (max-height: 500px) and (orientation: landscape) {
    .main-content {
        padding: 160px 20px 25px 20px;
    }

    .cashback-form {
        gap: 8px;
    }

    .form-input,
    .form-select {
        padding: 9px 14px;
        font-size: 14px;
    }

    .submit-btn {
        padding: 9px;
        margin-top: 6px;
    }

    .form-hint,
    .scratch-instruction {
        font-size: 10px;
    }
}

/* Thank You Page Styles */
.thankyou-container {
    min-height: 100vh;
    min-height: -webkit-fill-available;
    width: 100%;
    max-width: 100vw;
    background-image: url('/resources/bg-2.png');
    background-size: 100% 100%;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: scroll;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    padding: 0;
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
    padding-bottom: env(safe-area-inset-bottom);
    box-sizing: border-box;
}

/* Header */
.thankyou-header {
    position: relative;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    width: 100%;
    box-sizing: border-box;
}

.thankyou-bow {
    position: absolute;
    left: 20px;
    top: 15px;
    animation: float 3s ease-in-out infinite;
    will-change: transform;
    z-index: 1;
}

.thankyou-bow svg {
    width: 60px;
    height: 60px;
    display: block;
}

.thankyou-logo {
    display: none;
}

/* Main Content */
.thankyou-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    max-width: 500px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

/* Decorative Elements */
.decorative-star,
.decorative-sparkle {
    display: none;
}

/* Gift Box Container */
.gift-box-container {
    position: relative;
    width: 100%;
    max-width: 320px;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
    box-sizing: border-box;
}

.gift-box-image {
    width: 100%;
    height: auto;
    display: block;
    max-width: 100%;
    object-fit: contain;
}

.main-gift-box {
    display: none;
}

.floating-gift {
    display: none;
}

.gift-left {
    display: none;
}

.gift-right {
    display: none;
}

/* Message Card - Hidden (removed from HTML) */
.message-card {
    display: none;
}

.message-card::before {
    display: none;
}

.congratulations-text {
    display: none;
}

.cashback-message {
    display: none;
}

.cashback-amount {
    display: none;
}

.highlight-text {
    display: none;
}

/* WhatsApp Button */
.whatsapp-btn {
    margin-top: 90%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background-color: rgba(0, 0, 0, 0.1);
    color: white;
    padding: 14px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    margin-bottom: 30px;
    box-sizing: border-box;
    max-width: 100%;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    min-height: 44px;
}

.whatsapp-btn:hover {
    background-color: #20BA5A;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.whatsapp-btn:active {
    transform: translateY(0);
}

.whatsapp-btn svg {
    flex-shrink: 0;
}

/* Footer */
.thankyou-footer {
    text-align: center;
    padding: 20px;
    color: white;
    width: 100%;
    box-sizing: border-box;
}

.powered-text {
    font-size: 12px;
    font-weight: 400;
    margin-bottom: 2px;
    opacity: 0.9;
}

.brand-text {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* Animations */
@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(var(--rotate, 0deg));
    }
    50% {
        transform: translateY(-15px) rotate(var(--rotate, 0deg));
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes twinkle {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(0.8);
    }
}

/* Thank You Page Responsive Design */
/* Extra small devices (phones, less than 360px) */
@media (max-width: 359px) {
    .thankyou-container {
        background-size: 100% 100%;
        background-position: center center;
    }

    .thankyou-header {
        padding: 12px 15px;
        min-height: 50px;
    }

    .thankyou-bow {
        left: 12px;
        top: 10px;
    }

    .thankyou-bow svg {
        width: 45px;
        height: 45px;
    }

    .thankyou-main {
        padding: 15px;
        max-width: 100%;
        min-height: auto;
    }

    .gift-box-container {
        max-width: 200px;
        margin-bottom: 20px;
    }

    .whatsapp-btn {
        padding: 11px 18px;
        font-size: 14px;
        margin-bottom: 20px;
        gap: 8px;
        width: auto;
        white-space: nowrap;
    }

    .whatsapp-btn svg {
        width: 20px;
        height: 20px;
    }

    .thankyou-footer {
        padding: 15px;
    }

    .powered-text {
        font-size: 11px;
    }

    .brand-text {
        font-size: 16px;
    }
}

/* Small devices (phones, 360px to 480px) */
@media (min-width: 360px) and (max-width: 480px) {
    .thankyou-container {
        background-size: 100% 100%;
        background-position: center center;
    }

    .thankyou-header {
        padding: 15px;
        min-height: 60px;
    }

    .thankyou-bow {
        left: 15px;
        top: 12px;
    }

    .thankyou-bow svg {
        width: 50px;
        height: 50px;
    }

    .thankyou-main {
        padding: 18px;
        max-width: 100%;
        min-height: auto;
    }

    .gift-box-container {
        max-width: 240px;
        margin-bottom: 25px;
    }

    .whatsapp-btn {
        padding: 12px 24px;
        font-size: 15px;
        margin-bottom: 25px;
        gap: 9px;
    }

    .whatsapp-btn svg {
        width: 22px;
        height: 22px;
    }
}

/* Modern iPhone sizes (iPhone 14/15/16/17, etc.) */
@media (min-width: 375px) and (max-width: 430px) {
    .thankyou-container {
        background-size: 100% 100%;
        background-position: center center;
    }

    .thankyou-header {
        padding: 16px;
        min-height: 60px;
    }

    .thankyou-bow {
        left: 16px;
        top: 12px;
    }

    .thankyou-bow svg {
        width: 52px;
        height: 52px;
    }

    .thankyou-main {
        padding: 20px;
        max-width: 100%;
    }

    .gift-box-container {
        max-width: 260px;
        margin-bottom: 28px;
    }

    .whatsapp-btn {
        padding: 12px 26px;
        font-size: 15px;
        margin-bottom: 28px;
    }
}

/* Small to medium devices (large phones, 481px to 640px) */
@media (min-width: 431px) and (max-width: 640px) {
    .thankyou-main {
        padding: 20px;
        max-width: 420px;
    }

    .gift-box-container {
        max-width: 270px;
        margin-bottom: 30px;
    }

    .whatsapp-btn {
        padding: 13px 28px;
        font-size: 16px;
        margin-bottom: 30px;
    }
}

/* Medium devices (tablets, 641px to 768px) */
@media (min-width: 641px) and (max-width: 768px) {
    .thankyou-main {
        padding: 25px;
        max-width: 450px;
    }

    .gift-box-container {
        max-width: 290px;
        margin-bottom: 35px;
    }

    .whatsapp-btn {
        padding: 13px 28px;
        font-size: 16px;
        margin-bottom: 35px;
    }

    .thankyou-footer {
        padding: 22px;
    }
}

/* Large devices (desktops, 769px to 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .thankyou-main {
        padding: 30px;
        max-width: 480px;
    }

    .gift-box-container {
        max-width: 310px;
        margin-bottom: 40px;
    }

    .whatsapp-btn {
        padding: 14px 30px;
        font-size: 16px;
        margin-bottom: 40px;
    }

    .thankyou-footer {
        padding: 25px;
    }

    .powered-text {
        font-size: 13px;
    }

    .brand-text {
        font-size: 19px;
    }
}

/* Extra large devices (large desktops, 1025px and up) */
@media (min-width: 1025px) {
    .thankyou-container {
        justify-content: center;
    }

    .thankyou-main {
        padding: 40px;
        max-width: 500px;
    }

    .gift-box-container {
        max-width: 320px;
        margin-bottom: 40px;
    }

    .whatsapp-btn {
        padding: 14px 32px;
        font-size: 16px;
        margin-bottom: 40px;
    }

    .thankyou-footer {
        padding: 25px;
    }

    .powered-text {
        font-size: 13px;
    }

    .brand-text {
        font-size: 20px;
    }
}

/* Landscape orientation adjustments for mobile devices */
@media (max-height: 600px) and (orientation: landscape) {
    .thankyou-container {
        background-size: 100% 100%;
        background-position: center center;
    }

    .thankyou-header {
        padding: 10px 15px;
        min-height: 40px;
    }

    .thankyou-bow {
        left: 15px;
        top: 8px;
    }

    .thankyou-bow svg {
        width: 40px;
        height: 40px;
    }

    .thankyou-main {
        padding: 15px 20px;
        justify-content: center;
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .gift-box-container {
        max-width: 180px;
        margin-bottom: 15px;
    }

    .whatsapp-btn {
        padding: 10px 20px;
        font-size: 14px;
        margin-bottom: 15px;
        gap: 8px;
    }

    .whatsapp-btn svg {
        width: 20px;
        height: 20px;
    }

    .thankyou-footer {
        padding: 12px 15px;
    }

    .powered-text {
        font-size: 11px;
    }

    .brand-text {
        font-size: 16px;
    }
}

@media (max-height: 500px) and (orientation: landscape) {
    .thankyou-container {
        background-size: cover;
        background-position: center center;
        min-height: 100vh;
    }

    .thankyou-header {
        padding: 8px 15px;
        min-height: 35px;
    }

    .thankyou-bow {
        left: 12px;
        top: 6px;
    }

    .thankyou-bow svg {
        width: 35px;
        height: 35px;
    }

    .thankyou-main {
        padding: 10px 18px;
        padding-top: 8px;
        padding-bottom: 8px;
        justify-content: center;
    }

    .gift-box-container {
        max-width: 140px;
        margin-bottom: 10px;
    }

    .whatsapp-btn {
        padding: 9px 18px;
        font-size: 13px;
        gap: 6px;
        margin-bottom: 10px;
    }

    .whatsapp-btn svg {
        width: 18px;
        height: 18px;
    }

    .thankyou-footer {
        padding: 8px 15px;
    }

    .powered-text {
        font-size: 10px;
    }

    .brand-text {
        font-size: 14px;
    }
}

.main-content.otp-active {
    padding-top: 36vh !important;
}
