/* ============================================
   SUPER11 - register.css (Premium Mobile-First)
   Ultimate responsive registration styling
   ============================================ */

:root {
    --primary: #3a86ff;
    --primary-dark: #2a75f0;
    --accent: #4361ee;
    --success: #00b894;
    --success-light: #00d8a7;
    --warning: #ffb703;
    --danger: #ff6b6b;
    --danger-light: #ff8585;
    --dark: #0b132b;
    --darker: #080f23;
    --darkest: #050a18;
    --light: #ffffff;
    --light-muted: #d6e0ff;
    --muted: #9fb0e6;
    --muted-dark: #6b7bb3;
    --glass: rgba(255, 255, 255, 0.1);
    --glass-dark: rgba(255, 255, 255, 0.05);
    --glass-light: rgba(255, 255, 255, 0.15);
    --radius: 20px;
    --radius-sm: 12px;
    --radius-lg: 28px;
    --transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-fast: 0.2s ease;
    --shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 35px 60px rgba(0, 0, 0, 0.5);
    --shadow-sm: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* ============ RESET & BASE STYLES ============ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: "Poppins", system-ui, -apple-system, sans-serif;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.2)),
        url('../admin/images/bg-login.png');
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: var(--light);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.7;
    font-weight: 400;
    overflow-x: visible;
}

/* ============ AUTH CONTAINER ============ */
.auth-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 0.5rem;
    width: 100%;
    min-height: 100vh;
    position: relative;
    background: none;
    overflow: visible;
    box-sizing: border-box;
}

.auth-wrapper {
    width: 100%;
    max-width: 400px;
    background: white;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 16px;
    padding: 1.2rem 1.5rem 1.5rem;
    animation: slideUpFade 0.5s ease-out;
    position: relative;
    overflow: visible;
    box-sizing: border-box;
    margin: 1rem 0;
    display: flex;
    flex-direction: column;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.auth-wrapper::-webkit-scrollbar {
    width: 4px;
}

.auth-wrapper::-webkit-scrollbar-track {
    background: transparent;
}

.auth-wrapper::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

/* Hide scrollbar for IE, Edge and Firefox */
.auth-wrapper {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: thin;  /* Firefox */
    scrollbar-color: rgba(0, 0, 0, 0.1) transparent;  /* Firefox */
}

/* ============ AUTH HEADER ============ */
.auth-header {
    text-align: center;
    margin: 0.5rem 0 0.8rem;
    position: relative;
    z-index: 1;
}

.auth-logo {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #ff4757 0%, #ff6348 50%, #ffa502 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.8rem;
    font-size: 1.5rem;
    color: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.auth-logo::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, 
        transparent, 
        rgba(255, 255, 255, 0.3), 
        transparent
    );
    transform: rotate(45deg);
    transition: all 0.6s ease;
}

.auth-logo:hover::before {
    transform: rotate(45deg) translate(50%, 50%);
}

.auth-header h2 {
    font-size: 1.6rem;
    font-weight: 800;
    margin: 0.2rem 0;
    background: linear-gradient(135deg, #ff4757 0%, #ff6348 50%, #ffa502 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.auth-subtitle {
    background: linear-gradient(135deg, #ff4757 0%, #ff6348 50%, #ffa502 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.4;
    max-width: 300px;
    margin: 0 auto;
}

/* ============ FORM STYLES ============ */
.auth-form {
    width: 100%;
    position: relative;
    z-index: 2;
}

.form-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--light-muted);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.form-input {
    width: 100%;
    padding: 15px 45px 15px 20px;
    border: 1px solid #808080;
    border-radius: var(--radius);
    color: #000000;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all var(--transition);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    line-height: 1.5;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 
        0 0 0 4px rgba(58, 134, 255, 0.15),
        var(--shadow-sm);
    transform: translateY(-2px);
}

.form-input::placeholder {
    color: #808080;
    font-weight: 400;
    transition: all var(--transition-fast);
}

.form-input:focus::placeholder {
    transform: translateX(5px);
    opacity: 0.7;
}

.form-input.error {
    border-color: var(--danger);
    box-shadow: 0 0 0 4px rgba(255, 107, 107, 0.15);
}

.form-input.success {
    border-color: var(--success);
    box-shadow: 0 0 0 4px rgba(0, 184, 148, 0.15);
}

/* ============ PASSWORD INPUT WRAPPER ============ */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

/* Password input fields */
#password, #confirm {
    width: 100%;
    padding: 12px 40px 12px 15px;
    height: 48px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: #fff;
}

/* Ensure the password strength indicator is below the input */
#password {
    margin-bottom: 0;
}

.password-strength {
    margin-top: 8px;
    margin-bottom: 0;
}

.strength-text {
    margin-top: 4px;
    margin-bottom: 0;
}

#password:focus, #confirm:focus {
    border-color: #4a90e2;
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
    outline: none;
}

/* Password toggle button */
.password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 4px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
    z-index: 10;
    outline: none;
}

