@media screen and (max-width: 1200px) {
    .row1 {
        width: 75%;
    }

    .row2 {
        width: 55%;
    }
}

@media only screen and (max-width: 1024px) {
    main {
        background: url('../img/bg-tablet.jpg') no-repeat center -200px;
        background-size: 1100px;
    }

    .title-text {
        height: 1060px;
    }

    .title-img {
        margin-top: 50px;
    }

    .rowInput {
        height: 45px;
        width: 250px;
    }

    .row1 {
        width: 75%;
    }

    .row2 {
        width: 55%;
    }
}

@media only screen and (max-width: 820px) {
    main {
        background: url('../img/bg-tablet.jpg') no-repeat center -80px;
        background-size: 820px;
    }

    .title-text {
        height: 880px;
    }

    .rowContent {
        width: 100%;
        margin-top: -50px;
    }

    .row1 { 
        width: 55%;
        order: 2; 
        gap: 10px;
        margin-bottom: 10px;
    }

    .row2 {
        width: 55%;
        order: 3;        
        gap: 10px;
    }

    .row3 {
        order: 1;
        text-align: center;
    }
}

@media only screen and (max-width: 768px) {
    main {
        background: url('../img/bg-tablet.jpg') no-repeat center -100px;
        background-size: 847px;
    }

    .title-img {
        width: 575px;
    }

    .title-text {
        height: 880px;
    }

    .rowContent {
        width: 100% !important;
        margin-top: -100px;
    }

    .row1 { 
        width: 65%;
        order: 2; 
        gap: 10px;
        margin-bottom: 10px;
    }

    .row2 {
        width: 65%;
        order: 3;        
        gap: 10px;
    }

    .row3 {
        order: 1;
        text-align: center;
    }
}

@media only screen and (max-width: 599px) {
    main {
        background-size: 700px;
    }

    .title-img {
        background-image: url('../img/title-mob.png');
        background-repeat: no-repeat;
        background-size: contain;
        background-position: center;
        width: 330px;
        height: 70px;
        margin-top: 30px;
        margin-bottom: 20px;
    }

    .title-text {
        width: 320px;
        height: 750px;
    }
    
    body.th .title-text p{
    font-size: 15px;
    }

    .title-text p {
        font-size: 12px;
        text-align: center;
    }

    .container {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        align-content: center;
        width: 100%;
    }

    .rowContent {
        display: flex;
        flex-direction: column;
        width: 100%;
        margin-top: -100px;
    }

    .row1 { 
        flex-direction: column;
        align-items: center;
        order: 2; 
        gap: 10px;
        margin-bottom: 10px;
    }

    .row2 {
        flex-direction: column;
        align-items: center;
        order: 3;        
        gap: 10px;
    }

    .row3 {
        order: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    body.th .member {
        font-size: 13px;
    }

    .member p {
        font-size: 14px !important;
    }

    body.th .submitButton {
        width: 90%;
    }

    body.th .rowInput {
        width: 90%;
    }

    .submitButton {
        width: 90%;
        height: 45px;
        margin-top: 10px;
        font-size: 18px;
        font-weight: 900;
    }

    .rowInput {
        width: 90%;
        text-align: center;
        font-size: 16px;
    }

    .popup-box {
        transform: translateX(-2%);
        width: 370px;
        height: 290px;
        font-size: 10px;  
    }
  
    .popup-box img, .popup-box table {
        max-width: 100% !important;
    }
  
    .popup-header {
        font-size: 25px;
    }

    .popup-header .popup-subtitle,
    .popup-header .popup-main {
        font-size: 10px;
    }

    .winners {
        font-size: 12px;
    }

    .iphone-img img {
        width: 105px;
    }

    .yellow-text-winners {
        color: #ffe000;
        font-size: 25px;
    }

    .yellow-text-iphone {
        color: #ffe000;
        font-size: 15px;
    }

    body.th .iphone-img img {
        width: 100px;
    }

    .available {
        font-size: 10px;
    }

    .popup-arrow {
        padding: 5;
    }
}

@media only screen and (max-width: 420px) {
    main {
        background: url('../img/bg-mobile.jpg') no-repeat center -100px;
        background-size: 100%;
    }

    .title-img {
        background-image: url('../img/title-mob.png');
        background-repeat: no-repeat;
        background-size: contain;
        background-position: center;
        width: 300px;
        height: 70px;
        margin-top: 30px;
        margin-bottom: 20px;
    }

    .title-text {
        width: 320px;
        height: 600px;
    }

    .title-text p {
        font-size: 12px;
        text-align: center;
    }

    body.th .title-text p{
        font-size: 12px;
    }

    .container {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        align-content: center;
        width: 100%;
    }

    .rowContent {
        display: flex;
        flex-direction: column;
        width: 100%;
        margin-top: -100px;
    }

    .row1 {
        order: 2;
    }

    .row2 {
        order: 3;
    }

    .row3 {
        order: 1;
        text-align: center;
    }

   .member {
        font-size: 15px;
    }

    .popup-box {
        width: 370px;
        height: 290px;
        font-size: 10px;
        transform: scale(0.8) translateX(-2.5%);
        transform-origin: top center;
    }

    body.th .yellow-text-winners {
        color: #ffe000;
        font-size: 20px;
    }

    .winners {
        font-size: 12px;
    }

    .iphone-img img {
        width: 100px;
    }

    .available {
        font-size: 10px;
    }

    .popup-arrow {
        padding: 2px;
    }
}

@media only screen and (max-width: 400px) {
    main {
        background: url('../img/bg-mobile.jpg') no-repeat center -20px;
        background-size: 100%;
    }

     .title-text p {
        font-size: 10px;
        text-align: center;
    }
}

@media only screen and (max-width: 364px) {
    html, body {
        overflow-x: hidden;
  }

    .popup-box {
        width: 370px;
        max-width: 100%;
        margin: 0 auto;
        padding: 16px;
        box-sizing: border-box;
  }

    .popup-header {
        font-size: 20px;
    }

    .yellow-text-winners {
        font-size: 20px;
    }

    .iphone-img img {
        width: 90px;
    }
}
