/* ================================================================
   Auth Page Styles - MemboInfo
   Monaca Hybrid App Authentication UI
   ================================================================ */

/* Reset for auth page */
.auth-page {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow-x: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
	background-color: #454c84;
}

/* Background with blur effect */
.auth-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.background-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-size: cover;
    background-position: center;
}

.background-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Main Container */
.auth-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: top;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* Header Section */
.auth-header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.app-logo {
    margin-bottom: 20px;
}

.logo-text {
    font-size: 42px;
    font-weight: bold;
    color: white;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: inline-block;
    padding: 12px 32px;
    border: 3px solid white;
    border-radius: 50px;
}

.app-tagline {
    margin-top: 20px;
}

.tagline-main {
    font-size: 16px;
    margin-bottom: 8px;
    opacity: 0.95;
}

.tagline-sub {
    font-size: 14px;
    margin: 4px 0;
    opacity: 0.9;
}

/* Auth Buttons Container */
.auth-buttons {
    width: 100%;
    max-width: 380px;
    margin: 0 auto 1em;
}
.auth-buttons a {
    color: #fff;
}

/* Auth Button Base Style */
.auth-btn {
    width: 100%;
    padding: 16px 24px;
    margin-bottom: 12px;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    /* /* /* transition: all 0.3s ease; */ */ */
    position: relative;
    overflow: hidden;
}

.auth-btn i {
    font-size: 20px;
    margin-right: 12px;
}

/* Email Button */
.auth-btn-email {
    background: white;
    color: #333;
}

