* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #0f172a;
    background-image: url('/img/desktop-bg.jpeg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
}

@media (max-width: 768px) {
    body {
        background-image: url('/img/mobile-bg.jpeg');
    }
}

.login-container {
    position: relative;
    width: 100%;
    max-width: 450px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
}

.circles-wrapper {
    position: absolute;
    width: 100%;
    height: 100%;
    animation: rotate 20s linear infinite;
}

.circle {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 5px solid;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.circle:nth-child(1) {
    border-color: rgba(56, 189, 248, 0.4);
    animation: pulse1 3s ease-in-out infinite;
}

.circle:nth-child(2) {
    border-color: rgba(14, 165, 233, 0.3);
    animation: pulse2 3s ease-in-out infinite 0.5s;
}

.circle:nth-child(3) {
    border-color: rgba(6, 182, 212, 0.2);
    animation: pulse3 3s ease-in-out infinite 1s;
}

.circle:nth-child(4) {
    border-color: rgba(56, 189, 248, 0.1);
    animation: pulse4 3s ease-in-out infinite 1.5s;
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes pulse1 {
    0% {
        transform: translate(-50%, -50%) scale(0.95);
        opacity: 0.8;
        border-radius: 45% 55% 48% 52% / 42% 48% 52% 58%;
    }

    25% {
        transform: translate(-50%, -50%) scale(1.02);
        opacity: 0.9;
        border-radius: 58% 42% 55% 45% / 48% 62% 38% 52%;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.05);
        opacity: 1;
        border-radius: 52% 48% 62% 38% / 53% 45% 55% 47%;
    }

    75% {
        transform: translate(-50%, -50%) scale(0.98);
        opacity: 0.9;
        border-radius: 38% 62% 45% 55% / 58% 52% 48% 42%;
    }

    100% {
        transform: translate(-50%, -50%) scale(0.95);
        opacity: 0.8;
        border-radius: 45% 55% 48% 52% / 42% 48% 52% 58%;
    }
}

@keyframes pulse2 {
    0% {
        transform: translate(-50%, -50%) scale(0.92) rotate(10deg);
        opacity: 0.8;
        border-radius: 55% 45% 58% 42% / 52% 48% 52% 48%;
    }

    25% {
        transform: translate(-50%, -50%) scale(1.0) rotate(10deg);
        opacity: 0.9;
        border-radius: 42% 58% 45% 55% / 48% 60% 40% 52%;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.08) rotate(10deg);
        opacity: 1;
        border-radius: 48% 52% 40% 60% / 55% 45% 55% 45%;
    }

    75% {
        transform: translate(-50%, -50%) scale(1.0) rotate(10deg);
        opacity: 0.9;
        border-radius: 60% 40% 52% 48% / 42% 58% 42% 58%;
    }

    100% {
        transform: translate(-50%, -50%) scale(0.92) rotate(10deg);
        opacity: 0.8;
        border-radius: 55% 45% 58% 42% / 52% 48% 52% 48%;
    }
}

@keyframes pulse3 {
    0% {
        transform: translate(-50%, -50%) scale(0.98) rotate(-10deg);
        opacity: 0.8;
        border-radius: 40% 60% 52% 48% / 45% 55% 45% 55%;
    }

    25% {
        transform: translate(-50%, -50%) scale(1.05) rotate(-10deg);
        opacity: 0.9;
        border-radius: 52% 48% 45% 55% / 58% 42% 58% 42%;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.02) rotate(-10deg);
        opacity: 1;
        border-radius: 60% 40% 58% 42% / 52% 48% 52% 48%;
    }

    75% {
        transform: translate(-50%, -50%) scale(0.95) rotate(-10deg);
        opacity: 0.9;
        border-radius: 45% 55% 42% 58% / 40% 60% 40% 60%;
    }

    100% {
        transform: translate(-50%, -50%) scale(0.98) rotate(-10deg);
        opacity: 0.8;
        border-radius: 40% 60% 52% 48% / 45% 55% 45% 55%;
    }
}

@keyframes pulse4 {
    0% {
        transform: translate(-50%, -50%) scale(1) rotate(5deg);
        opacity: 0.8;
        border-radius: 48% 52% 55% 45% / 50% 50% 50% 50%;
    }

    25% {
        transform: translate(-50%, -50%) scale(1.08) rotate(5deg);
        opacity: 0.9;
        border-radius: 62% 38% 48% 52% / 45% 55% 45% 55%;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.1) rotate(5deg);
        opacity: 1;
        border-radius: 50% 50% 38% 62% / 58% 42% 58% 42%;
    }

    75% {
        transform: translate(-50%, -50%) scale(1.05) rotate(5deg);
        opacity: 0.9;
        border-radius: 38% 62% 52% 48% / 52% 48% 52% 48%;
    }

    100% {
        transform: translate(-50%, -50%) scale(1) rotate(5deg);
        opacity: 0.8;
        border-radius: 48% 52% 55% 45% / 50% 50% 50% 50%;
    }
}

.login-box {
    position: relative;
    z-index: 10;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 40px;
    border-radius: 24px;
    width: 100%;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

@media (max-width: 480px) {
    .login-box {
        padding: 30px 20px;
    }
}

h2 {
    color: #ffffff;
    margin-bottom: 30px;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.input-group {
    margin-bottom: 20px;
}

.input-group input {
    width: 100%;
    padding: 14px 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    background: rgba(255, 255, 255, 0.9);
    color: #1e293b;
}

.input-group input:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.2);
    background: #ffffff;
}

.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper input {
    width: 100%;
    padding-right: 44px;
}

.password-toggle {
    position: absolute;
    right: 12px;
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    transition: all 0.2s;
}

.password-toggle:hover {
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.1);
}

.password-toggle:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(139, 21, 56, 0.18);
}

.password-toggle:hover {
    background: #8b1538;
    color: #ffffff;
}

.sign-in-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 100%);
    border: none;
    border-radius: 14px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 10px;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sign-in-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(14, 165, 233, 0.4);
    background: linear-gradient(135deg, #7dd3fc 0%, #38bdf8 100%);
}

.sign-in-btn:active {
    transform: translateY(0);
}

.otp-inputs {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 25px;
}

.otp-input {
    width: 100%;
    height: 56px;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 8px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.9);
    color: #1e293b;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.otp-input:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.2);
    background: #ffffff;
    outline: none;
}

.phone-hint {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95em;
    margin-bottom: 25px;
    text-align: center;
    line-height: 1.5;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.trust-device-wrapper {
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9em;
    cursor: pointer;
    user-select: none;
}

.trust-device-wrapper input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #38bdf8;
}

.back-link {
    margin-top: 25px;
    text-align: center;
}

.back-link a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.85em;
    transition: color 0.2s;
}

.back-link a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.error-message {
    color: #fca5a5;
    background: rgba(153, 27, 27, 0.4);
    padding: 12px;
    border-radius: 12px;
    border: 1px solid rgba(248, 113, 113, 0.3);
    font-size: 0.9em;
    margin-bottom: 20px;
    backdrop-filter: blur(5px);
}

.links {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    font-size: 13px;
}

.links a {
    color: #8b1538;
    text-decoration: none;
    transition: all 0.3s ease;
}

.links a:hover {
    color: #00bcd4;
    text-decoration: underline;
}