/* Vault Phoenix AR Crypto Gaming - LOGIN PAGE STYLES (COMPLETE & SELF-CONTAINED) */
/* PROTECTION: Only affects crypto-game/ folder - prevents main site interference */
/* FILE PATH: crypto-game/login.css */

/* =================== CSS CUSTOM PROPERTIES FOR MOBILE HEIGHTS =================== */
:root {
    --vh: 1vh;
    --real-vh: 100vh;
}

/* =================== CRITICAL: LOCK PAGE IN PLACE - PREVENT ANY MOVEMENT OR ZOOM =================== */
html, body {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    overscroll-behavior: none !important;
    touch-action: manipulation !important;
    -webkit-overflow-scrolling: touch !important;
    -webkit-user-select: none !important;
    user-select: none !important;
    /* CRITICAL: Prevent ALL zooming */
    -webkit-text-size-adjust: 100% !important;
    -moz-text-size-adjust: 100% !important;
    -ms-text-size-adjust: 100% !important;
    text-size-adjust: 100% !important;
}

/* Mobile browser height fixes */
html {
    height: -webkit-fill-available !important;
}

body {
    min-height: 100vh !important;
    min-height: -webkit-fill-available !important;
}

/* =================== GLOBAL RESET FOR LOGIN PAGE ONLY =================== */
.crypto-login-page *,
.crypto-login-page *::before,
.crypto-login-page *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    overscroll-behavior: none !important;
    /* Prevent text selection and zoom */
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
}

/* Allow text selection only for inputs */
.crypto-login-page input,
.crypto-login-page textarea {
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
    user-select: text !important;
}

/* =================== FULL SCREEN LOGIN PAGE STYLES =================== */
body.crypto-login-page {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif !important;
    background: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 25%, #2d1810 50%, #451a03 75%, #7c2d12 100%) !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    min-height: 100vh !important;
    min-height: -webkit-fill-available !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    /* PERFECT FLEXBOX CENTERING - ABSOLUTELY CENTERED */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: white !important;
    overscroll-behavior: none !important;
    touch-action: manipulation !important;
    -webkit-overflow-scrolling: touch !important;
    -webkit-appearance: none !important;
    flex-direction: column !important;
    padding: 10px !important;
}

/* Background coverage fix for mobile */
body.crypto-login-page::before {
    content: '';
    position: fixed;
    top: -20px;
    left: -20px;
    width: calc(100vw + 40px);
    height: calc(100vh + 40px);
    height: calc(-webkit-fill-available + 40px);
    background: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 25%, #2d1810 50%, #451a03 75%, #7c2d12 100%);
    z-index: -1;
}

/* =================== FULL SCREEN FLOATING BACKGROUND ELEMENTS =================== */
.crypto-login-page .floating-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
    min-height: -webkit-fill-available;
    overflow: hidden;
    z-index: 5;
    pointer-events: none;
}

/* Ensure content layering */
.crypto-login-page .phoenix-glow-bg {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 600px;
    height: 600px;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(240, 165, 0, 0.15) 0%, rgba(215, 51, 39, 0.08) 40%, transparent 70%);
    border-radius: 50%;
    z-index: 3;
    animation: phoenixGlow 12s ease-in-out infinite;
    pointer-events: none;
}

.crypto-login-page .login-container {
    position: relative;
    z-index: 10;
}

.crypto-login-page .floating-coin {
    position: absolute;
    animation: phoenixFloat 25s ease-in-out infinite;
    opacity: 0.3;
    pointer-events: none;
    z-index: 1;
}

.crypto-login-page .floating-coin-image {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 50%;
    filter: drop-shadow(0 4px 16px rgba(240, 165, 0, 0.5));
    transition: all 0.3s ease;
}