.auth-btn-email:hover {
    background: #f5f5f5;
    /* /* /* /* /* /* transform: translateY(-2px); */ */ */ */ */ */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Google Button */
.auth-btn-google {
    background: white;
    color: #4285f4;
    border: 2px solid #4285f4;
}

.auth-btn-google:hover {
    background: #4285f4;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(66, 133, 244, 0.3);
}

/* Facebook Button */
.auth-btn-facebook {
    background: #1877f2;
    color: white;
}

.auth-btn-facebook:hover {
    background: #1564d1;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(24, 119, 242, 0.3);
}

/* Apple Button */
.auth-btn-apple {
    background: #000;
    color: white;
}

.auth-btn-apple:hover {
    background: #222;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.auth-btn-email .fas {
    color: #666;
}
.auth-btn-google .fab {
    color: #1877f2;
}


/* LINE Button (commented out) */
.auth-btn-line {
    background: #06c755;
    color: white;
}

.auth-btn-line:hover {
    background: #05a847;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(6, 199, 85, 0.3);
}

/* Guest Mode Button */
.auth-btn-guest {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.auth-btn-guest:hover {
    background: linear-gradient(135deg, #5568d3 0%, #63408a 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

/* Change Language Link */
.auth-language-link {
    text-align: center;
    margin: 20px auto;
    max-width: 380px;
}
.language-link {
    color: white;
    text-decoration: none;
    font-size: 14px;
    opacity: 0.9;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: opacity 0.3s;
}

.language-link:hover {
    opacity: 1;
    text-decoration: underline;
}

.language-link i {
    font-size: 16px;
}

/* Footer */
.auth-footer {
    text-align: center;
}

.auth-copyright {
    color: white;
    font-size: 0.8em;
    margin-top: 20px;
}

.login-link {
    color: white;
    text-decoration: none;
    font-size: 14px;
    opacity: 0.9;
    /* transition: opacity 0.3s; */
}

.login-link:hover {
    opacity: 1;
    text-decoration: underline;
}

/* Login link inline (between buttons) */
.login-link-inline {
    display: block;
    text-align: center;
    margin: 15px 0;
    color: #fff;
    text-decoration: none;
}

/* Modal Styles */
.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: none;
}

.auth-modal.show {
    display: block;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    /* animation: fadeIn 0.3s ease; */
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 420px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    /* animation: slideUp 0.3s ease; */
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    position: relative;
}

.modal-header h2 {
    margin: 0;
    font-size: 20px;
    color: #333;
    text-align: center;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
}

/* Auth Tabs */
.auth-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.auth-tab {
    flex: 1;
    padding: 12px;
    background: none;
    border: none;
    color: #999;
    font-size: 16px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    /* /* /* transition: all 0.3s; */ */ */
}

.auth-tab.active {
    color: #333;
    border-bottom-color: #667eea;
}

/* Auth Forms */
.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.form-group {

}

.form-input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.forgot-password {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    display: inline-block;
}

.forgot-password:hover {
    text-decoration: underline;
}

.submit-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 20px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Terms Checkbox */
.terms {
    margin-top: 20px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    font-size: 14px;
    color: #666;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 8px;
    margin-top: 3px;
}

.checkbox-label a {
    color: #667eea;
    text-decoration: none;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

/* Phone Form */
.phone-info {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
    text-align: center;
}

.phone-terms {
    margin-top: 20px;
    font-size: 12px;
    color: #999;
}

.phone-terms p {
    margin: 8px 0;
}

.phone-terms a {
    color: #667eea;
    text-decoration: none;
}

/* Auth Message */
.auth-message {
    display: none;
    padding: 12px;
    border-radius: 8px;
    margin-top: 16px;
    font-size: 14px;
}

.auth-message.show {
    display: block;
}

.auth-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.auth-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    display: none;
}

.loading-overlay.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.loading-overlay .spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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


.loading-spinner {
    text-align: center;
    color: white;
}

.loading-spinner i {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
    /* /* animation: spin 1s linear infinite; */ - using Font Awesome's built-in animation */
}

.loading-spinner p {
    font-size: 16px;
}

/* Animations */
/* Removed animation keyframes */

/* Removed animation keyframes */

/* Removed animation keyframes */

/* Responsive Design */
@media (max-width: 480px) {
    .logo-text {
        font-size: 32px;
        padding: 10px 24px;
    }

    .auth-btn {
        font-size: 14px;
        padding: 14px 20px;
    }

    .modal-content {
        width: 95%;
        max-height: 85vh;
    }
}

/* iOS Safe Area Support */
@supports (padding: max(0px)) {
    .auth-container {
        padding-top: max(20px, env(safe-area-inset-top));
        padding-bottom: max(20px, env(safe-area-inset-bottom));
        padding-top: 5em;
    }

    .modal-content {
        margin-top: env(safe-area-inset-top);
        margin-bottom: env(safe-area-inset-bottom);
    }
}

/* ================================================================
   Email Verification Modal Styles
   ================================================================ */

/* Verification Intro */
.verification-intro {
    text-align: center;
    margin-bottom: 30px;
}

.verification-icon {
    font-size: 48px;
    color: #667eea;
    margin-bottom: 15px;
    display: block;
}

.verification-text {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.verification-subtext {
    font-size: 14px;
    color: #666;
}

/* Form Labels */
.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}
.input-wrapper{
    position: relative;
}

/* Email Input Specific Styles */
.email-input {
    font-size: 16px;
    letter-spacing: 0.5px;
}

/* Validation Status */
.validation-status {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 20px;
	margin-top: 1em;
}

.validation-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-size: 14px;
    color: #666;
    transition: all 0.3s ease;
}

.validation-item:last-child {
    margin-bottom: 0;
}

.validation-item .status-icon {
    font-size: 8px;
    margin-right: 10px;
    color: #ccc;
    /* transition: color 0.3s ease; */
}

.validation-item.valid {
    color: #28a745;
}

.validation-item.valid .status-icon {
    color: #28a745;
}

.validation-item.invalid {
    color: #dc3545;
}

.validation-item.invalid .status-icon {
    color: #dc3545;
}

/* Input Validation Icons */
.validation-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	position: absolute;
/*	right: 0.5em; */
/*    top: 0.5em; */
}

.validation-icon i {
    font-size: 16px;
}

.text-success {
    color: #28a745;
}

.text-danger {
    color: #dc3545;
}

.text-warning {
    color: #ffc107;
}

#loginForm .verification-icon {
    color: #fff;
}

#loginForm .verification-text {
    color: #fff;
}

#loginForm .verification-subtext {
    color: #fff;
}

#loginForm .form-group label {
    color: #fff;
}

