/* Premium Auth Pages - Modern Design */

/* ========== CSS Reset for Auth Pages ========== */
.premium-auth-page *,
.premium-auth-page *::before,
.premium-auth-page *::after {
    box-sizing: border-box;
}

.premium-auth-page img {
    max-width: 100%;
    height: auto;
}

/* ========== Base Auth Layout ========== */
.premium-auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1625 0%, #2d1f3d 50%, #1a1625 100%);
    position: relative;
    overflow: hidden;
    padding: 20px;
    margin: 0;
}

/* Animated background elements */
.premium-auth-page::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(246, 5, 91, 0.15) 0%, transparent 70%);
    top: -200px;
    right: -200px;
    animation: float 15s ease-in-out infinite;
    pointer-events: none;
}

.premium-auth-page::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
    bottom: -150px;
    left: -150px;
    animation: float 20s ease-in-out infinite reverse;
    pointer-events: none;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -30px) scale(1.05); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(20px, 30px) scale(1.02); }
}

/* ========== Auth Card ========== */
.premium-auth-card {
    width: 100%;
    max-width: 440px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 48px 40px;
    position: relative;
    z-index: 10;
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    animation: cardAppear 0.6s ease-out;
}

@keyframes cardAppear {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Logo section */
.premium-auth-logo {
    text-align: center;
    margin-bottom: 32px;
}

.premium-auth-logo a {
    display: inline-block;
}

.premium-auth-logo img {
    height: 48px;
    width: auto;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
}

/* Title */
.premium-auth-title {
    color: #ffffff !important;
    font-size: 28px !important;
    font-weight: 600 !important;
    text-align: center !important;
    margin: 0 0 8px 0 !important;
    letter-spacing: -0.5px;
    padding: 0 !important;
}

.premium-auth-subtitle {
    color: rgba(255, 255, 255, 0.5) !important;
    font-size: 15px !important;
    text-align: center !important;
    margin: 0 0 32px 0 !important;
    font-weight: 400 !important;
}

/* ========== Form Styling ========== */
.premium-auth-form {
    display: block;
}

/* Input Groups */
.premium-field-group {
    position: relative;
    margin-bottom: 20px;
}

.premium-field-group > label {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 8px;
    letter-spacing: 0.3px;
}

/* Yii2 form-group reset */
.premium-field-group .form-group {
    margin: 0 !important;
    padding: 0 !important;
}

.premium-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.premium-input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: rgba(255, 255, 255, 0.4);
    pointer-events: none;
    transition: color 0.3s ease;
    z-index: 2;
}

/* Main input styling */
.premium-auth-form input.premium-input,
input.premium-input {
    width: 100% !important;
    height: 52px !important;
    padding: 0 50px 0 48px !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px !important;
    color: #ffffff !important;
    font-size: 15px !important;
    font-family: inherit !important;
    transition: all 0.3s ease !important;
    outline: none !important;
    box-shadow: none !important;
    margin: 0 !important;
}

.premium-auth-form input.premium-input::placeholder,
input.premium-input::placeholder {
    color: rgba(255, 255, 255, 0.35) !important;
}

.premium-auth-form input.premium-input:hover,
input.premium-input:hover {
    background: rgba(255, 255, 255, 0.07) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
}

.premium-auth-form input.premium-input:focus,
input.premium-input:focus {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: #F6055B !important;
    box-shadow: 0 0 0 3px rgba(246, 5, 91, 0.15) !important;
}

.premium-input-wrapper:focus-within .premium-input-icon {
    color: #F6055B;
}

/* Password toggle button */
.premium-password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.4);
    transition: color 0.3s ease;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.premium-password-toggle:hover {
    color: rgba(255, 255, 255, 0.7);
}

.premium-password-toggle svg {
    width: 20px;
    height: 20px;
    display: block;
}

/* ========== Checkbox Styling ========== */
.premium-checkbox-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 20px 0;
    flex-wrap: wrap;
    gap: 12px;
}

.premium-checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.premium-checkbox-wrapper input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.premium-checkbox-custom {
    width: 20px;
    height: 20px;
    min-width: 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    background: transparent;
}

.premium-checkbox-wrapper input[type="checkbox"]:checked + .premium-checkbox-custom {
    background: linear-gradient(135deg, #F6055B 0%, #D134C2 100%);
    border-color: transparent;
}

.premium-checkbox-custom svg {
    width: 12px;
    height: 12px;
    color: #ffffff;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.2s ease;
}

.premium-checkbox-wrapper input[type="checkbox"]:checked + .premium-checkbox-custom svg {
    opacity: 1;
    transform: scale(1);
}

.premium-checkbox-label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    user-select: none;
}

.premium-forgot-link {
    color: #F6055B;
    font-size: 14px;
    text-decoration: none;
    transition: color 0.3s ease;
}

.premium-forgot-link:hover {
    color: #ff3d7f;
    text-decoration: underline;
}

/* ========== reCAPTCHA Styling ========== */
.premium-recaptcha {
    display: flex;
    justify-content: center;
    margin: 20px 0;
    overflow: hidden;
}

.premium-recaptcha .g-recaptcha {
    transform: scale(0.92);
    transform-origin: center;
}