.crypto-login-page .floating-coin-1 { top: 8%; left: 5%; animation-delay: 0s; animation-duration: 30s; }
.crypto-login-page .floating-coin-2 { top: 15%; right: 8%; animation-delay: 5s; animation-duration: 25s; }
.crypto-login-page .floating-coin-3 { bottom: 20%; left: 10%; animation-delay: 10s; animation-duration: 35s; }
.crypto-login-page .floating-coin-4 { bottom: 12%; right: 12%; animation-delay: 15s; animation-duration: 28s; }
.crypto-login-page .floating-coin-5 { top: 55%; left: 3%; animation-delay: 8s; animation-duration: 32s; }
.crypto-login-page .floating-coin-6 { top: 75%; right: 5%; animation-delay: 20s; animation-duration: 27s; }

/* =================== LOGIN CONTAINER =================== */
.crypto-login-page .login-container {
    /* PERFECT MATHEMATICAL CENTERING */
    position: relative;
    z-index: 10;
    background: rgba(12, 12, 12, 0.97);
    backdrop-filter: blur(25px);
    border-radius: 22px;
    padding: 16px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.8),
        0 10px 30px rgba(240, 165, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        0 0 0 2px rgba(240, 165, 0, 0.3);
    /* GUARANTEED CENTER CALCULATION */
    width: 82%;
    max-width: 365px;
    max-height: 87vh;
    border: 2px solid rgba(240, 165, 0, 0.45);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    color: white;
    /* ABSOLUTE PERFECT CENTERING */
    margin: 0 auto !important;
    transform: translateX(0px) !important; /* NO OFFSET - PURE CENTER */
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.crypto-login-page .login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(240, 165, 0, 0.08) 0%, rgba(215, 51, 39, 0.04) 50%, rgba(251, 146, 60, 0.08) 100%);
    z-index: -1;
    border-radius: 20px;
}

/* =================== COMPACT LOGO SECTION =================== */
.crypto-login-page .logo-section {
    text-align: center;
    margin-bottom: 12px;
    position: relative;
}

.crypto-login-page .app-logo {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    margin: 0 auto 8px;
    box-shadow: 0 8px 24px rgba(240, 165, 0, 0.6);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(240, 165, 0, 0.2), rgba(251, 146, 60, 0.15));
    border: 2px solid rgba(240, 165, 0, 0.4);
}

.crypto-login-page .logo-image {
    width: 34px;
    height: 34px;
    object-fit: contain;
    transition: all 0.4s ease;
    position: relative;
    z-index: 2;
    filter: brightness(1.1);
}

