/**
 * Tablet Connection Screen Styles
 * Figma Design Specifications - Responsive Design
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ========================================
   TABLET CONNECTION SCREEN (Root)
   ======================================== */

.tablet-welcome-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    overflow: hidden;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========================================
   WELCOME CONTAINER (Reused from welcome page structure)
   ======================================== */

.welcome-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: clamp(16px, 2.5vw, 32px);
    gap: clamp(12px, 1.8vw, 24px);
    isolation: isolate;
    position: relative;
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    max-height: 100vh;
    background: linear-gradient(119.8deg, #FFFDFA 0.51%, #FFFDFA 99.33%);
    box-sizing: border-box;
    opacity: 1;
    transform: rotate(0deg);
    margin: 0;
    overflow: hidden;
}

/* ========================================
   BG CONTAINER (Background with gradient and blobs)
   ======================================== */

/* Background container and blob styles are now in tablet-common.css */
/* Using .bg-container with fixed 1366px × 1024px dimensions and .blob-1, .blob-2 div elements */

/* ========================================
   IMAGE CONTAINER
   ======================================== */

.image-container {
    width: auto;
    min-width: clamp(280px, 46.8%, 639px);
    max-width: 50%;
    height: auto;
    min-height: clamp(400px, 93.75%, 960px);
    max-height: calc(100vh - clamp(32px, 5vw, 64px));
    aspect-ratio: 639 / 960;
    background: #000000;
    border-radius: clamp(12px, 1.75vw, 24px);
    flex: 1 1 0;
    order: 1;
    align-self: stretch;
    z-index: 1;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

.welcome-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: clamp(12px, 1.75vw, 24px);
}

/* ========================================
   MAIN CONTAINER (Right Side)
   ======================================== */

.main-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0px;
    isolation: isolate;
    width: auto;
    min-width: clamp(280px, 46.8%, 639px);
    max-width: 50%;
    height: auto;
    min-height: clamp(400px, 93.75%, 960px);
    max-height: calc(100vh - clamp(32px, 5vw, 64px));
    flex: 1 1 0;
    order: 2;
    align-self: stretch;
    z-index: 2;
    position: relative;
    box-sizing: border-box;
}

/* ========================================
   HEADER
   ======================================== */

.header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 0px;
    gap: 71px;
    position: absolute;
    height: 40px;
    left: 0px;
    right: 0px;
    top: 0px;
    flex: none;
    order: 1;
    flex-grow: 0;
    z-index: 1;
    box-sizing: border-box;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* Override common.css header background for connection page */
.tablet-welcome-screen .header,
.welcome-container .header,
.tablet-welcome-screen .welcome-container .header {
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.logo {
    flex: none;
    order: 0;
    flex-grow: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    height: clamp(32px, 3.9vh, 40px);
    overflow: visible;
}

.logo-icon {
    height: clamp(28px, 3.9vh, 40px);
    width: auto;
    max-width: clamp(140px, 15vw, 204.33px);
    opacity: 1;
    object-fit: contain;
    display: block;
}

.switcher {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 0px;
    gap: clamp(4px, 0.44vw, 6px);
    width: clamp(70px, 6.2vw, 85px);
    height: clamp(24px, 2.9vh, 30px);
    flex: none;
    order: 1;
    flex-grow: 0;
    background: transparent;
    border: none;
    cursor: pointer;
}

.switcher:hover {
    opacity: 0.8;
}

.switcher .lang-btn {
    width: clamp(45px, 4vw, 55px);
    height: clamp(24px, 2.9vh, 30px);
    font-family: 'Cairo', sans-serif;
    font-style: normal;
    font-weight: 600;
    font-size: clamp(16px, 1.46vw, 20px);
    line-height: 150%;
    color: #000000;
    flex: none;
    order: 1; /* Default: text button on the right */
    flex-grow: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
}

.switcher .lang-btn.active {
    display: none;
}

.switcher .lang-btn:not(.active) {
    display: flex;
}

.switcher .globe-icon {
    width: clamp(20px, 1.76vw, 24px);
    height: clamp(20px, 1.76vw, 24px);
    flex: none;
    order: 0; /* Default: globe icon on the left */
    flex-grow: 0;
    object-fit: contain;
    display: block;
    position: relative;
}

/* ========================================
   CONTENT CONTAINER
   ======================================== */

.content-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0px clamp(20px, 2.9vw, 40px);
    gap: clamp(16px, 3.1vw, 32px);
    width: 100%;
    max-width: 639px;
    height: 100%;
    min-height: clamp(400px, 93.75%, 960px);
    flex: none;
    order: 0;
    align-self: stretch;
    flex-grow: 1;
    z-index: 0;
    box-sizing: border-box;
}

