/**
 * Standalone Pages Style - Gradient Design
 * Used for login, register, and lost password pages
 * Author: Hasan B.
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
}

/* Ensure body background is visible when no custom background */
body:not(.has-custom-bg) {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

/* Background Image */
.prlc-bg-image {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: -1003 !important;
    pointer-events: none !important;
}

/* Background Video (MP4) */
.prlc-bg-video {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    object-fit: cover !important;
    z-index: -1002 !important;
    pointer-events: none !important;
    /* Mobile optimization */
    -webkit-playsinline: true;
    -moz-playsinline: true;
    -ms-playsinline: true;
    playsinline: true;
    /* Ensure video covers entire viewport */
    min-width: 100vw !important;
    min-height: 100vh !important;
    /* Force full coverage */
    margin: 0 !important;
    padding: 0 !important;
    /* Make it truly background */
    visibility: visible !important;
    /* Prevent black background before video loads */
    background: transparent !important;
}

/* Background Video (YouTube/Vimeo iframe) */
.prlc-bg-video-iframe {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: -1002 !important;
    pointer-events: none !important;
    border: none !important;
    /* Ensure video covers entire viewport */
    min-width: 100vw !important;
    min-height: 100vh !important;
    /* Force cover behavior */
    object-fit: cover !important;
    object-position: center center !important;
    /* Ensure iframe is behind everything */
    background: transparent !important;
    /* Optimize for performance */
    will-change: transform;
    transform: translateZ(0);
    /* Force full coverage */
    margin: 0 !important;
    padding: 0 !important;
    /* Make it truly background */
    visibility: visible !important;
    /* Prevent black background before video loads */
    background: transparent !important;
}

/* YouTube specific optimizations */
.prlc-bg-video-iframe[src*="youtube.com"] {
    /* Force YouTube to cover full area */
    width: 100vw !important;
    height: 100vh !important;
    min-width: 100vw !important;
    min-height: 100vh !important;
    /* Center the video content */
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) scale(1.2) !important;
    /* Ensure video covers entire background */
    object-fit: cover !important;
    /* Force behind everything */
    z-index: -1001 !important;
    /* Prevent black background before video loads */
    background: transparent !important;
}

/* Vimeo specific optimizations */
.prlc-bg-video-iframe[src*="vimeo.com"] {
    /* Force Vimeo to cover full area */
    width: 100vw !important;
    height: 100vh !important;
    min-width: 100vw !important;
    min-height: 100vh !important;
    /* Center the video content */
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) scale(1.2) !important;
    /* Ensure video covers entire background */
    object-fit: cover !important;
    /* Force behind everything */
    z-index: -1001 !important;
    /* Prevent black background before video loads */
    background: transparent !important;
}

/* Mobile video optimizations */
@media (max-width: 768px) {
    .prlc-bg-video,
    .prlc-bg-video-iframe {
        width: 100vw !important;
        height: 100vh !important;
        min-width: 100vw !important;
        min-height: 100vh !important;
        left: 0 !important;
        top: 0 !important;
        transform: none !important;
        object-fit: cover !important;
        z-index: -1002 !important;
        background: transparent !important;
    }
    
    .prlc-bg-video-iframe[src*="youtube.com"],
    .prlc-bg-video-iframe[src*="vimeo.com"] {
        width: 100vw !important;
        height: 100vh !important;
        min-width: 100vw !important;
        min-height: 100vh !important;
        left: 0 !important;
        top: 0 !important;
        transform: none !important;
        z-index: -1002 !important;
        background: transparent !important;
    }
}

/* Background Image Overlay (over video) */
.prlc-bg-image-overlay {
    display: none; /* Hidden by default, shown via inline CSS if image URL exists */
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    z-index: -998 !important;
    pointer-events: none !important;
    min-width: 100vw !important;
    min-height: 100vh !important;
}

/* Background Color Overlay (always on top of video and cover image) */
.prlc-bg-color-overlay {
    display: block !important; /* Always visible when element exists */
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: -1000 !important; /* Above everything - video (-1002) and cover image (-1001) */
    pointer-events: none !important;
    /* Ensure overlay covers everything */
    min-width: 100vw !important;
    min-height: 100vh !important;
}

.login-container,
.register-container,
.lostpassword-container {
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    width: 100%;
    max-width: 700px;
    padding: 40px;
    animation: slideUp 0.5s ease;
    position: relative;
    z-index: 1000 !important;
}

.register-container {
    max-width: 700px;
}