.crypto-login-page .logo-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, rgba(240, 165, 0, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.crypto-login-page .app-logo:hover {
    transform: scale(1.1) rotate(8deg);
    box-shadow: 0 12px 32px rgba(240, 165, 0, 0.8);
}

.crypto-login-page .app-logo:hover .logo-glow {
    opacity: 1;
}

.crypto-login-page .app-title {
    font-size: 20px;
    font-weight: 900;
    background: linear-gradient(135deg, #f0a500 0%, #fb923c 50%, #d73327 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 2px;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 4px rgba(240, 165, 0, 0.3);
}

.crypto-login-page .app-subtitle {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* =================== DEMO BADGE =================== */
.crypto-login-page .demo-badge {
    background: linear-gradient(135deg, rgba(240, 165, 0, 0.25), rgba(215, 51, 39, 0.16));
    border: 2px solid rgba(240, 165, 0, 0.5);
    border-radius: 12px;
    padding: 8px;
    margin-bottom: 12px;
    text-align: center;
    font-size: 10px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 16px rgba(240, 165, 0, 0.2);
}

.crypto-login-page .demo-badge-title {
    color: #f0a500;
    font-weight: 800;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 11px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.crypto-login-page .demo-badge-icon {
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, rgba(240, 165, 0, 0.25), rgba(251, 146, 60, 0.2));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(240, 165, 0, 0.5);
    transition: transform 0.3s ease;
    box-shadow: 0 3px 12px rgba(240, 165, 0, 0.4);
}

.crypto-login-page .demo-badge-icon:hover {
    transform: scale(1.08);
}

.crypto-login-page .demo-coin-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
    filter: brightness(1.2) drop-shadow(0 2px 4px rgba(240, 165, 0, 0.4));
}

.crypto-login-page .demo-credentials {
    color: rgba(255, 255, 255, 0.95);
    font-weight: 700;
    line-height: 1.3;
    background: rgba(0, 0, 0, 0.4);
    padding: 6px 10px;
    border-radius: 6px;
    margin: 4px auto 0 auto;
    border: 1px solid rgba(240, 165, 0, 0.3);
    font-size: 11px;
    backdrop-filter: blur(5px);
    text-align: center;
    width: fit-content;
    max-width: 90%;
}

/* =================== FORM STYLES =================== */
.crypto-login-page .form-group {
    margin-bottom: 12px;
    position: relative;
}

.crypto-login-page .form-input {
    width: 100%;
    padding: 10px 12px 10px 36px;
    border: 2px solid rgba(240, 165, 0, 0.4);
    border-radius: 8px;
    font-size: 16px; /* Keep at 16px to prevent iOS zoom */
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(15px);
    color: white;
    font-weight: 500;
    position: relative;
    z-index: 2;
    min-height: 44px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    box-sizing: border-box;
}

.crypto-login-page .form-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

.crypto-login-page .form-input:focus {
    outline: none;
    border-color: #f0a500;
    box-shadow: 0 0 0 3px rgba(240, 165, 0, 0.3), 0 4px 12px rgba(240, 165, 0, 0.2);
    background: rgba(0, 0, 0, 0.7);
    transform: translateY(-1px);
}

.crypto-login-page .input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(240, 165, 0, 0.8);
    z-index: 3;
    transition: all 0.4s ease;
    width: 14px;
    height: 14px;
}

.crypto-login-page .form-input:focus + .input-glow + .input-icon {
    color: #f0a500;
    transform: translateY(-50%) scale(1.15);
}

.crypto-login-page .input-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 8px;
    background: linear-gradient(45deg, transparent, rgba(240, 165, 0, 0.15), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.crypto-login-page .form-input:focus + .input-glow {
    opacity: 1;
}

/* =================== LOGIN BUTTON =================== */
.crypto-login-page .login-button {
    width: 100%;
    padding: 11px;
    background: linear-gradient(135deg, #f0a500 0%, #fb923c 50%, #d73327 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 5px 18px rgba(240, 165, 0, 0.5);
    position: relative;
    overflow: hidden;
    margin-bottom: 12px;
    min-height: 44px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-sizing: border-box;
}

.crypto-login-page .login-text-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    position: relative;
    z-index: 2;
}

.crypto-login-page .login-main-text {
    font-size: 12px;
    font-weight: 900;
    display: flex;
    align-items: center;
    gap: 6px;
}

.crypto-login-page .login-sub-text {
    font-size: 10px;
    opacity: 0.9;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0.2px;
}

.crypto-login-page .button-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.8s ease;
    z-index: 1;
}

.crypto-login-page .login-button:hover .button-glow {
    left: 100%;
}

.crypto-login-page .login-button:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 32px rgba(240, 165, 0, 0.7);
}

.crypto-login-page .login-button:active {
    transform: scale(0.98);
}

.crypto-login-page .login-flame-icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
    filter: brightness(1.4) drop-shadow(0 1px 3px rgba(0, 0, 0, 0.3));
    z-index: 2;
    position: relative;
}

/* =================== CRYPTO FEATURES =================== */
.crypto-login-page .crypto-features {
    margin: 10px 0;
    padding: 10px;
    background: linear-gradient(135deg, rgba(240, 165, 0, 0.16), rgba(251, 146, 60, 0.11));
    border-radius: 12px;
    border: 2px solid rgba(240, 165, 0, 0.35);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 16px rgba(240, 165, 0, 0.2);
}

