/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

/* Main Container */
.auth-container {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
}

/* Auth Box */
.auth-box {
    background-color: #ffffff;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 32px 24px;
    width: 100%;
}

/* Logo - Original Blue */
.logo {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    color: #667eea;  /* Original Blue */
    margin-bottom: 20px;
    letter-spacing: 2px;
    font-family: 'Bungee', cursive;
    text-transform: uppercase;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Headings */
.auth-box h2 {
    text-align: center;
    color: #333;
    font-size: 24px;
    margin-bottom: 28px;
    font-weight: 600;
    position: relative;
}

.auth-box h2:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: #667eea;  /* Original Blue */
    border-radius: 2px;
}

/* Form Styles */
.auth-box form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Input Fields */
.auth-box input {
    width: 100%;
    padding: 14px 18px;
    border: 1.5px solid #e0e0e0;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background-color: #fafafa;
    outline: none;
    -webkit-appearance: none;
    color: #333;
}

.auth-box input:focus {
    border-color: #667eea;  /* Original Blue */
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.auth-box input::placeholder {
    color: #999;
    font-size: 15px;
}

/* OTP Input Specific */
.otp-input {
    text-align: center;
    letter-spacing: 4px;
    font-weight: 600;
    font-size: 20px;
}

/* Button - Original Blue */
.auth-box button {
    background: #667eea;  /* Original Blue */
    color: white;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    width: 100%;
    -webkit-appearance: none;
}

.auth-box button:hover {
    background: #5a6fd6;  /* Slightly darker blue */
}

.auth-box button:active {
    transform: scale(0.98);
    background: #5a6fd6;
}

/* Message */
.auth-message {
    text-align: center;
    margin-top: 20px;
    padding: 12px 16px;
    border-radius: 10px;
    background-color: #fff3f3;
    color: #dc3545;
    font-size: 15px;
    border: 1px solid #ffcdd2;
}

/* Success Message */
.auth-message.success {
    background-color: #f0fff4;
    color: #28a745;
    border-color: #c3e6cb;
}

/* Links Section */
.auth-links {
    text-align: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.auth-links a {
    color: #667eea;  /* Original Blue */
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-block;
    margin: 4px 0;
}

.auth-links a:hover {
    color: #5a6fd6;
    text-decoration: underline;
}

/* Forgot password specific - last link */
.auth-links a:last-child {
    margin-top: 8px;
}

/* ==================== */
/* MOBILE RESPONSIVE */
/* ==================== */

/* Mobile devices (600px and down) */
@media only screen and (max-width: 600px) {
    body {
        padding: 12px;
        background: #f5f5f5;
    }
    
    .auth-box {
        padding: 28px 20px;
        border-radius: 20px;
    }
    
    .logo {
        font-size: 34px;
        margin-bottom: 18px;
        color: #667eea;  /* Original Blue */
    }
    
    .auth-box h2 {
        font-size: 22px;
        margin-bottom: 25px;
        color: #333;
    }
    
    .auth-box h2:after {
        width: 45px;
        height: 3px;
        bottom: -8px;
        background: #667eea;  /* Original Blue */
    }
    
    .auth-box input {
        padding: 16px 18px;
        font-size: 16px;
        border-radius: 14px;
        background-color: #fafafa;
        border-color: #e0e0e0;
        color: #333;
    }
    
    .auth-box input:focus {
        border-color: #667eea;  /* Original Blue */
        background-color: #ffffff;
    }
    
    .auth-box input::placeholder {
        color: #999;
    }
    
    /* OTP input larger on mobile */
    .otp-input {
        font-size: 24px;
        letter-spacing: 6px;
        padding: 18px;
    }
    
    .auth-box button {
        padding: 18px;
        font-size: 18px;
        border-radius: 14px;
        background: #667eea;  /* Original Blue */
    }
    
    .auth-box button:hover {
        background: #5a6fd6;
    }
    
    .auth-links {
        border-top-color: #f0f0f0;
    }
    
    .auth-links a {
        color: #667eea;  /* Original Blue */
        font-size: 16px;
        padding: 8px 0;
    }
    
    .auth-message {
        font-size: 15px;
        padding: 14px 16px;
    }
}

/* Small mobile devices (480px and down) */
@media only screen and (max-width: 480px) {
    .auth-box {
        padding: 24px 18px;
    }
    
    .logo {
        font-size: 32px;
        color: #667eea;  /* Original Blue */
    }
    
    .auth-box h2 {
        font-size: 20px;
        margin-bottom: 22px;
    }
    
    .auth-box h2:after {
        width: 40px;
        height: 3px;
        bottom: -8px;
    }
    
    .auth-box input {
        padding: 14px 16px;
        font-size: 15px;
    }
    
    .otp-input {
        font-size: 22px;
        letter-spacing: 5px;
        padding: 14px 16px;
    }
    
    .auth-box button {
        padding: 16px;
        font-size: 17px;
        background: #667eea;  /* Original Blue */
    }
    
    .auth-links a {
        font-size: 15px;
        color: #667eea;  /* Original Blue */
    }
    
    .auth-message {
        font-size: 14px;
        padding: 12px 14px;
    }
}

/* Very small mobile devices (360px and down) */
@media only screen and (max-width: 360px) {
    .auth-box {
        padding: 20px 15px;
    }
    
    .logo {
        font-size: 28px;
        margin-bottom: 15px;
        color: #667eea;  /* Original Blue */
    }
    
    .auth-box h2 {
        font-size: 18px;
        margin-bottom: 20px;
    }
    
    .auth-box h2:after {
        width: 35px;
        height: 2.5px;
        bottom: -6px;
    }
    
    .auth-box input {
        padding: 12px 14px;
        font-size: 14px;
    }
    
    .otp-input {
        font-size: 20px;
        letter-spacing: 4px;
        padding: 12px 14px;
    }
    
    .auth-box button {
        padding: 14px;
        font-size: 16px;
        background: #667eea;  /* Original Blue */
    }
    
    .auth-links a {
        font-size: 14px;
        color: #667eea;  /* Original Blue */
    }
}

/* Tablet devices (601px to 991px) */
@media only screen and (min-width: 601px) and (max-width: 991px) {
    .auth-box {
        padding: 35px 30px;
    }
    
    .logo {
        font-size: 38px;
        color: #667eea;  /* Original Blue */
    }
    
    .auth-box h2 {
        font-size: 26px;
        color: #333;
    }
    
    .auth-box h2:after {
        background: #667eea;  /* Original Blue */
    }
    
    .otp-input {
        font-size: 22px;
        letter-spacing: 5px;
    }
}

/* Desktop (992px and up) */
@media only screen and (min-width: 992px) {
    .auth-box:hover {
        transform: translateY(-3px);
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    }
    
    body {
        background: #f5f5f5;
    }
    
    .logo {
        color: #667eea;  /* Original Blue */
    }
    
    .auth-box h2 {
        color: #333;
    }
    
    .auth-box h2:after {
        background: #667eea;  /* Original Blue */
    }
    
    .auth-box input {
        background-color: #fafafa;
        border-color: #e0e0e0;
        color: #333;
    }
    
    .auth-box input:focus {
        border-color: #667eea;  /* Original Blue */
    }
    
    .auth-box button {
        background: #667eea;  /* Original Blue */
    }
    
    .auth-links a {
        color: #667eea;  /* Original Blue */
    }
}

/* Landscape mode */
@media screen and (max-height: 500px) and (orientation: landscape) {
    body {
        padding: 10px;
        align-items: flex-start;
        background: #f5f5f5;
    }
    
    .auth-box {
        padding: 20px 25px;
        margin: 10px auto;
    }
    
    .logo {
        font-size: 28px;
        margin-bottom: 10px;
        color: #667eea;  /* Original Blue */
    }
    
    .auth-box h2 {
        font-size: 20px;
        margin-bottom: 15px;
        color: #333;
    }
    
    .auth-box h2:after {
        bottom: -5px;
        background: #667eea;  /* Original Blue */
    }
    
    .auth-box input {
        padding: 10px 14px;
        font-size: 15px;
        background-color: #fafafa;
        border-color: #e0e0e0;
        color: #333;
    }
    
    .auth-box input:focus {
        border-color: #667eea;  /* Original Blue */
    }
    
    .otp-input {
        font-size: 18px;
        letter-spacing: 3px;
        padding: 10px 14px;
    }
    
    .auth-box button {
        padding: 10px;
        margin-top: 5px;
        font-size: 16px;
        background: #667eea;  /* Original Blue */
    }
    
    .auth-links {
        margin-top: 15px;
        padding-top: 12px;
        border-top-color: #f0f0f0;
    }
    
    .auth-links a {
        color: #667eea;  /* Original Blue */
        font-size: 14px;
    }
}

/* Small height devices */
@media screen and (max-height: 700px) {
    .auth-box {
        padding: 25px 20px;
    }
    
    .logo {
        margin-bottom: 15px;
    }
    
    .auth-box h2 {
        margin-bottom: 20px;
    }
    
    .auth-box form {
        gap: 12px;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .auth-box input,
    .auth-box button,
    .auth-links a {
        cursor: default;
        -webkit-tap-highlight-color: transparent;
    }
    
    .auth-box input {
        font-size: 16px;
    }
    
    .auth-box button:active {
        opacity: 0.8;
        transform: scale(0.98);
        background: #5a6fd6;
    }
    
    .auth-links a:active {
        opacity: 0.7;
    }
}

/* Prevent zoom on iOS */
@media screen and (-webkit-min-device-pixel-ratio: 0) { 
    select,
    textarea,
    input {
        font-size: 16px;
    }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}