@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-blur: 20px;
    --ios-blue: #417dc2;
    --ios-blue-hover: #3569a7;
    --ios-secondary-bg: rgba(255, 255, 255, 0.08);
    --ios-secondary-hover: rgba(255, 255, 255, 0.15);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
}

/* Background Shapes */
.bg-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    background: #0a0a0a;
}

.shape {
    position: absolute;
    filter: blur(80px);
    border-radius: 50%;
    opacity: 0.5;
    animation: floating 20s infinite alternate ease-in-out;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: #27272a; /* Zinc 800 */
    top: -100px;
    left: -100px;
}

.shape-2 {
    width: 500px;
    height: 500px;
    background: #18181b; /* Zinc 900 */
    bottom: -150px;
    right: -100px;
}

.shape-3 {
    width: 300px;
    height: 300px;
    background: #3f3f46; /* Zinc 700 */
    top: 40%;
    left: 60%;
    opacity: 0.2;
}

@keyframes floating {
    0% { transform: translateY(0) scale(1); }
    100% { transform: translateY(40px) scale(1.1); }
}

/* Glass Card */
.login-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 382px;
    z-index: 10;
    position: relative;
    transition: transform 0.3s ease;
}

/* Modern Inputs */
.modern-input {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px !important;
    color: #fff !important;
    padding: 12px 16px !important;
    font-size: 1rem !important;
    transition: all 0.2s ease !important;
}

.modern-input:focus {
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: var(--ios-blue) !important;
    box-shadow: 0 0 0 4px rgba(65, 125, 194, 0.2) !important;
    outline: none !important;
}

.modern-input::placeholder {
    color: rgba(255, 255, 255, 0.4) !important;
}

/* Modern Button */
.modern-button {
    background: var(--ios-blue) !important;
    color: white !important;
    border: none !important;
    border-radius: 14px !important;
    padding: 16px !important;
    font-weight: 600 !important;
    width: 100%;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 15px rgba(65, 125, 194, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.modern-button:hover {
    background: var(--ios-blue-hover) !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(65, 125, 194, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.modern-button:active {
    transform: scale(0.97);
}

.modern-button-secondary {
    background: var(--ios-secondary-bg) !important;
    backdrop-filter: blur(5px);
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 14px !important;
    padding: 16px !important;
    font-weight: 500 !important;
    width: 100%;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Labels and Typography */
.modern-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    display: block;
}

.modern-link {
    color: var(--ios-blue);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: opacity 0.2s;
}

.modern-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}


/* Eye Icon */
.password-container .eye-icon:hover {
    opacity: 1;
}

/* Fix for legacy background interference */
.bg-background,
.kt-theme-overlay,
.kt-cover-background {
    background: transparent !important;
}

[data-overlay-dark]:before {
    display: none !important;
}

.flex-root {
    background: transparent !important;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .login-card {
        padding: 1.5rem;
        border-radius: 20px;
    }
}

/* Modern Token Input */
.token-input-wrapper {
    display: grid !important;
    grid-template-columns: repeat(8, 1fr) !important;
    gap: 6px !important;
    margin: 25px 0 !important;
    width: 100% !important;
}

.token-digit-input {
    width: 100% !important;
    height: 50px !important;
    line-height: 50px !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 10px !important;
    color: #ffffff !important;
    font-size: 20px !important;
    font-weight: 600 !important;
    text-align: center !important;
    padding: 0 !important;
    outline: none !important;
    transition: all 0.2s ease !important;
    -webkit-appearance: none !important;
    box-sizing: border-box !important;
    text-transform: uppercase !important;
}

.token-digit-input:focus {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: #417dc2 !important;
    box-shadow: 0 0 15px rgba(65, 125, 194, 0.4) !important;
    transform: scale(1.08);
}

/* Fix for progress bar CSP */
#progress-code {
    height: 6px !important;
    border-radius: 3px !important;
    background: rgba(255,255,255,0.1) !important;
}
#progress-bar-code {
    border-radius: 3px !important;
}