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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #ffffff;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.page-container {
    width: 100%;
    max-width: 1440px;
    padding: 40px 60px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Container */
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 80px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo-small img {
    width: 117px;
    height: 41.8px;
    object-fit: contain;
}

/* Device Badge */
.device-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background-color: #894382;
    color: white;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.device-icon {
    width: 18px;
    height: 18px;
}

.language-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.language-toggle:hover {
    background-color: #f5f5f5;
}

.world-icon {
    width: 20px;
    height: 20px;
    color: #333;
}

.language-text {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

.arrow-icon {
    width: 16px;
    height: 16px;
    color: #333;
}

/* Main Container */
.main-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 60px;
    flex: 1;
}

/* Login Section */
.login-section {
    flex: 1;
    max-width: 500px;
}

.welcome-title {
    font-size: 42px;
    font-weight: 700;
    color: #333;
    margin-bottom: 12px;
    line-height: 1.2;
}

.welcome-subtitle {
    font-size: 16px;
    color: #666;
    margin-bottom: 40px;
    line-height: 1.5;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.form-group input {
    padding: 16px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: #fff;
}

.form-group input:focus {
    outline: none;
    border-color: #894382;
    box-shadow: 0 0 0 3px rgba(137, 67, 130, 0.1);
}

.form-group input::placeholder {
    color: #999;
}

/* Password Input with Toggle */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper input {
    width: 100%;
    padding-right: 50px;
}

.toggle-password {
    position: absolute;
    right: 16px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: color 0.2s ease;
}

.toggle-password:hover {
    color: #894382;
}

/* Login Button */
.login-button {
    padding: 16px 32px;
    background-color: #F2BA7F;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 56px;
}

.login-button.valid {
    background-color: #894382;
}

.login-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.login-button:active:not(:disabled) {
    transform: translateY(0);
}

.login-button:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.login-button.loading .button-text {
    display: none;
}

.login-button.loading .button-loader {
    display: flex !important;
}

/* Spinner Animation */
.spinner {
    animation: rotate 1s linear infinite;
}

.spinner-track {
    opacity: 0.25;
}

.spinner-fill {
    animation: dash 1.5s ease-in-out infinite;
}

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

@keyframes dash {
    0% {
        stroke-dasharray: 1, 63;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 30, 63;
        stroke-dashoffset: -15;
    }
    100% {
        stroke-dasharray: 1, 63;
        stroke-dashoffset: -63;
    }
}

/* Logo Section */
.logo-section {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo-large {
    width: 812px;
    height: 525px;
    object-fit: contain;
}

/* Responsive Design for 1024px */
@media (max-width: 1024px) {
    .page-container {
        padding: 30px 40px;
    }

    .header-container {
        margin-bottom: 60px;
    }

    .main-container {
        gap: 40px;
    }

    .welcome-title {
        font-size: 36px;
        margin-bottom: 10px;
    }

    .welcome-subtitle {
        margin-bottom: 32px;
    }

    .logo-large {
        width: 600px;
        height: 388px;
    }

    .login-section {
        max-width: 400px;
    }
}

/* Scale down logo for medium screens (669px to 768px) */
@media (min-width: 669px) and (max-width: 768px) {
    .logo-large {
        width: 400px;
        height: 259px;
    }
}

/* Scale down logo for smaller screens (390px to 668px) */
@media (min-width: 390px) and (max-width: 668px) {
    .logo-large {
        width: 300px;
        height: 194px;
    }
}

/* Hide large logo for screens less than 530px */
@media (max-width: 530px) {
    .logo-section {
        display: none;
    }
    
    .header-right {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .device-badge {
        font-size: 12px;
        padding: 6px 12px;
    }
}

/* Additional responsive adjustments */
@media (max-width: 768px) {
    .main-container {
        flex-direction: row;
        gap: 40px;
    }

    .login-section {
        max-width: 100%;
    }
    
    .welcome-title {
        font-size: 32px;
    }
}

@media (max-width: 480px) {
    .page-container {
        padding: 20px;
    }
    
    .header-container {
        margin-bottom: 40px;
    }
    
    .welcome-title {
        font-size: 28px;
    }
    
    .welcome-subtitle {
        font-size: 14px;
    }
    
    .form-group input {
        padding: 14px 16px;
    }
    
    .login-button {
        padding: 14px 24px;
        font-size: 16px;
    }
}