/* New Login Form Layout */
.login-logo {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo img {
    width: auto;
    height: auto;
    box-shadow: none;
    object-fit: contain;
}

/* Login Logo Text */
.login-logo-text {
    margin-top: 15px !important;
    text-align: center !important;
    font-size: 16px !important;
    line-height: 1.5 !important;
    color: rgba(255, 255, 255, 0.9) !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
    position: relative !important;
    z-index: 100 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    height: auto !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 0 !important;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
}

.login-form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.login-form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.login-form-row .form-group input {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: #fff;
}

.login-form-row .form-group input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.login-button-row {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 15px;
}

.btn-login {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.btn-login:hover {
    /* Removed transform and box-shadow animations */
}

/* Register Page Body - No centering, normal flow */
body:has(.register-advanced-header) {
    display: block !important;
    align-items: unset !important;
    justify-content: unset !important;
    padding: 0 !important;
    min-height: 100vh !important;
}

/* Register Advanced Header Full Width */
.register-advanced-header {
    width: 100vw !important;
    position: relative !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    box-sizing: border-box !important;
    z-index: 10 !important;
    margin: 0 !important;
    padding: 20px 40px !important;
    text-align: center !important;
}

/* Register Advanced Wrapper */
.register-advanced-wrapper {
    max-width: 1240px !important;
    margin: 0 auto !important;
    width: 100% !important;
    padding: 20px !important;
    position: relative !important;
    z-index: 5 !important;
}

/* Video Cover Image - Shows before video loads */
.prlc-bg-cover-image {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    z-index: -1001 !important; /* Above video (-1002), below color overlay (-1000) */
    opacity: 1 !important;
    transition: opacity 0.8s ease-out !important;
    pointer-events: none !important;
}

/* Ensure video is behind everything */
.prlc-bg-video,
.prlc-bg-video-iframe {
    z-index: -1002 !important;
    transition: opacity 0.3s ease-in !important;
}

/* When video is playing, keep it at bottom */
.prlc-bg-video.playing,
.prlc-bg-video-iframe.playing {
    z-index: -1002 !important; /* Stay at bottom, below cover and color overlay */
    opacity: 1 !important; /* Make video visible */
}

.forgot-password-link {
    margin-bottom: 20px;
}

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

.forgot-password-link a:hover {
    color: #fff;
}

.register-link {
    text-align: center;
}

.btn-register {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-register:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.8);
    /* Removed transform animation */
}

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

.login-header,
.register-header,
.lostpassword-header {
    text-align: center;
    margin-bottom: 40px;
}

.login-logo,
.register-logo,
.lostpassword-logo {
    font-size: 48px;
    margin-bottom: 10px;
}

.login-header h1,
.register-header h1,
.lostpassword-header h1 {
    font-size: 28px;
    color: #333;
    margin-bottom: 10px;
    font-weight: 700;
}

.login-header p,
.register-header p,
.lostpassword-header p {
    color: #666;
    font-size: 15px;
    line-height: 1.6;
}

/* Messages */
.prlc-message {
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    font-size: 14px;
    line-height: 1.6;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.prlc-message.prlc-error {
    background: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

.prlc-message.prlc-success {
    background: #efe;
    color: #3c3;
    border: 1px solid #cec;
}

.prlc-message p {
    margin: 5px 0;
}

/* Terms Notice */
.prlc-terms-notice {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 1px solid #ffc107;
    border-left: 4px solid #ffc107;
    padding: 15px 20px;
    margin-bottom: 25px;
    border-radius: 12px;
}

.prlc-terms-notice p {
    margin: 0;
    color: #856404;
    font-size: 12px;
    line-height: 1.6;
}

/* Form Groups */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.form-group .required {
    color: #e74c3c;
}

.input-wrapper {
    position: relative;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="email"] {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s ease;
    font-family: inherit;
    background: transparent;
    color: #fff;
}

.form-group input[type="text"]::placeholder,
.form-group input[type="password"]::placeholder,
.form-group input[type="email"]::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.form-group input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.1);
}

.input-wrapper .form-group input {
    padding-right: 50px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: #666;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.toggle-password:hover {
    background: #f5f5f5;
    color: #667eea;
}

.dashicons {
    width: 20px;
    height: 20px;
    font-size: 20px;
}

/* Remember Me */
.remember-me {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
}

.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    cursor: pointer;
}

.remember-me label {
    font-size: 14px;
    color: #666;
    cursor: pointer;
    margin: 0;
    font-weight: normal;
}

/* Hints */
.field-hint {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #999;
    font-style: italic;
}

/* Password Strength */
.password-strength {
    margin-top: 8px;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.password-strength.weak {
    background: #fee;
    color: #c33;
}

.password-strength.medium {
    background: #ffc;
    color: #880;
}

.password-strength.strong {
    background: #efe;
    color: #3c3;
}

/* Buttons */
.btn-login,
.btn-register,
.btn-reset {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    /* Removed box-shadow */
}

.btn-login:hover,
.btn-register:hover,
.btn-reset:hover {
    /* Removed transform and box-shadow animations */
}

.btn-login:active,
.btn-register:active,
.btn-reset:active {
    transform: translateY(0);
}

.btn-login:disabled,
.btn-register:disabled,
.btn-reset:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Links */
.form-links {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid #e0e0e0;
    text-align: center;
}

.form-links a {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
    display: inline-block;
    margin: 0 10px;
}

.form-links a:hover {
    color: #764ba2;
    /* No transform animation - text stays in place */
}

.form-links .separator {
    color: #ccc;
    margin: 0 5px;
}

.form-links p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

/* Terms Checkbox */
.terms-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 20px 0;
}

.terms-checkbox input[type="checkbox"] {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
}

.terms-checkbox label {
    cursor: pointer;
    font-size: 13px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

/* Turnstile */
.prlc-turnstile-wrapper {
    margin: 20px 0;
    display: flex;
    justify-content: center;
    min-height: 65px;
    background: transparent !important;
}

.cf-turnstile {
    min-height: 65px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent !important;
}

.cf-turnstile:empty::after {
    content: 'Loading security check...';
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    font-style: italic;
    animation: pulse 1.5s infinite;
    background: transparent !important;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Footer */
.footer-text {
    text-align: center;
    margin-top: 30px;
    color: rgba(255,255,255,0.8);
    font-size: 13px;
}

.footer-text a {
    color: rgba(255,255,255,0.9);
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 480px) {
    .login-container,
    .register-container,
    .lostpassword-container {
        padding: 40px 30px;
        border-radius: 15px;
    }
    
    .login-header h1,
    .register-header h1,
    .lostpassword-header h1 {
        font-size: 24px;
    }
    
    .form-group input {
        padding: 12px 14px;
    }
    
    .btn-login,
    .btn-register,
    .btn-reset {
        padding: 14px;
    }
    
    .form-links {
        flex-direction: column;
        gap: 10px;
    }
}