/* ========== Buttons ========== */
.premium-submit-btn {
    width: 100%;
    height: 52px;
    background: linear-gradient(135deg, #F6055B 0%, #D134C2 100%);
    border: none !important;
    border-radius: 12px;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    letter-spacing: 0.3px;
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.premium-submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #ff3d7f 0%, #e54bd6 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.premium-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow:
        0 10px 30px -10px rgba(246, 5, 91, 0.5),
        0 4px 12px rgba(0, 0, 0, 0.2);
}

.premium-submit-btn:hover::before {
    opacity: 1;
}

.premium-submit-btn:active {
    transform: translateY(0);
}

.premium-submit-btn span {
    position: relative;
    z-index: 1;
}

/* Loading state */
.premium-submit-btn.loading {
    pointer-events: none;
}

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

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

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

/* ========== Divider ========== */
.premium-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 28px 0;
}

.premium-divider::before,
.premium-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.12);
}

.premium-divider span {
    color: rgba(255, 255, 255, 0.4);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ========== Social Auth ========== */
.premium-social-auth {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Auth choice widget styling */
.premium-social-auth .auth-clients {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    list-style: none;
    padding: 0;
    margin: 0;
    justify-content: center;
}

.premium-social-auth .auth-clients li {
    flex: 1;
    min-width: 100px;
    margin: 0;
}

.premium-social-auth .auth-clients a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 48px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.premium-social-auth .auth-clients a:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    color: #fff;
}

.premium-social-auth .auth-icon {
    width: 20px;
    height: 20px;
}

/* ========== Switch Auth Mode ========== */
.premium-auth-switch {
    text-align: center;
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.premium-auth-switch p {
    margin: 0;
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
}

.premium-auth-switch a {
    color: #F6055B;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

.premium-auth-switch a:hover {
    color: #ff3d7f;
    text-decoration: underline;
}

/* ========== Error Messages ========== */
.premium-auth-form .help-block,
.premium-field-group .help-block {
    color: #ff6b6b !important;
    font-size: 12px !important;
    margin: 6px 0 0 0 !important;
    padding: 0 !important;
    background: none !important;
    border: none !important;
}

.premium-auth-form .help-block:not(:empty)::before,
.premium-field-group .help-block:not(:empty)::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 4px;
    background: #ff6b6b;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
}

.premium-field-group.has-error .premium-input,
.premium-auth-form .has-error .premium-input {
    border-color: #ff6b6b !important;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.15) !important;
}

/* ========== Alert Messages ========== */
.premium-alert {
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    animation: alertAppear 0.3s ease-out;
}

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

.premium-alert--error,
.premium-alert--warning {
    background: rgba(255, 107, 107, 0.15);
    border: 1px solid rgba(255, 107, 107, 0.3);
    color: #ff6b6b;
}

.premium-alert--success {
    background: rgba(46, 213, 115, 0.15);
    border: 1px solid rgba(46, 213, 115, 0.3);
    color: #2ed573;
}

.premium-alert svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* ========== Floating Particles ========== */
.premium-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.premium-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(246, 5, 91, 0.4);
    border-radius: 50%;
    animation: particleFloat 20s infinite;
}

.premium-particle:nth-child(1) { left: 10%; animation-delay: 0s; animation-duration: 25s; }
.premium-particle:nth-child(2) { left: 20%; animation-delay: 2s; animation-duration: 20s; }
.premium-particle:nth-child(3) { left: 30%; animation-delay: 4s; animation-duration: 28s; }
.premium-particle:nth-child(4) { left: 40%; animation-delay: 1s; animation-duration: 22s; }
.premium-particle:nth-child(5) { left: 50%; animation-delay: 3s; animation-duration: 26s; }
.premium-particle:nth-child(6) { left: 60%; animation-delay: 5s; animation-duration: 24s; }
.premium-particle:nth-child(7) { left: 70%; animation-delay: 2s; animation-duration: 21s; }
.premium-particle:nth-child(8) { left: 80%; animation-delay: 4s; animation-duration: 27s; }
.premium-particle:nth-child(9) { left: 90%; animation-delay: 1s; animation-duration: 23s; }
.premium-particle:nth-child(10) { left: 5%; animation-delay: 3s; animation-duration: 19s; }

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-10vh) scale(1);
        opacity: 0;
    }
}

/* ========== Terms Text ========== */
.premium-terms {
    text-align: center;
    margin-top: 16px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    line-height: 1.6;
}

.premium-terms a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: underline;
}

.premium-terms a:hover {
    color: #F6055B;
}

/* ========== Responsive Design ========== */
@media (max-width: 480px) {
    .premium-auth-page {
        padding: 16px;
    }

    .premium-auth-card {
        padding: 32px 24px;
        border-radius: 20px;
    }

    .premium-auth-title {
        font-size: 24px !important;
    }

    .premium-auth-form input.premium-input,
    input.premium-input {
        height: 48px !important;
    }

    .premium-submit-btn {
        height: 48px;
    }

    .premium-checkbox-group {
        flex-direction: column;
        align-items: flex-start;
    }

    .premium-recaptcha .g-recaptcha {
        transform: scale(0.77);
    }
}

/* ========== Password Strength Indicator ========== */
.premium-password-strength {
    display: flex;
    gap: 4px;
    margin-top: 10px;
}

.premium-strength-bar {
    flex: 1;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.premium-strength-bar.active {
    background: #ff6b6b;
}

.premium-strength-bar.active.medium {
    background: #feca57;
}

.premium-strength-bar.active.strong {
    background: #2ed573;
}

.premium-strength-text {
    font-size: 11px;
    margin-top: 6px;
    color: rgba(255, 255, 255, 0.5);
}