/* ========================================
   TITLE AND SUBTITLE
   ======================================== */

.title {
    width: 100%;
    max-width: 559px;
    min-height: auto;
    font-family: 'Inter', sans-serif;
    font-style: normal;
    font-weight: 500;
    font-size: clamp(28px, 4.4vw, 60px);
    line-height: 120%;
    color: #000000;
    flex: none;
    order: 0;
    align-self: stretch;
    flex-grow: 0;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.subtitle {
    width: 100%;
    max-width: 559px;
    min-height: auto;
    font-family: 'Inter', sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: clamp(14px, 1.46vw, 20px);
    line-height: 150%;
    color: #45556C;
    flex: none;
    order: 1;
    align-self: stretch;
    flex-grow: 0;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ========================================
   BUTTON
   ======================================== */

.button {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: clamp(10px, 1.1vw, 14px) clamp(16px, 1.46vw, 20px) clamp(10px, 1.1vw, 14px) clamp(18px, 1.76vw, 24px);
    gap: clamp(6px, 0.59vw, 8px);
    width: 100%;
    max-width: 559px;
    height: clamp(48px, 6.25vh, 64px);
    min-height: 48px;
    background: linear-gradient(90deg, #0030FF 0%, #001D99 100%);
    border-radius: clamp(8px, 0.88vw, 12px);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    flex: none;
    order: 1;
    align-self: stretch;
    flex-grow: 0;
    box-sizing: border-box;
}

.button:hover {
    background: linear-gradient(90deg, #002AD9 0%, #001880 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 48, 255, 0.35);
}

.button:active {
    background: linear-gradient(90deg, #0025BF 0%, #001366 100%);
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 48, 255, 0.3);
}

.button .label {
    min-width: clamp(100px, 9.9vw, 135px);
    height: auto;
    min-height: clamp(28px, 3.5vh, 36px);
    font-family: 'Inter', sans-serif;
    font-style: normal;
    font-weight: 600;
    font-size: clamp(18px, 1.76vw, 24px);
    line-height: 150%;
    color: #FFFFFF;
    flex: none;
    order: 1;
    flex-grow: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.button .icon,
.button .arrow-icon {
    width: clamp(20px, 1.76vw, 24px);
    height: clamp(20px, 1.76vw, 24px);
    flex: none;
    order: 2;
    flex-grow: 0;
    object-fit: contain;
    display: block;
    filter: brightness(0) invert(1);
}

/* ========================================
   CONNECTION FORM STYLES
   ======================================== */

.connection-form-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: clamp(16px, 3.1vw, 32px);
    width: 100%;
    max-width: 559px;
    flex: none;
    order: 0;
    align-self: stretch;
    flex-grow: 0;
    box-sizing: border-box;
}

.connection-form-fields {
    display: flex;
    flex-direction: column;
    gap: clamp(16px, 2.3vw, 24px);
    width: 100%;
    max-width: 559px;
    flex: none;
    order: 1;
    align-self: stretch;
    flex-grow: 0;
    box-sizing: border-box;
    margin-top: 0;
}

.connection-form-wrapper .form-group {
    display: flex;
    flex-direction: column;
    gap: clamp(6px, 0.78vw, 8px);
    width: 100%;
    max-width: 559px;
    flex: none;
    order: 0;
    align-self: stretch;
    flex-grow: 0;
    box-sizing: border-box;
}

.connection-form-wrapper .form-group label {
    font-family: 'Inter', sans-serif;
    font-style: normal;
    font-weight: 500;
    font-size: clamp(14px, 1.17vw, 16px);
    line-height: 150%;
    color: #000000;
    margin: 0;
    padding: 0;
}

.connection-form-wrapper .form-control,
.connection-form-wrapper .connection-input {
    width: 100%;
    max-width: 559px;
    height: clamp(44px, 4.7vh, 48px);
    min-height: 44px;
    padding: clamp(10px, 0.88vw, 12px) clamp(14px, 1.17vw, 16px);
    font-family: 'Inter', sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: clamp(14px, 1.17vw, 16px);
    line-height: 150%;
    color: #000000;
    background: #FFFFFF;
    border: 1px solid #D1D5DB;
    border-radius: clamp(6px, 0.59vw, 8px);
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.connection-form-wrapper .form-control:focus,
.connection-form-wrapper .connection-input:focus {
    outline: none;
    border-color: #0030FF;
    box-shadow: 0 0 0 3px rgba(0, 48, 255, 0.1);
}

.connection-form-wrapper .form-control:hover,
.connection-form-wrapper .connection-input:hover {
    border-color: #9CA3AF;
}

.connection-status-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: clamp(16px, 3.1vw, 32px);
    width: 100%;
    max-width: 559px;
    flex: none;
    order: 0;
    align-self: stretch;
    flex-grow: 0;
    box-sizing: border-box;
}

.connection-success-icon {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: clamp(60px, 5.86vw, 80px);
    height: clamp(60px, 5.86vw, 80px);
    margin: 0;
    padding: 0;
    flex: none;
    order: 0;
    flex-grow: 0;
    box-sizing: border-box;
}

.connection-success-icon i {
    font-size: clamp(60px, 5.86vw, 80px);
    color: #10B981;
    line-height: 1;
}

.connection-info-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    max-width: 559px;
    flex: none;
    order: 2;
    align-self: stretch;
    flex-grow: 0;
    box-sizing: border-box;
}

.connection-info-item {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: clamp(10px, 0.88vw, 12px) 0;
    border-bottom: 1px solid #E5E7EB;
    width: 100%;
    max-width: 559px;
    box-sizing: border-box;
}

.connection-info-item:last-child {
    border-bottom: none;
}

.connection-label {
    font-family: 'Inter', sans-serif;
    font-style: normal;
    font-weight: 500;
    font-size: clamp(14px, 1.17vw, 16px);
    line-height: 150%;
    color: #45556C;
    margin: 0;
    padding: 0;
}

.connection-value {
    font-family: 'Inter', sans-serif;
    font-style: normal;
    font-weight: 600;
    font-size: clamp(14px, 1.17vw, 16px);
    line-height: 150%;
    color: #000000;
    margin: 0;
    padding: 0;
}

/* ========================================
   LOADING INDICATOR
   ======================================== */

.loading-indicator {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    padding: clamp(24px, 3.9vh, 40px) clamp(40px, 4.4vw, 60px);
    border-radius: clamp(8px, 0.88vw, 12px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    font-family: 'Inter', sans-serif;
}

.loading-spinner {
    width: clamp(40px, 3.9vw, 50px);
    height: clamp(40px, 3.9vw, 50px);
    border: clamp(3px, 0.29vw, 4px) solid #E0E7FF;
    border-top: clamp(3px, 0.29vw, 4px) solid #0030FF;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto clamp(16px, 1.95vh, 20px);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-size: clamp(14px, 1.17vw, 16px);
    font-weight: 500;
    color: #1F2937;
}

/* ========================================
   RTL SUPPORT
   ======================================== */

.tablet-welcome-screen[dir="rtl"] {
    direction: rtl;
}

.tablet-welcome-screen[dir="rtl"] .header {
    flex-direction: row-reverse;
}

.tablet-welcome-screen[dir="rtl"] .logo {
    order: 2;
}

/* LTR (English) - Explicit styling */
/* When English is active, show Arabic button with globe icon on the left */
.tablet-welcome-screen[dir="ltr"] .switcher,
.tablet-welcome-screen:not([dir]) .switcher {
    order: 1;
    flex-direction: row;
}

.tablet-welcome-screen[dir="ltr"] .switcher .lang-btn,
.tablet-welcome-screen:not([dir]) .switcher .lang-btn {
    text-align: left;
    order: 1; /* Text button on the right */
}

.tablet-welcome-screen[dir="ltr"] .switcher .globe-icon,
.tablet-welcome-screen:not([dir]) .switcher .globe-icon {
    order: 0; /* Globe icon on the left */
}

/* RTL (Arabic) - Explicit styling */
/* When Arabic is active, show English button with globe icon on the right */
.tablet-welcome-screen[dir="rtl"] .switcher {
    order: 1;
    flex-direction: row-reverse;
}

.tablet-welcome-screen[dir="rtl"] .switcher .lang-btn {
    text-align: right;
    order: 1; /* Text button on the left (due to row-reverse) */
}

.tablet-welcome-screen[dir="rtl"] .switcher .globe-icon {
    order: 0; /* Globe icon on the right (due to row-reverse) */
}

.tablet-welcome-screen[dir="rtl"] .button {
    flex-direction: row-reverse;
}

.tablet-welcome-screen[dir="rtl"] .button .arrow-icon {
    transform: scaleX(-1) !important;
    order: 0;
}

.tablet-welcome-screen[dir="rtl"] .button .icon {
    transform: scaleX(-1) !important;
    order: 0;
}

.tablet-welcome-screen[dir="rtl"] .button .label {
    order: 1;
}

.tablet-welcome-screen[dir="rtl"] .title,
.tablet-welcome-screen[dir="rtl"] .subtitle {
    text-align: right;
}

.tablet-welcome-screen[dir="rtl"] .connection-form-wrapper,
.tablet-welcome-screen[dir="rtl"] .connection-status-wrapper {
    align-items: flex-end;
}

.tablet-welcome-screen[dir="rtl"] .connection-form-wrapper .form-group label,
.tablet-welcome-screen[dir="rtl"] .connection-info-item {
    text-align: right;
}

.tablet-welcome-screen[dir="rtl"] .connection-info-item {
    flex-direction: row-reverse;
}

/* ========================================
   RESPONSIVE MEDIA QUERIES
   ======================================== */

/* Laptop and Desktop Optimization (1024px - 1919px) - Better fit for 15.6" laptops */
@media screen and (min-width: 1024px) and (max-width: 1919px) {
    .welcome-container {
        width: 100vw;
        max-width: 100vw;
        height: 100vh;
        max-height: 100vh;
        padding: clamp(12px, 1.8vw, 24px);
        justify-content: space-between;
    }
    
    .image-container,
    .main-container {
        flex: 1 1 0;
        min-width: 0;
        max-width: none;
    }
    
    .image-container {
        max-width: 50%;
    }
    
    .main-container {
        max-width: 50%;
    }
}

/* Ultra-wide screens (1920px+) - Full width scaling */
@media screen and (min-width: 1920px) {
    .welcome-container {
        width: 100vw;
        max-width: 100vw;
        height: 100vh;
        max-height: 100vh;
        padding: clamp(16px, 0.83vw, 32px);
        justify-content: space-between;
        gap: clamp(12px, 0.63vw, 24px);
    }
    
    .image-container {
        flex: 1 1 0;
        min-width: clamp(400px, 33.3vw, 639px);
        max-width: 50%;
    }
    
    .main-container {
        flex: 1 1 0;
        min-width: clamp(400px, 33.3vw, 639px);
        max-width: 50%;
    }
    
    .content-container {
        padding: 0px clamp(20px, 1.04vw, 40px);
        gap: clamp(16px, 3.1vw, 32px);
    }
    
    .title {
        font-size: clamp(48px, 4.4vw, 60px);
    }
    
    .subtitle {
        font-size: clamp(18px, 1.46vw, 20px);
    }
    
    .button {
        height: clamp(56px, 6.25vh, 64px);
        padding: clamp(12px, 1.1vw, 14px) clamp(18px, 1.46vw, 24px);
    }
}

/* Tablet Portrait and Small Laptops (768px - 1023px) */
@media screen and (max-width: 1023px) {
    .welcome-container {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
        max-height: 100vh;
        padding: clamp(12px, 2vw, 24px);
        gap: clamp(16px, 2.5vw, 24px);
        overflow-y: auto;
        width: 100%;
        max-width: 100%;
    }
    
    .image-container,
    .main-container {
        width: 100%;
        max-width: 100%;
        min-width: unset;
        height: auto;
        min-height: auto;
        flex: 0 0 auto;
    }
    
    .image-container {
        max-height: 50vh;
        aspect-ratio: 16 / 9;
    }
    
    .main-container {
        flex: 1;
        min-height: auto;
    }
    
    .content-container {
        padding: clamp(16px, 3vw, 32px);
        height: auto;
        min-height: auto;
    }
    
    .title {
        font-size: clamp(32px, 5vw, 48px);
    }
    
    .subtitle {
        font-size: clamp(16px, 2vw, 18px);
    }
    
    .button {
        width: 100%;
        max-width: 100%;
    }
    
    .connection-form-wrapper,
    .connection-status-wrapper {
        width: 100%;
        max-width: 100%;
    }
    
    .connection-form-fields {
        width: 100%;
        max-width: 100%;
    }
    
    .connection-form-wrapper .form-group {
        width: 100%;
        max-width: 100%;
    }
    
    .connection-form-wrapper .form-control,
    .connection-form-wrapper .connection-input {
        width: 100%;
        max-width: 100%;
    }
    
    .connection-info-list {
        width: 100%;
        max-width: 100%;
    }
    
    .connection-info-item {
        width: 100%;
        max-width: 100%;
    }
}

/* Mobile Landscape and Small Tablets (480px - 767px) - Professional */
@media screen and (max-width: 767px) and (min-width: 480px) {
    .welcome-container {
        padding: 0;
        gap: 0;
        justify-content: flex-start;
    }
    
    .header {
        position: sticky;
        top: 0;
        z-index: 100;
        gap: clamp(14px, 4.5vw, 22px);
        height: clamp(60px, 7vh, 68px);
        padding: clamp(14px, 3vw, 20px) clamp(20px, 4vw, 28px);
        background: rgba(255, 253, 250, 0.95);
        background: transparent;
        margin-bottom: clamp(12px, 2.5vh, 20px);
    }
    
    .logo-icon {
        height: clamp(30px, 5vh, 38px);
        max-width: clamp(130px, 22vw, 170px);
    }
    
    .switcher {
        width: clamp(72px, 13vw, 88px);
        height: clamp(34px, 4.5vh, 40px);
        gap: clamp(5px, 1.5vw, 7px);
        border-radius: clamp(9px, 2.2vw, 11px);
    }
    
    .switcher .lang-btn {
        width: clamp(42px, 9vw, 52px);
        height: clamp(34px, 4.5vh, 40px);
        font-size: clamp(14px, 3vw, 17px);
        font-weight: 500;
    }
    
    .switcher .globe-icon {
        width: clamp(19px, 3.5vw, 23px);
        height: clamp(19px, 3.5vw, 23px);
    }
    
    .image-container {
        width: 100%;
        max-width: 100%;
        min-width: unset;
        max-height: clamp(320px, 42vh, 400px);
        min-height: clamp(320px, 42vh, 400px);
        border-radius: 0;
        margin-bottom: clamp(24px, 4.5vh, 36px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    }
    
    .welcome-image {
        border-radius: 0;
    }
    
    .main-container {
        width: 100%;
        max-width: 100%;
        min-width: unset;
        flex: 1 1 auto;
        padding: 0;
    }
    
    .content-container {
        width: 100%;
        padding: 0 clamp(24px, 5vw, 32px) clamp(28px, 6vh, 44px);
        gap: clamp(28px, 5.5vh, 40px);
        align-items: flex-start;
    }
    
    .text-container {
        width: 100%;
        gap: clamp(14px, 3vh, 20px);
        align-items: flex-start;
    }
    
    .tablet-welcome-screen[dir="rtl"] .text-container {
        align-items: flex-end;
    }
    
    .title {
        font-size: clamp(32px, 6.5vw, 40px);
        line-height: 1.25;
        font-weight: 700;
        letter-spacing: -0.02em;
    }
    
    .subtitle {
        font-size: clamp(16px, 3.5vw, 18px);
        line-height: 1.6;
        color: rgba(69, 85, 108, 0.8);
    }
    
    .connection-form-wrapper,
    .connection-status-wrapper {
        width: 100%;
        max-width: 100%;
        gap: clamp(24px, 5vh, 32px);
    }
    
    .connection-form-fields {
        width: 100%;
        gap: clamp(20px, 4vh, 26px);
    }
    
    .connection-form-wrapper .form-group label {
        font-size: clamp(15px, 3.2vw, 17px);
        font-weight: 500;
        margin-bottom: clamp(10px, 2vh, 12px);
    }
    
    .connection-form-wrapper .form-control,
    .connection-form-wrapper .connection-input {
        width: 100%;
        height: clamp(52px, 7.5vh, 58px);
        font-size: clamp(16px, 3.5vw, 18px);
        padding: 0 clamp(18px, 4vw, 22px);
        border-radius: clamp(11px, 2.5vw, 13px);
    }
    
    .button {
        width: 100%;
        max-width: 100%;
        height: clamp(54px, 8vh, 62px);
        padding: 0 clamp(24px, 5.5vw, 32px);
        border-radius: clamp(12px, 2.5vw, 14px);
        gap: clamp(12px, 2.5vw, 16px);
        margin-top: clamp(10px, 2vh, 14px);
        box-shadow: 0 4px 12px rgba(0, 38, 204, 0.25);
        font-weight: 600;
    }
    
    .button .label {
        font-size: clamp(17px, 4vw, 19px);
        font-weight: 600;
    }
    
    .button .icon,
    .button .arrow-icon {
        width: clamp(21px, 4.5vw, 25px);
        height: clamp(21px, 4.5vw, 25px);
    }
    
    .connection-success-icon {
        width: clamp(70px, 10vw, 85px);
        height: clamp(70px, 10vw, 85px);
        margin-bottom: clamp(20px, 3.5vh, 28px);
    }
    
    .connection-success-icon i {
        font-size: clamp(70px, 10vw, 85px);
    }
    
    .connection-info-list {
        width: 100%;
        gap: clamp(16px, 3.5vh, 20px);
    }
    
    .connection-info-item {
        padding: clamp(16px, 3.5vh, 20px);
        border-radius: clamp(11px, 2.5vw, 13px);
    }
    
    .connection-label,
    .connection-value {
        font-size: clamp(15px, 3.2vw, 17px);
        font-weight: 500;
    }
    
    .blob-1,
    .blob-2 {
        opacity: 0.2;
    }
}

/* Mobile Portrait (up to 479px) - Professional & Organized */
@media screen and (max-width: 479px) {
    .welcome-container {
        padding: 0;
        gap: 0;
        justify-content: flex-start;
        overflow-y: auto;
        overflow-x: hidden;
    }
    
    /* Header - Professional spacing and alignment */
    .header {
        position: sticky;
        top: 0;
        z-index: 100;
        gap: clamp(12px, 4vw, 20px);
        height: clamp(40px, 5vh, 48px);
        padding: 0px;
        background: transparent;
        margin-bottom: clamp(8px, 2vh, 16px);
    }
    
    .logo-icon {
        height: clamp(28px, 5.5vh, 36px);
        max-width: clamp(110px, 28vw, 150px);
    }
    
    .switcher {
        width: clamp(70px, 18vw, 85px);
        height: clamp(32px, 5vh, 38px);
        gap: clamp(4px, 1.2vw, 6px);
        border-radius: clamp(8px, 2vw, 10px);
    }
    
    .switcher .lang-btn {
        width: clamp(38px, 11vw, 48px);
        height: clamp(32px, 5vh, 38px);
        font-size: clamp(13px, 3.8vw, 16px);
        font-weight: 500;
        border-radius: clamp(6px, 1.8vw, 8px);
    }
    
    .switcher .globe-icon {
        width: clamp(18px, 4.5vw, 22px);
        height: clamp(18px, 4.5vw, 22px);
    }
    
    /* Image Container - Better proportions and spacing */
    .image-container {
        width: 100%;
        max-width: 100%;
        min-width: unset;
        max-height: clamp(280px, 40vh, 360px);
        min-height: clamp(280px, 40vh, 360px);
        height: auto;
        aspect-ratio: 16 / 10;
        border-radius: 0;
        margin-bottom: clamp(20px, 4vh, 32px);
        flex: 0 0 auto;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    }
    
    .welcome-image {
        border-radius: 0;
    }
    
    /* Main Container - Professional content organization */
    .main-container {
        width: 100%;
        max-width: 100%;
        min-width: unset;
        min-height: auto;
        max-height: none;
        flex: 1 1 auto;
        padding: 0;
        align-items: stretch;
        justify-content: flex-start;
    }
    
    /* Content Container - Organized spacing */
    .content-container {
        width: 100%;
        padding: 0 clamp(20px, 5.5vw, 28px) clamp(24px, 6vh, 40px);
        gap: clamp(24px, 5.5vh, 36px);
        align-items: flex-start;
        max-width: 100%;
    }
    
    /* Text Container - Professional typography spacing */
    .text-container {
        width: 100%;
        gap: clamp(12px, 3vh, 18px);
        align-items: flex-start;
        text-align: left;
    }
    
    .tablet-welcome-screen[dir="rtl"] .text-container {
        text-align: right;
        align-items: flex-end;
    }
    
    /* Title - Better hierarchy */
    .title {
        font-size: clamp(28px, 7.5vw, 36px);
        line-height: 1.25;
        font-weight: 700;
        letter-spacing: -0.02em;
        margin: 0;
        width: 100%;
        max-width: 100%;
    }
    
    /* Subtitle - Professional spacing */
    .subtitle {
        font-size: clamp(15px, 4vw, 17px);
        line-height: 1.6;
        font-weight: 400;
        color: rgba(69, 85, 108, 0.8);
        margin: 0;
        width: 100%;
        max-width: 100%;
    }
    
    /* Connection Form Wrapper - Professional form layout */
    .connection-form-wrapper,
    .connection-status-wrapper {
        width: 100%;
        max-width: 100%;
        gap: clamp(20px, 4.5vh, 28px);
    }
    
    .connection-form-fields {
        width: 100%;
        gap: clamp(18px, 4vh, 24px);
    }
    
    .connection-form-wrapper .form-group {
        width: 100%;
        margin-bottom: 0;
        gap: clamp(8px, 2vh, 10px);
    }
    
    .connection-form-wrapper .form-group label {
        font-size: clamp(14px, 3.8vw, 16px);
        font-weight: 500;
        margin-bottom: clamp(8px, 2vh, 10px);
        color: #45556C;
    }
    
    .connection-form-wrapper .form-control,
    .connection-form-wrapper .connection-input {
        width: 100%;
        height: clamp(50px, 7.5vh, 56px);
        font-size: clamp(15px, 4vw, 17px);
        padding: 0 clamp(16px, 4vw, 20px);
        border-radius: clamp(10px, 2.5vw, 12px);
        border: 1.5px solid rgba(69, 85, 108, 0.2);
        transition: all 0.3s ease;
    }
    
    .connection-form-wrapper .form-control:focus,
    .connection-form-wrapper .connection-input:focus {
        border-color: #0026CC;
        box-shadow: 0 0 0 3px rgba(0, 38, 204, 0.1);
        outline: none;
    }
    
    /* Button - Professional CTA design */
    .button {
        width: 100%;
        max-width: 100%;
        height: clamp(52px, 7.5vh, 60px);
        padding: 0 clamp(20px, 5vw, 28px);
        border-radius: clamp(12px, 3vw, 14px);
        gap: clamp(10px, 2.5vw, 14px);
        margin-top: clamp(8px, 2vh, 12px);
        box-shadow: 0 4px 12px rgba(0, 38, 204, 0.25);
        font-weight: 600;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .button:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(0, 38, 204, 0.35);
    }
    
    .button .label {
        font-size: clamp(16px, 4.2vw, 18px);
        font-weight: 600;
        letter-spacing: 0.01em;
    }
    
    .button .icon,
    .button .arrow-icon {
        width: clamp(20px, 4.5vw, 24px);
        height: clamp(20px, 4.5vw, 24px);
    }
    
    /* Connection Status - Professional success display */
    .connection-success-icon {
        width: clamp(64px, 12vw, 80px);
        height: clamp(64px, 12vw, 80px);
        margin-bottom: clamp(16px, 3vh, 24px);
    }
    
    .connection-success-icon i {
        font-size: clamp(64px, 12vw, 80px);
    }
    
    .connection-info-list {
        width: 100%;
        gap: clamp(14px, 3vh, 18px);
    }
    
    .connection-info-item {
        width: 100%;
        padding: clamp(14px, 3vh, 18px);
        border-radius: clamp(10px, 2.5vw, 12px);
        background: rgba(255, 255, 255, 0.6);
        border: 1px solid rgba(69, 85, 108, 0.1);
    }
    
    .connection-label,
    .connection-value {
        font-size: clamp(14px, 3.8vw, 16px);
        font-weight: 500;
    }
    
    /* Background - Subtle on mobile */
    .blob-1,
    .blob-2 {
        opacity: 0.15;
        filter: blur(clamp(50px, 18vw, 90px));
    }
    
    /* Ensure no horizontal overflow */
    .welcome-container,
    .main-container,
    .content-container,
    .text-container,
    .connection-form-wrapper,
    .connection-status-wrapper {
        overflow-x: hidden;
    }
}

/* Landscape Orientation Adjustments */
@media screen and (max-height: 600px) and (orientation: landscape) {
    .welcome-container {
        flex-direction: row;
        padding: clamp(8px, 1.5vh, 16px);
        gap: clamp(8px, 2vw, 16px);
    }
    
    .image-container {
        max-height: 90vh;
        width: auto;
        flex: 0 1 40%;
    }
    
    .main-container {
        flex: 0 1 60%;
        height: 100%;
    }
    
    .content-container {
        padding: clamp(8px, 2vh, 16px);
        gap: clamp(12px, 3vh, 20px);
        height: 100%;
    }
    
    .title {
        font-size: clamp(20px, 4vh, 32px);
    }
    
    .subtitle {
        font-size: clamp(12px, 2vh, 16px);
    }
    
    .button {
        height: clamp(36px, 7vh, 48px);
    }
    
    .header {
        height: clamp(24px, 5vh, 32px);
    }
    
    .connection-form-wrapper,
    .connection-status-wrapper {
        gap: clamp(12px, 3vh, 20px);
    }
    
    .connection-form-fields {
        gap: clamp(12px, 2.5vh, 18px);
    }
}

/* ========================================
   16:10 Aspect Ratio Support
   ======================================== */

/* 16:10 Aspect Ratio (1.6:1) - Common tablet/laptop screens */
@media screen and (min-aspect-ratio: 15/10) and (max-aspect-ratio: 17/10) {
    .tablet-welcome-screen {
        width: 100vw;
        height: 100vh;
        overflow-y: auto;
        overflow-x: hidden;
    }
    
    .welcome-container {
        width: 100vw;
        max-width: 100vw;
        height: 100vh;
        min-height: 100vh;
        overflow-y: auto;
        overflow-x: hidden;
    }
    
    .tablet-header {
        padding: clamp(14px, 2vh, 18px) clamp(24px, 2.5vw, 32px);
        height: auto;
        min-height: clamp(60px, 8vh, 75px);
        gap: clamp(40px, 5vw, 60px);
    }
    
    .tablet-header .tablet-logo-icon {
        max-width: clamp(180px, 20vw, 220px);
        height: clamp(38px, 5vh, 42px);
    }
    
    .connection-content {
        padding: 0 clamp(24px, 2.5vw, 32px);
        margin-top: clamp(80px, 10vh, 100px);
        padding-bottom: clamp(24px, 3vh, 32px);
    }
    
    .connection-form {
        max-width: clamp(400px, 50vw, 500px);
    }
}