.crypto-login-page .features-title {
    text-align: center;
    font-size: 11px;
    font-weight: 800;
    color: #f0a500;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.crypto-login-page .feature-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 10px;
    color: white;
    font-weight: 600;
    transition: all 0.4s ease;
    padding: 3px 5px;
    border-radius: 5px;
    margin-bottom: 3px;
    line-height: 1.2;
}

.crypto-login-page .feature-item:last-child {
    margin-bottom: 0;
}

.crypto-login-page .feature-item:hover {
    transform: translateX(3px);
    color: #f0a500;
    background: rgba(240, 165, 0, 0.15);
}

.crypto-login-page .feature-icon {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    flex-shrink: 0;
    background: linear-gradient(135deg, rgba(240, 165, 0, 0.2), rgba(251, 146, 60, 0.15));
    border: 1px solid rgba(240, 165, 0, 0.4);
    box-shadow: 0 1px 3px rgba(240, 165, 0, 0.3);
}

.crypto-login-page .feature-coin,
.crypto-login-page .feature-safe,
.crypto-login-page .feature-money {
    width: 12px;
    height: 12px;
    object-fit: contain;
    transition: all 0.4s ease;
    filter: brightness(1.2);
}

.crypto-login-page .feature-item:hover .feature-coin,
.crypto-login-page .feature-item:hover .feature-safe,
.crypto-login-page .feature-item:hover .feature-money {
    transform: scale(1.1) rotate(2deg);
}

.crypto-login-page .feature-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 10px;
    line-height: 1.2;
    font-weight: 600;
}

/* =================== FORGOT PASSWORD LINK =================== */
.crypto-login-page .forgot-password {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 15;
    text-align: center !important;
    width: auto !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

.crypto-login-page .forgot-password a {
    color: #f0a500;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.4s ease;
    position: relative;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    padding: 6px 14px;
    border-radius: 6px;
    background: rgba(240, 165, 0, 0.15);
    border: 2px solid rgba(240, 165, 0, 0.4);
    white-space: nowrap;
}

.crypto-login-page .forgot-password a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #f0a500, #fb923c);
    transition: all 0.4s ease;
    transform: translateX(-50%);
}

.crypto-login-page .forgot-password a:hover::after {
    width: 100%;
}

.crypto-login-page .forgot-password a:hover {
    color: #fb923c;
    transform: translateY(-2px);
    background: rgba(240, 165, 0, 0.2);
}

/* =================== ERROR/SUCCESS MESSAGES =================== */
.crypto-login-page .error-message, 
.crypto-login-page .success-message {
    padding: 8px 12px;
    border-radius: 8px;
    margin-bottom: 12px;
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    display: none;
    animation: messageSlideIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    line-height: 1.2;
    word-wrap: break-word;
    min-height: 32px;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    box-sizing: border-box;
}

.crypto-login-page .error-message {
    background: rgba(244, 67, 54, 0.3);
    border: 2px solid rgba(244, 67, 54, 0.7);
    color: #ffaaaa;
    box-shadow: 0 4px 16px rgba(244, 67, 54, 0.3);
}

.crypto-login-page .success-message {
    background: rgba(76, 175, 80, 0.3);
    border: 2px solid rgba(76, 175, 80, 0.7);
    color: #aaffaa;
    box-shadow: 0 4px 16px rgba(76, 175, 80, 0.3);
}

/* =================== LOADING STATES =================== */
.crypto-login-page .loading-spinner {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-right: 5px;
}

.crypto-login-page .loading {
    opacity: 0.85;
    pointer-events: none;
}

.crypto-login-page .loading .login-container {
    transform: scale(1.01);
}