.password-toggle:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #333;
}

.password-toggle:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.password-toggle:active {
    transform: translateY(-50%) scale(0.95);
}

/* Fix for Firefox */
input[type="password"] {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Remove default browser styles */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
    display: none;
}

/* Ensure the eye icon stays on top of the input */
.form-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

/* Make sure the form group has proper positioning context */
.form-group {
    position: relative;
    margin-bottom: 1.5rem;
}

/* Fix for the password strength text */
.strength-text {
    display: block;
    margin-top: 4px;
    font-size: 0.75rem;
    color: #666;
    text-align: left;
}

/* Position the password strength text */
.password-strength {
    margin-top: 8px;
}

.strength-text {
    font-size: 0.8rem;
    color: #666;
    margin-top: 4px;
    text-align: left;
}

/* ============ PASSWORD STRENGTH ============ */
.password-strength-container {
    margin: 0.5rem 0;
}

/* Adjust spacing for password fields */
#password + .form-group {
    margin-top: 0.5rem;
}

/* Add space after confirm password field */
#confirm_password {
    margin-bottom: 1rem;
}

.password-strength {
    height: 6px;
    background: var(--glass-dark);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
    margin-bottom: 0.5rem;
}

.strength-bar {
    height: 100%;
    width: 0%;
    border-radius: 3px;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.strength-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.4), 
        transparent
    );
    animation: shimmer 2s infinite;
}

.strength-bar.weak {
    width: 33%;
    background: linear-gradient(90deg, var(--danger), var(--danger-light));
}

.strength-bar.medium {
    width: 66%;
    background: linear-gradient(90deg, var(--warning), #ffcb47);
}

.strength-bar.strong {
    width: 100%;
    background: linear-gradient(90deg, var(--success), var(--success-light));
}

.strength-text {
    font-size: 0.85rem;
    font-weight: 600;
    text-align: right;
    transition: all var(--transition);
}

.strength-text.weak { color: var(--danger); }
.strength-text.medium { color: var(--warning); }
.strength-text.strong { color: var(--success); }

/* ============ TERMS & CONDITIONS ============ */
.terms-group {
    margin: 0.8rem 0 0.2rem;
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    font-size: 0.7rem;
    line-height: 1.2;
}

.terms-checkbox {
    width: 22px;
    height: 22px;
    margin-top: 0.1rem;
    accent-color: var(--primary);
    flex-shrink: 0;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.terms-checkbox:checked {
    transform: scale(1.1);
}

.terms-label {
    font-size: 0.92rem;
    color: var(--muted);
    line-height: 1.6;
    text-align: left;
    font-weight: 400;
}

.terms-label a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: all var(--transition-fast);
    position: relative;
}

.terms-label a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width var(--transition);
}

.terms-label a:hover {
    background: linear-gradient(135deg, #ff4757 0%, #ff6348 50%, #ffa502 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none !important;
}

.terms-label a:hover::after {
    display: none;
}

/* ============ BUTTON STYLES ============ */
.auth-btn {
    width: 100%;
    padding: 0.6rem 1rem;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #ff4757 0%, #ff6348 50%, #ffa502 100%);
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 0.6rem 0 0;
    position: relative;
    overflow: hidden;
    z-index: 1;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: none;
}

.auth-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.4), 
        transparent
    );
    transition: 0.5s;
    z-index: -1;
}

.auth-btn:hover::before {
    left: 100%;
}

.auth-btn:hover {
    transform: translateY(-2px);
    background-position: right center;
}

.auth-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.auth-btn:disabled {
    background: #cccccc;
    color: #666666;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.8;
}

.auth-btn.loading {
    pointer-events: none;
    color: transparent;
}

.auth-btn.loading::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    top: 50%;
    left: 50%;
    margin: -12px 0 0 -12px;
    border: 3px solid transparent;
    border-top: 3px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* ============ MESSAGE STYLES ============ */
.auth-msg {
    margin: 0.6rem 0;
    padding: 0.6rem 0.8rem;
    border-radius: 6px;
    text-align: center;
    font-weight: 500;
    font-size: 0.85rem;
    min-height: 18px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

.auth-msg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
}

.auth-msg.success {
    background: rgba(0, 184, 148, 0.1);
    color: var(--success);
    border-color: rgba(0, 184, 148, 0.3);
}

.auth-msg.success::before {
    background: var(--success);
}

.auth-msg.error {
    background: rgba(255, 107, 107, 0.1);
    color: var(--danger);
    border-color: rgba(255, 107, 107, 0.3);
}

.auth-msg.error::before {
    background: var(--danger);
}

.auth-msg.info {
    background: rgba(58, 134, 255, 0.1);
    color: var(--primary);
    border-color: rgba(58, 134, 255, 0.3);
}

.auth-msg.info::before {
    background: var(--primary);
}

/* ============ LINKS SECTION ============ */
.auth-links {
    text-align: center;
    margin: 0.6rem 0 0;
    font-size: 0.8rem;
    color: var(--muted);
    line-height: 1.3;
}

