* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

/* Mobile Phone Container */
.phone-container {
    width: 375px;
    height: 812px;
    background-color: #000;
    border-radius: 40px;
    padding: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
    max-width: 100%;
}

/* Splash Screen */
.splash-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #003956;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3000;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
    border-radius: 40px;
}

.splash-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.splash-logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeInScale 1s ease-out;
}

.splash-logo {
    max-width: 200px;
    width: 70%;
    height: auto;
    display: block;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Status Bar */
.status-bar {
    background-color: #003956;
    padding: 8px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #ffffff;
    font-weight: 500;
    height: 44px;
}

.status-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

.time {
    font-weight: 600;
}

.notification-icon,
.wifi-icon,
.signal-strength {
    font-size: 14px;
}

.network-speed {
    font-size: 10px;
}

.network-type {
    font-size: 11px;
}

.battery {
    font-size: 11px;
}

/* Important Notice Modal */
.notice-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3500;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    border-radius: 40px;
}

.notice-overlay.active {
    opacity: 1;
    visibility: visible;
}

.notice-modal {
    width: 90%;
    max-width: 340px;
    background-color: #ffffff;
    border-radius: 20px;
    padding: 0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.notice-overlay.active .notice-modal {
    transform: scale(1);
}

.notice-content {
    padding: 30px 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.notice-logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 25px;
}

.notice-logo {
    max-width: 180px;
    width: 70%;
    height: auto;
    display: block;
}

.notice-title {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 20px;
    text-align: center;
}

.notice-text {
    margin-bottom: 30px;
    text-align: left;
}

.notice-text p {
    font-size: 14px;
    color: #333;
    line-height: 1.6;
    margin-bottom: 12px;
}

.notice-understand-btn {
    width: 100%;
    padding: 16px;
    background-color: #003956;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    text-transform: capitalize;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.notice-understand-btn:hover {
    background-color: #002d3f;
}

/* Mobile Content */
.mobile-content {
    background-color: #ffffff;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    width: 100%;
    max-width: 100%;
}

/* Curved blue background section - touches left and right edges */
.mobile-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 30%;
    background-color: #003956;
    border-radius: 0 0 20% 20%;
    z-index: 1;
}

/* Top section with logo */
.top-section {
    background-color: transparent;
    padding: 20px 20px 40px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    flex: 0 0 auto;
    min-height: 200px;
    position: relative;
    z-index: 2;
}

/* OTP Screen - Move logo up */
.otp-screen .top-section {
    padding: 10px 20px 40px;
    min-height: 150px;
}

.logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo {
    max-width: 200px;
    width: 70%;
    height: auto;
    display: block;
}

/* White card section */
.white-card {
    background-color: transparent;
    padding: 30px 25px;
    flex: 1;
    position: relative;
    z-index: 2;
}

.welcome-text {
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 30px;
}

.input-group {
    margin-bottom: 25px;
}

.phone-input-container {
    display: flex;
    align-items: center;
    border: 1.5px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    background-color: #ffffff;
}

.country-code {
    background-color: #f5f5f5;
    padding: 14px 16px;
    font-size: 16px;
    font-weight: 500;
    color: #333;
    border-right: 1.5px solid #e0e0e0;
    min-width: 70px;
    text-align: center;
}

.phone-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 14px 16px;
    font-size: 16px;
    color: #333;
    background-color: #ffffff;
}

.phone-input::placeholder {
    color: #999;
}

.phone-input:focus {
    background-color: #fafafa;
}

.terms-text {
    font-size: 12px;
    color: #666;
    line-height: 1.5;
    margin-top: 20px;
    text-align: left;
}

.link {
    color: #0066cc;
    text-decoration: none;
}

.link:hover {
    text-decoration: underline;
}

/* Next button */
.next-button {
    width: calc(100% - 50px);
    margin: 20px auto;
    padding: 16px;
    background-color: #d0d0d0;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: block;
    position: relative;
    z-index: 2;
}

.next-button:enabled {
    background-color: #0066cc;
    cursor: pointer;
}

.next-button:enabled:hover {
    background-color: #0052a3;
}

.next-button:disabled {
    background-color: #d0d0d0;
    cursor: not-allowed;
}

/* Popup Overlay */
.popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: transparent;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    border-radius: 40px;
}

.popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.popup-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 90%;
    max-width: 340px;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    max-width: 100%;
    padding: 0 10px;
}