.crypto-login-page .loading .login-button {
    background: linear-gradient(135deg, #888, #aaa);
    box-shadow: none;
    transform: none;
}

/* =================== ANIMATIONS =================== */
@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes phoenixFloat {
    0%, 100% { 
        transform: translateY(0px) translateX(0px) scale(1) rotate(0deg); 
        opacity: 0.25; 
    }
    20% { 
        transform: translateY(-15px) translateX(10px) scale(1.05) rotate(45deg); 
        opacity: 0.35; 
    }
    40% { 
        transform: translateY(-30px) translateX(20px) scale(1.15) rotate(90deg); 
        opacity: 0.4; 
    }
    60% { 
        transform: translateY(-20px) translateX(-25px) scale(0.85) rotate(180deg); 
        opacity: 0.3; 
    }
    80% { 
        transform: translateY(-35px) translateX(30px) scale(1.2) rotate(270deg); 
        opacity: 0.45; 
    }
}

@keyframes phoenixGlow {
    0%, 100% { 
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.5;
    }
    33% { 
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.7;
    }
    66% { 
        transform: translate(-50%, -50%) scale(1.4);
        opacity: 0.8;
    }
}

@keyframes messageSlideIn {
    0% { 
        opacity: 0; 
        transform: translateY(-12px) scale(0.9);
        filter: blur(4px);
    }
    50% {
        opacity: 0.7;
        transform: translateY(-4px) scale(0.98);
        filter: blur(2px);
    }
    100% { 
        opacity: 1; 
        transform: translateY(0) scale(1); 
        filter: blur(0px);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
    20%, 40%, 60%, 80% { transform: translateX(4px); }
}

/* =================== MOBILE RESPONSIVE BREAKPOINTS =================== */
@media (max-width: 375px) {
    .crypto-login-page .login-container {
        padding: 14px;
        max-width: 350px;
        max-height: 85vh;
        width: 84%;
    }
    
    .crypto-login-page .app-logo {
        width: 44px;
        height: 44px;
    }
    
    .crypto-login-page .logo-image {
        width: 32px;
        height: 32px;
    }
    
    .crypto-login-page .app-title {
        font-size: 18px;
    }
    
    .crypto-login-page .form-input {
        padding: 9px 11px 9px 34px;
        min-height: 42px;
    }
    
    .crypto-login-page .input-icon {
        left: 11px;
        width: 13px;
        height: 13px;
    }
    
    .crypto-login-page .login-button {
        padding: 10px;
        min-height: 42px;
    }
    
    .crypto-login-page .login-flame-icon {
        width: 26px;
        height: 26px;
    }

    .crypto-login-page .feature-item {
        font-size: 9px;
        gap: 7px;
        padding: 2px 4px;
    }

    .crypto-login-page .feature-icon {
        width: 16px;
        height: 16px;
    }

    .crypto-login-page .feature-coin,
    .crypto-login-page .feature-safe,
    .crypto-login-page .feature-money {
        width: 11px;
        height: 11px;
    }
    
    .crypto-login-page .feature-text {
        font-size: 9px;
    }
}

@media (max-width: 320px) {
    .crypto-login-page .login-container {
        padding: 12px;
        max-width: 310px;
        max-height: 82vh;
        width: 86%;
    }
    
    .crypto-login-page .app-logo {
        width: 40px;
        height: 40px;
    }
    
    .crypto-login-page .logo-image {
        width: 28px;
        height: 28px;
    }
    
    .crypto-login-page .app-title {
        font-size: 16px;
    }
    
    .crypto-login-page .login-flame-icon {
        width: 24px;
        height: 24px;
    }

    .crypto-login-page .feature-item {
        font-size: 8px;
        gap: 6px;
        padding: 2px 3px;
    }

    .crypto-login-page .feature-icon {
        width: 14px;
        height: 14px;
    }

    .crypto-login-page .feature-coin,
    .crypto-login-page .feature-safe,
    .crypto-login-page .feature-money {
        width: 10px;
        height: 10px;
    }
    
    .crypto-login-page .feature-text {
        font-size: 8px;
    }
}

/* =================== LANDSCAPE MODE OPTIMIZATION =================== */
@media (max-height: 600px) and (orientation: landscape) {
    body.crypto-login-page {
        padding: 6px !important;
    }
    
    .crypto-login-page .login-container {
        max-height: 94vh;
        padding: 10px;
        max-width: 370px;
    }
    
    .crypto-login-page .forgot-password {
        bottom: 4px;
    }
}

/* =================== MOBILE VIEWPORT HEIGHT FIX FOR iOS SAFARI =================== */
@supports (-webkit-touch-callout: none) {
    body.crypto-login-page {
        height: -webkit-fill-available !important;
        min-height: -webkit-fill-available !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .crypto-login-page .floating-elements {
        height: -webkit-fill-available !important;
        min-height: -webkit-fill-available !important;
    }
    
    .crypto-login-page .login-container {
        align-self: center !important;
        justify-self: center !important;
    }
}

/* =================== ACCESSIBILITY =================== */
@media (prefers-reduced-motion: reduce) {
    .crypto-login-page *,
    .crypto-login-page *::before,
    .crypto-login-page *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .crypto-login-page .floating-coin {
        animation: none !important;
        opacity: 0.2 !important;
    }
    
    .crypto-login-page .phoenix-glow-bg {
        animation: none !important;
    }
    
    .crypto-login-page .loading-spinner {
        animation: spin 1s linear infinite !important;
    }
}

/* =================== HIGH CONTRAST MODE =================== */
@media (prefers-contrast: high) {
    .crypto-login-page .login-container {
        border: 3px solid #f0a500;
        background: rgba(0, 0, 0, 0.95);
    }
    
    .crypto-login-page .form-input {
        border: 2px solid #f0a500;
        background: rgba(0, 0, 0, 0.9);
    }
    
    .crypto-login-page .login-button {
        border: 2px solid #ffffff;
    }
}

/* =================== CRITICAL FIX: ENSURE FORM SUBMISSION WORKS =================== */
.crypto-login-page form {
    width: 100%;
}

.crypto-login-page form input {
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
    user-select: text !important;
}

/* Fix input autofill */
.crypto-login-page .form-input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px rgba(0, 0, 0, 0.5) inset !important;
    -webkit-text-fill-color: white !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* Prevent double-tap zoom specifically */
.crypto-login-page .login-button,
.crypto-login-page .form-input,
.crypto-login-page .forgot-password a {
    touch-action: manipulation;
}

/* Force hardware acceleration for smooth animations */
.crypto-login-page .login-container,
.crypto-login-page .login-button,
.crypto-login-page .form-input {
    will-change: transform;
    transform: translateZ(0);
}

/* =================== FOCUS MANAGEMENT FOR KEYBOARD USERS =================== */
.crypto-login-page .form-input:focus-visible {
    outline: 3px solid #f0a500;
    outline-offset: 2px;
}

.crypto-login-page .login-button:focus-visible {
    outline: 3px solid #ffffff;
    outline-offset: 2px;
}

.crypto-login-page .forgot-password a:focus-visible {
    outline: 2px solid #f0a500;
    outline-offset: 1px;
}

/* =================== ENSURE TEXT REMAINS SELECTABLE WHERE NEEDED =================== */
.crypto-login-page .app-title,
.crypto-login-page .app-subtitle,
.crypto-login-page .demo-credentials,
.crypto-login-page .features-title,
.crypto-login-page .feature-text,
.crypto-login-page .error-message,
.crypto-login-page .success-message {
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
    user-select: text !important;
}

/* =================== FINAL POLISH AND PERFORMANCE OPTIMIZATIONS =================== */
.crypto-login-page .login-container,
.crypto-login-page .app-logo,
.crypto-login-page .form-input,
.crypto-login-page .login-button {
    contain: layout style paint;
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* =================== ENSURE CRISP RENDERING ON HIGH-DPI DISPLAYS =================== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .crypto-login-page .logo-image,
    .crypto-login-page .demo-coin-icon,
    .crypto-login-page .login-flame-icon,
    .crypto-login-page .feature-coin,
    .crypto-login-page .feature-safe,
    .crypto-login-page .feature-money {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}