/* Code input validation states */
.code-input.validating {
    border-color: #ffc107;
    background: linear-gradient(90deg, #fff 0%, #fffbf0 100%);
}

.code-input.valid {
    border-color: #28a745;
    background: linear-gradient(90deg, #fff 0%, #f0fff0 100%);
}

.code-input.invalid {
    border-color: #dc3545;
    background: linear-gradient(90deg, #fff 0%, #fff0f0 100%);
}

.code-input-wrapper.focused {
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Error message styles */
.error-message.info {
    color: #17a2b8;
}

.error-message.warning {
    color: #856404;
    background-color: #fff3cd;
    padding: 5px 10px;
    border-radius: 4px;
    margin-top: 5px;
}

/* Submit Button States */
.submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.submit-btn.ready {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    /* /* animation: pulse 2s infinite; */ - removed for flickering issue */
}

/* Removed animation keyframes */

/* Password Setup Full Screen Modal */
.password-setup {
    text-align: center;
    padding: 20px;
}

.password-setup .success-icon {
    font-size: 4rem;
    color: #667eea;
    margin-bottom: 1.5rem;
    /* animation: scaleIn 0.5s ease; */
}
.password-setup .success-icon .fas {
    /* color: #667eea; */
}

/* Removed animation keyframes */

.password-setup h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 600;
}

.password-setup .setup-email {
    color: #fff;
    margin-bottom: 2rem;
    font-size: 1rem;
    font-weight: 500;
}

/* Full Screen Modal Specific */
#passwordSetupFullModal .modal-dialog {
    margin: 0;
    max-width: 100%;
    width: 100%;
    height: 100vh;
}

#passwordSetupFullModal .modal-content {
    border: none;
    border-radius: 0;
    height: 100%;
}

#passwordSetupFullModal .card {
    /* animation: slideUp 0.4s ease; */
}

/* Removed animation keyframes */

#passwordSetupFullModal .form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

#passwordSetupFullModal .form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 500;
}

#passwordSetupFullModal .form-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    /* transition: border-color 0.3s; */
}

#passwordSetupFullModal .form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

#passwordSetupFullModal .input-wrapper {
    position: relative;
}

#passwordSetupFullModal .password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #999;
}

#passwordSetupFullModal .submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    padding: 14px 30px;
    border-radius: 25px;
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    /* transition: transform 0.3s, box-shadow 0.3s; */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

#passwordSetupFullModal .submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

#passwordSetupFullModal .submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.submit-btn .btn-icon {
    margin-left: 8px;
    font-size: 14px;
}

/* Verification Success Screen */
.verification-success {
    text-align: center;
    padding: 20px;
}

.success-icon {
    font-size: 64px;
    color: #28a745;
    margin-bottom: 20px;
    display: block;
}

.verification-success h3 {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.success-email {
    font-size: 16px;
    font-weight: 500;
    color: #667eea;
    margin-bottom: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
}

.success-message {
    font-size: 14px;
    color: #666;
    margin-bottom: 30px;
    line-height: 1.6;
}

/* Resend Section */
.resend-section {
    padding-top: 20px;
/*    border-top: 1px solid #e9ecef; */
}

.resend-section p {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.resend-btn {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.resend-btn:hover {
    background: #667eea;
    color: white;
    /* transform: translateY(-1px); */
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Error Messages */
.error-message {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
    display: block;
    min-height: 16px;
}

/* ================================================================
   Display Control Classes (No Inline Styles)
   ================================================================ */

/* Hidden state */
.hidden {
    display: none !important;
}

/* Visible container states */
.form-container-visible {
    display: block !important;
}

/* Ensure resetSuccessContainer is visible when form-container-visible is applied */
/* Maximum specificity to override all .hidden rules from other CSS files */
#resetSuccessContainer.verification-success.form-container-visible {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* ================================================================
   Legal Links (Terms & Privacy Policy)
   ================================================================ */

.auth-links-container {
    text-align: center;
    margin: 20px auto 10px auto;
    padding: 0 15px;
    font-size: 12px;
}

.auth-links-container a {
    color: #fff;
    text-decoration: none;
    transition: opacity 0.2s ease;
    white-space: nowrap;
}

.auth-links-container a:hover {
    color: #fff;
    text-decoration: underline;
}

.auth-links-container .link-divider {
    color: rgba(255, 255, 255, 0.5);
    margin: 0 6px;
}

.auth-nav-links {
    margin-bottom: 8px;
}

.auth-legal-links {
    /* 2行目：Terms, Privacy */
}