.popup-overlay.active .popup-wrapper {
    transform: scale(1);
}

.popup-container {
    width: 100%;
    background-color: #ffffff;
    border-radius: 20px;
    padding: 0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    margin-bottom: 20px;
    min-height: 360px;
    max-width: 100%;
    box-sizing: border-box;
}

.popup-content {
    padding: 36px 25px 40px 25px;
    display: flex;
    flex-direction: column;
    min-height: 360px;
}

.popup-title {
    font-size: 24px;
    font-weight: 600;
    color: #003956;
    margin-bottom: 15px;
    text-align: center;
}

.popup-subtitle {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 30px;
    text-align: center;
    padding: 0 10px;
}

.popup-input-group {
    margin-bottom: 25px;
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

.popup-country-code-box {
    background-color: #ffffff;
    padding: 14px 12px;
    font-size: 16px;
    font-weight: 500;
    color: #333;
    border: 1.5px solid #e0e0e0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 90px;
    flex-shrink: 0;
    box-sizing: border-box;
}

.popup-phone-input {
    flex: 1;
    border: 1.5px solid #e0e0e0;
    outline: none;
    padding: 14px 16px;
    font-size: 16px;
    color: #333;
    background-color: #ffffff;
    border-radius: 12px;
    min-width: 0;
    box-sizing: border-box;
}

.popup-phone-input::placeholder {
    color: #999;
}

.popup-phone-input:focus {
    background-color: #fafafa;
}

.popup-terms-text {
    font-size: 12px;
    color: #666;
    line-height: 1.5;
    margin-top: 15px;
    text-align: center;
    width: 100%;
    max-width: 340px;
}

.popup-link {
    color: #0066cc;
    text-decoration: none;
}

.popup-link:hover {
    text-decoration: underline;
}

.popup-next-button {
    width: 100%;
    padding: 16px;
    background-color: #d0d0d0;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: block;
    margin-bottom: 20px;
    margin-top: 10px;
}

.popup-next-button:enabled {
    background-color: #0066cc;
    cursor: pointer;
}

.popup-next-button:enabled:hover {
    background-color: #0052a3;
}

.popup-next-button:disabled {
    background-color: #d0d0d0;
    cursor: not-allowed;
}

/* OTP Screen */
.otp-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    z-index: 2000;
    overflow: hidden;
}

.otp-screen.active {
    display: block;
}

.otp-screen .mobile-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2001;
}

.otp-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: transparent;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 2001;
    opacity: 1;
    visibility: visible;
    border-radius: 40px;
}

.otp-popup-overlay .popup-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 90%;
    max-width: 340px;
    transform: scale(1);
}

.otp-greeting {
    font-size: 24px;
    font-weight: 600;
    color: #003956;
    margin-bottom: 10px;
    text-align: center;
}

.otp-phone-number {
    font-size: 18px;
    color: #333;
    margin-bottom: 10px;
    text-align: center;
    font-weight: 500;
}

.otp-message {
    font-size: 14px;
    color: #666;
    margin-bottom: 30px;
    text-align: center;
    line-height: 1.5;
}

.pin-input-container {
    display: flex;
    align-items: center;
    border: 1.5px solid #e0e0e0;
    border-radius: 12px;
    padding: 0;
    margin-bottom: 25px;
    width: 100%;
    background-color: #ffffff;
    overflow: hidden;
}

.pin-label {
    padding: 14px 16px;
    font-size: 16px;
    font-weight: 500;
    color: #333;
    border-right: 1.5px solid #e0e0e0;
    background-color: #f5f5f5;
    margin: 0;
    flex-shrink: 0;
}

.pin-input-field {
    width: 100%;
    border: none;
    outline: none;
    padding: 14px 16px;
    font-size: 16px;
    color: #333;
    background-color: #ffffff;
}

.pin-input-field::placeholder {
    color: #999;
}

.pin-input-field:focus {
    background-color: #fafafa;
}

.resend-otp-btn {
    width: 100%;
    padding: 12px;
    background-color: transparent;
    color: #0066cc;
    border: 1.5px solid #0066cc;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

.resend-otp-btn:hover:not(:disabled) {
    background-color: #0066cc;
    color: #ffffff;
}

.resend-otp-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    color: #999;
    border-color: #ccc;
}

