:root {
  --primary-red: #E60000;
    --primary-red-glow: rgba(230, 0, 0, 0.25);
    --bg-dark: #0a0a0a;
    --bg-card: #141414;
    --bg-card-hover: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --border-color: #2a2a2a;
    --border-glow: rgba(230, 0, 0, 0.3);
    --success: #10b981;
    --success-glow: rgba(16, 185, 129, 0.25);
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    height: 100%;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, var(--bg-dark) 0%, #1a0000 100%);
    color: var(--text-primary);
    height: 100%;
    min-height: 100vh;
}

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 100vh;
    padding: 1rem;
}

.login-box {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 20px;
    padding: 2.5rem;
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
    box-shadow: 0 10px 40px rgba(230, 0, 0, 0.2);
    overflow: hidden;
}

.logo-container {
    text-align: center;
    margin-bottom: 2rem;
}

.logo-container img {
    width: 100px;
    margin-bottom: 1rem;
    filter: drop-shadow(0 4px 12px rgba(230, 0, 0, 0.3));
}

.logo-container h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
    background: linear-gradient(135deg, var(--primary-red), #ff4444);
    -webkit-background-clip: text;
 -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-container p {
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
  font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.login-box form {
    width: 100%;
}

.input-with-icon {
  position: relative;
    display: block;
    width: 100%;
}

.input-with-icon .bi {
    position: absolute;
    top: 50%;
    left: 15px;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 1.2rem;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 2;
}

.input-with-icon .form-control:focus ~ .bi {
    color: var(--primary-red);
    transform: translateY(-50%) scale(1.1);
}

/* Validation states */
.input-with-icon.success .bi {
    color: var(--success);
}

.input-with-icon.error .bi {
    color: #ff4444;
}

/* Add check/error icons */
.input-with-icon.success::after {
    content: '?';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--success);
    font-weight: bold;
    font-size: 1.2rem;
    animation: scaleIn 0.3s ease;
}

.input-with-icon.error::after {
    content: '?';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #ff4444;
    font-weight: bold;
    font-size: 1.2rem;
    animation: shake 0.5s ease;
}

@keyframes scaleIn {
    from {
        transform: translateY(-50%) scale(0);
        opacity: 0;
    }
    to {
        transform: translateY(-50%) scale(1);
        opacity: 1;
    }
}

@keyframes shake {
    0%, 100% { transform: translateY(-50%) translateX(0); }
    25% { transform: translateY(-50%) translateX(-5px); }
    75% { transform: translateY(-50%) translateX(5px); }
}

.form-control {
    display: block;
  width: 100%;
    padding: 0.85rem 1rem 0.85rem 3rem;
    background: var(--bg-dark);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(230, 0, 0, 0.1);
}

.btn-submit {
    width: 100%;
    padding: 0.85rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-red), #c00);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
 cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(230, 0, 0, 0.4);
}

.btn-submit:active {
transform: translateY(0);
}

.text-danger {
    color: #ff4d4d;
    font-size: 0.8rem;
    margin-top: 0.4rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 77, 77, 0.1);
    border-left: 3px solid #ff4d4d;
    border-radius: 0 6px 6px 0;
    animation: slideInLeft 0.3s ease;
}

.text-danger::before {
    content: '?';
    font-size: 1rem;
}

@keyframes slideInLeft {
    from {
        transform: translateX(-10px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Button loading state */
.btn-submit.loading,
.btn-verify.loading {
    pointer-events: none;
    opacity: 0.7;
    position: relative;
}

.btn-submit.loading span,
.btn-verify.loading span {
    opacity: 0;
}

.btn-submit.loading::after,
.btn-verify.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Success message */
.success-message {
    color: var(--success);
    font-size: 0.85rem;
    margin-top: 0.4rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.75rem;
    background: rgba(16, 185, 129, 0.1);
    border-left: 3px solid var(--success);
    border-radius: 0 6px 6px 0;
    animation: slideInLeft 0.3s ease;
}

.success-message::before {
    content: '?';
    font-size: 1rem;
    font-weight: bold;
}

/* Modern OTP Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal-overlay.show {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.otp-modal-content {
    background: var(--bg-card);
    border: 2px solid var(--primary-red);
    border-radius: 24px;
    padding: 2.5rem;
    width: 90%;
    max-width: 480px;
    box-shadow: 0 20px 60px rgba(230, 0, 0, 0.3);
    animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideUp {
    from {
 transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.otp-header {
    text-align: center;
    margin-bottom: 2rem;
}

.otp-icon-wrapper {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--primary-red), #ff4444);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
 animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
  box-shadow: 0 0 0 0 rgba(230, 0, 0, 0.7);
    }
    50% {
      transform: scale(1.05);
        box-shadow: 0 0 0 15px rgba(230, 0, 0, 0);
    }
}

.otp-icon-wrapper i {
  font-size: 2.5rem;
    color: white;
}

.otp-header h2 {
    margin: 0 0 0.75rem;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
}

.otp-subtitle {
    color: var(--text-secondary);
    margin: 0;
    font-size: 0.95rem;
}

.phone-display {
    margin: 0.5rem 0 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-red);
}

.otp-input-section {
    margin-bottom: 1.5rem;
}

.otp-label {
    display: block;
    text-align: center;
    margin-bottom: 1rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
 letter-spacing: 0.05em;
}

.otp-boxes {
 display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.otp-box {
    width: 60px;
    height: 60px;
    background: var(--bg-dark);
border: 2px solid var(--border-color);
 border-radius: 12px;
    text-align: center;
    font-size: 1.8rem;
  font-weight: 700;
    color: var(--text-primary);
    transition: all 0.3s ease;
    caret-color: var(--primary-red);
}

.otp-box:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(230, 0, 0, 0.2);
    transform: scale(1.05);
}

.otp-box:not(:placeholder-shown) {
    border-color: var(--success);
}

.error-message {
    background: rgba(255, 77, 77, 0.1);
    border: 1px solid #ff4d4d;
    border-radius: 12px;
    padding: 0.85rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #ff4d4d;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.error-message i {
    font-size: 1.2rem;
}

.otp-actions {
    margin-bottom: 1.5rem;
}

.btn-verify {
    width: 100%;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, var(--success), #059669);
    border: none;
    border-radius: 12px;
    color: white;
 font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-verify:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
}

.btn-verify:active {
    transform: translateY(0);
}

.otp-footer {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.resend-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0 0 0.75rem;
}

.btn-resend {
    background: none;
    border: none;
    color: var(--primary-red);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: all 0.3s ease;
    padding: 0.5rem;
}

.btn-resend:hover {
    text-decoration: underline;
    transform: scale(1.05);
}

.demo-hint {
    margin-top: 1.5rem;
    padding: 0.75rem;
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 10px;
text-align: center;
    color: #ffc107;
    font-size: 0.85rem;
    display: flex;
  align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.demo-hint strong {
    font-weight: 700;
    color: white;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .login-box,
    .otp-modal-content {
        padding: 1.5rem;
  }

    .otp-box {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    .otp-boxes {
        gap: 0.5rem;
    }

    .otp-icon-wrapper {
 width: 70px;
        height: 70px;
    }

    .otp-icon-wrapper i {
        font-size: 2rem;
}

.otp-header h2 {
        font-size: 1.5rem;
    }
}