.auth-links p {
    color: var(--muted);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.auth-link {
    background: linear-gradient(135deg, #ff4757 0%, #ff6348 50%, #ffa502 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    font-weight: 700;
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1.5rem;
    border-radius: var(--radius);
    background-color: rgba(58, 134, 255, 0.1);
    border: 1px solid rgba(58, 134, 255, 0.2);
}

.auth-link:hover {
    color: var(--light);
    background-color: rgba(58, 134, 255, 0.2);
    transform: translateX(8px);
    box-shadow: 0 5px 15px rgba(58, 134, 255, 0.3);
}

/* ============ TRUST BADGES ============ */
.trust-badges {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    margin: 1.5rem 0 0;
    flex-wrap: wrap;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #666;
    font-size: 0.7rem;
    font-weight: 500;
    padding: 0.4rem 0.6rem;
    background: #f5f5f5;
    border-radius: 6px;
    border: 1px solid #eee;
    transition: all 0.2s ease;
    flex: 1;
    min-width: 100px;
    justify-content: center;
}

.trust-badge:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.trust-badge i {
    background: linear-gradient(135deg, #ff4757 0%, #ff6348 50%, #ffa502 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.1rem;
    transition: transform var(--transition);
}

.trust-badge:hover i {
    transform: scale(1.2);
}

/* ============ ANIMATIONS ============ */
@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.shake {
    animation: shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

/* ============ ENHANCED MOBILE RESPONSIVENESS ============ */

/* Tablet & Small Desktop */
@media (max-width: 1024px) {
    .auth-wrapper {
        max-width: 400px;
        padding: 0.8rem 1.5rem;
    }
    
    .auth-header h2 {
        font-size: 2.2rem;
    }
}

/* Mobile Landscape & Small Tablet */
@media (max-width: 768px) {
    .auth-container {
        padding: 0.5rem;
        align-items: flex-start;
        min-height: 100vh;
    }
    
    .auth-wrapper {
        padding: 1rem;
        margin: 0.5rem;
        border-radius: 12px;
        max-width: 100%;
    }
    
    .auth-header {
        margin-bottom: 1rem;
    }
}

/* Mobile Portrait */
@media (max-width: 600px) {
    .auth-container {
        padding: 0.5rem;
    }
    
    .auth-wrapper {
        padding: 1rem;
        margin: 0.5rem;
        border-radius: 16px;
        max-width: 100%;
    }
    
    .auth-header {
        margin-bottom: 2rem;
    }
}

/* Extra Small Devices */
@media (max-width: 420px) {
    .auth-wrapper {
        padding: 0.8rem 1.5rem;
        border-radius: 16px;
        max-width: 400px;
    }
    
    .auth-header h2 {
        font-size: 1.6rem;
    }
}

/* Large Desktop */
@media (min-width: 1440px) {
    .auth-wrapper {
        max-width: 400px;
        padding: 0.8rem 1.5rem;
    }
    
    .auth-header h2 {
        font-size: 2.6rem;
    }
    .auth-subtitle {
        font-size: 1.15rem;
    }
}

/* ============ ACCESSIBILITY & UX ENHANCEMENTS ============ */

/* Focus styles */
.form-input:focus-visible,
.auth-btn:focus-visible,
.auth-link:focus-visible,
.terms-checkbox:focus-visible,
.password-toggle:focus-visible {
    outline: 3px solid rgba(58, 134, 255, 0.6);
    outline-offset: 2px;
}

/* Loading state */
.form-loading {
    pointer-events: none;
    opacity: 0.8;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .auth-wrapper {
        background: var(--dark);
        border: 2px solid var(--light);
    }
    
    .form-input {
        background: var(--darker);
        border: 2px solid var(--light);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .auth-wrapper::before,
    .auth-logo::before,
    .auth-btn::before,
    .strength-bar::after {
        display: none;
    }
}

/* Dark mode consistency */
@media (prefers-color-scheme: dark) {
    .auth-wrapper {
        background: var(--glass);
    }
}

/* Print styles */
@media print {
    .auth-container {
        background: white !important;
        color: black !important;
    }
    
    .auth-wrapper {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
    
    .auth-btn {
        background: #333 !important;
        color: white !important;
    }
}

/* Custom scrollbar for webkit */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
    border: 0;
}

/* Selection styles */
::selection {
    background: rgba(58, 134, 255, 0.3);
    color: var(--light);
}

::-moz-selection {
    background: rgba(58, 134, 255, 0.3);
    color: var(--light);
}

/* iOS specific fixes */
@supports (-webkit-touch-callout: none) {
    .auth-container {
        min-height: -webkit-fill-available;
    }
    
    .auth-wrapper {
        backdrop-filter: none;
        -webkit-backdrop-filter: blur(40px);
    }
}

/* Firefox specific fixes */
@-moz-document url-prefix() {
    .auth-wrapper {
        background: var(--dark);
    }
}