body {
    min-height: 100vh;
    position: relative;
}

/* Fixed background that works on all devices including iOS */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../imgs/bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;
}

* { font-family: 'sofia-pro'; color: #fff; }
a { text-decoration: none; color: #fff; }


.sidebar { background-color: rgba(0, 191, 222, 0.8); }
.bg-blue { background-color: rgba(0, 191, 222, 0.7); }
.text-lightblue { color: #00C1DE; }

.custom-checkbox, .form-control {    
    border: 3px solid #1DC1DD;
    background-color: #00A2BCaa;
}

.container .row, .container-xxl .row { 
    padding: 0 30px; 
    min-height: 100vh;
}

.header { padding-top: 96px; }
.sidebar { 
    padding: 68px 40px 0; 
    display: flex;
    flex-direction: column;
}


.header .title-img { width: 100%; max-width: 100%;  }
.header .logo-img { width: 12%; margin-left: 3%; vertical-align: text-top; }
.header .text { text-align: right; }
.header .text-img { max-width: 480px; width: 60%; margin-top: 10%;  }

.sidebar hr { margin: 24px 0; border-color: #fff; border-width: 2px; opacity: 0.8; display: block; }

.footer { 
    margin-top: auto; 
    padding-bottom: 40px;
    font-size: 14px; 
}
.footer .separator { color: #fff; padding: 0 5px; }

.btn-duo, .btn-disabled { 
    background-color: #00A2BC; color: #fff; 
    border-top: 6px solid #fff;
    border-bottom: 6px solid #fff;
    border-right: 0; border-left: 0;
    padding: 6px 0 10px;
    border-radius: 0;
    text-decoration: none;
    font-size: 3vw;  
    line-height:  1.1;
    font-weight: bold;
    text-align: center;
    display: block;
    margin: 48px 0;
}
.btn-duo {
    cursor: pointer;
}
.btn-duo:hover {
    background-color: #00a5c0;
}
.btn-disabled { 
    cursor: default;
    line-height: 1;
}

.btn-disabled small {
    font-size: 1.8vw;
    font-weight: normal;
    display: block;
    line-height: 1;
    margin-top: 0.2em;
}

.social-media {
    margin: 16px 0;
    display: flex;
    gap: 12px;
    justify-content: flex-start;
}

.social-icon {
    width: 5vw; max-width: 50px;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.social-icon:hover {
    opacity: 1;
}

/* Custom Checkbox Styles */
.custom-checkbox-container {
    margin-bottom: 30px;
    position: relative;
}

.custom-checkbox-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.custom-checkbox {
    appearance: none;
    width: 2em;
    height: 2em;
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
}

.custom-checkbox:checked {
    background-color: #fff;
    border-color: #fff;
}

.custom-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #00A2BC;
    font-size: 1.3em;
    font-weight: bold;
    line-height: 1;
}

.custom-checkbox:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 162, 188, 0.5);
}

.custom-checkbox-label {
    color: #fff;
    line-height: 1.4;
    margin: 0;
    margin-top: 0.3em;
    cursor: pointer;
    flex: 1;
}

.custom-checkbox-label a {
    text-decoration: underline;
    color: #fff;
}

.custom-checkbox-label a:hover {
    color: #000;
    text-decoration: underline;
}

/* Form styling improvements */
.form-control {
    border-radius: 25px;
    color: #fff;
    padding: 15px 20px;
    margin-bottom: 5px;
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 1);
}

.form-control:focus::placeholder {
    opacity: 0;
}

.form-control:not(:placeholder-shown)::placeholder {
    opacity: 0;
}

.form-control:focus,
.form-control:not(:placeholder-shown) {
    padding: 15px 20px;
    height: auto;
    line-height: 1.4;
}

.form-control:focus {
    background-color: rgba(255, 255, 255, 1);
    border-color: #fff;
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
    color: #333;
}

.form-floating > label {
    color: rgba(255, 255, 255, 1);
    padding-left: 0.5em;
    padding-top: 0.5em;
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    opacity: 0;
    visibility: hidden;
}

/* Error message styling */
.text-danger {
    color: #ff6b6b !important;
    font-size: 12px;
    margin-top: 8px;
    display: block;
    padding-left: 20px;
    font-weight: 500;
    position: relative;
    z-index: 10;
}

.form-floating {
    margin-bottom: 25px;
    position: relative;
}

.form-floating > .form-control {
    height: calc(3.5rem + 2px);
}

.form-floating > .form-control:focus,
.form-floating > .form-control:not(:placeholder-shown) {
    height: calc(3.5rem + 2px);
    padding-top: 1.125rem;
    padding-bottom: 1.125rem;
}

.form-floating .text-danger {
    position: absolute;
    top: 65%;
    left: 0;
    margin-top: 3px;
    width: 100%;
}

/* Custom checkbox error styling */
.custom-checkbox-container .text-danger {
    position: absolute;
    top: 100%;
    left: 34px;
    margin-top: 3px;
    padding-left: 0;
    width: calc(100% - 34px);
}

.container-fluid .title img{ max-width: 800px; margin: 40px 0; }

.form-control,.custom-checkbox-label, .form-floating, .custom-checkbox-wrapper {
    font-size: 22px;
}
.text-danger {
    font-size: 0.8em;
}

.mobile-header img.logo-img  { width: 20%; display: block; margin: 0 auto; }
.mobile-header img.title-img { margin-bottom: 10px; }
.mobile-header .title { margin-bottom: 40px; }

/* Media query for mobile devices - comprehensive approach */
@media screen and (max-width: 768px), 
       screen and (max-device-width: 768px),
       only screen and (max-width: 768px),
       only screen and (max-device-width: 768px),
       only screen and (orientation: portrait) and (max-width: 768px) {
    
    /* Force mobile background for all mobile scenarios */
    body::before {
        background-image: url('/imgs/bg-mobile.png');
        background-position: top center;
        background-size: 100%;
    }
    
    .btn-duo {
        font-size: 7vw;
    }
    .container .row, .container-xxl .row { min-height: auto; }

    .footer { font-size: 18px; }
    .social-icon { width: 10vw; max-width: 50px; }

    .mobile-header .text {  margin-bottom: 70vw;  margin-top: -20px; }

    .container-xxl .row { padding: 0; }
}

@media (min-width: 1200px) {
    .btn-duo, .btn-disabled {
        font-size: 40px;
    }
}

.form-server-error {
    background-color: #dc3545; 
    color: white; 
    border: none; 
    padding: 5px; 
    border-radius: 0;
    text-align: center; 
    font-size: 1.5em; 
    margin-bottom: -60px;
}    

.btn-disabled-finished, .btn-disabled-finished:hover { 
    background: none;
    border: none;
    margin: 0;
}

.btn-winners {
    font-size: 2.5vw;
    margin: 0;
}

.text-dark * { color: #000; }