.verify-otp-btn {
    width: 100%;
    padding: 16px;
    background-color: #d0d0d0;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-bottom: 25px;
}

.verify-otp-btn:enabled {
    background-color: #0066cc;
    cursor: pointer;
}

.verify-otp-btn:enabled:hover {
    background-color: #0052a3;
}

.verify-otp-btn:disabled {
    background-color: #d0d0d0;
    cursor: not-allowed;
}

.verify-button {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(90% - 40px);
    max-width: 300px;
    padding: 16px;
    background-color: #d0d0d0;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: block;
    z-index: 2002;
}

.verify-button:enabled {
    background-color: #0066cc;
    cursor: pointer;
    transform: translateX(-50%);
}

.verify-button:enabled:hover {
    background-color: #0052a3;
    transform: translateX(-50%);
}

.verify-button:disabled {
    background-color: #d0d0d0;
    cursor: not-allowed;
    transform: translateX(-50%);
}

/* Loader */
.loader-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 4000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    border-radius: 40px;
}

.loader-overlay.active {
    opacity: 1;
    visibility: visible;
}

.loader {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top-color: #FFD700;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Success Screen */
.success-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    z-index: 3000;
}

.success-screen.active {
    display: block;
}

.success-content {
    padding: 40px 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 400px;
}

.success-title {
    font-size: 24px;
    font-weight: 700;
    color: #003956;
    margin-bottom: 20px;
    text-align: center;
}

.success-subtitle {
    font-size: 18px;
    color: #333;
    margin-bottom: 30px;
    text-align: center;
    font-weight: 500;
}

.success-message {
    font-size: 14px;
    color: #666;
    line-height: 1.8;
    text-align: center;
    max-width: 300px;
}

.success-message p {
    margin-bottom: 15px;
}

.success-message p:last-child {
    margin-bottom: 0;
}

/* Responsive design for smaller screens */
@media (max-width: 768px) {
    body {
        padding: 0;
        background: #ffffff;
    }

    .phone-container {
        width: 100%;
        height: 100vh;
        border-radius: 0;
        padding: 0;
        box-shadow: none;
        background-color: transparent;
        max-width: 100%;
    }
    
    .mobile-content {
        border-radius: 0;
        width: 100%;
        max-width: 100%;
    }
    
    .splash-screen {
        border-radius: 0;
    }
    
    .popup-overlay {
        border-radius: 0;
    }
    
    .popup-wrapper {
        width: 100%;
        max-width: 100%;
        padding: 0 15px;
    }
    
    .popup-container {
        width: 100%;
        max-width: 100%;
    }
    
    .notice-overlay {
        border-radius: 0;
    }
    
    .notice-modal {
        width: 95%;
        max-width: 100%;
    }
    
    .loader-overlay {
        border-radius: 0;
    }
    
    .otp-screen {
        border-radius: 0;
    }
    
    .otp-popup-overlay {
        border-radius: 0;
    }
    
    .otp-popup-overlay .popup-wrapper {
        width: 100%;
        max-width: 100%;
        padding: 0 15px;
    }
    
    .popup-content {
        padding: 30px 20px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .popup-input-group {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .popup-country-code-box,
    .popup-phone-input {
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .pin-input-container {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .pin-input-field {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .popup-next-button,
    .verify-otp-btn,
    .resend-otp-btn {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .popup-terms-text {
        width: 100%;
        max-width: 100%;
        padding: 0 10px;
        box-sizing: border-box;
    }
}

@media (max-width: 480px) {
    body {
        padding: 0;
        background: #ffffff;
    }

    .phone-container {
        width: 100%;
        height: 100vh;
        border-radius: 0;
        padding: 0;
        box-shadow: none;
        background-color: transparent;
        max-width: 100%;
    }

    .status-bar {
        padding: 8px 15px;
    }

    .top-section {
        padding: 40px 15px 30px;
        min-height: 220px;
    }

    .logo {
        max-width: 180px;
    }

    .white-card {
        padding: 25px 20px;
    }

    .welcome-text {
        font-size: 20px;
        margin-bottom: 25px;
    }

    .country-code {
        padding: 12px 14px;
        font-size: 15px;
        min-width: 65px;
    }

    .phone-input {
        padding: 12px 14px;
        font-size: 15px;
    }

    .next-button {
        width: calc(100% - 40px);
        padding: 14px;
        font-size: 15px;
    }
}
