/* UAV AI 健康醫師 管理系統 - 認證頁面樣式 */

.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

/* 認證卡片 */
.auth-card {
    background: rgba(26, 31, 46, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 3rem;
    width: 100%;
    max-width: 500px;
    position: relative;
    z-index: 10;
    box-shadow: var(--shadow-card);
    transition: var(--transition-normal);
}

.auth-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-glow);
}

/* 認證標題 */
.auth-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.auth-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    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.1), transparent);
    animation: rotate 3s linear infinite;
}

.auth-logo.success {
    background: linear-gradient(45deg, var(--success-color), var(--primary-color));
}

.auth-logo i {
    font-size: 2rem;
    color: var(--primary-bg);
    position: relative;
    z-index: 1;
}

.auth-title {
    font-family: var(--font-primary);
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.title-link {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    cursor: pointer;
}

.title-link:hover {
    transform: scale(1.05);
    filter: brightness(1.2);
}

.auth-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 300;
}

/* 表單樣式 */
.auth-form {
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-label i {
    color: var(--primary-color);
    font-size: 0.9rem;
}

.form-input {
    width: 100%;
    background: var(--tertiary-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: var(--font-secondary);
    transition: var(--transition-normal);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
    background: var(--accent-bg);
}

.form-input::placeholder {
    color: var(--text-muted);
}

/* 密碼強度指示器 */
.password-strength {
    margin-top: 0.5rem;
}

.strength-bar {
    width: 100%;
    height: 4px;
    background: var(--tertiary-bg);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.strength-fill {
    height: 100%;
    width: 0%;
    background: var(--danger-color);
    border-radius: 2px;
    transition: var(--transition-normal);
}

.strength-fill.weak {
    width: 25%;
    background: var(--danger-color);
}

.strength-fill.fair {
    width: 50%;
    background: var(--warning-color);
}

.strength-fill.good {
    width: 75%;
    background: var(--info-color);
}

.strength-fill.strong {
    width: 100%;
    background: var(--success-color);
}

.strength-text {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* 表單選項 */
.form-options {
    margin-bottom: 2rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.checkbox-input {
    display: none;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    position: relative;
    transition: var(--transition-normal);
}

.checkbox-input:checked + .checkbox-custom {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-input:checked + .checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--primary-bg);
    font-size: 0.8rem;
    font-weight: bold;
}

.terms-link {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition-fast);
}

.terms-link:hover {
    text-decoration: underline;
}

/* 認證按鈕 */
.auth-btn {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: 12px;
    color: var(--primary-bg);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.auth-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: var(--transition-normal);
}

.auth-btn:hover::before {
    left: 100%;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.3);
}

.auth-btn:active {
    transform: translateY(0);
}

.auth-btn.secondary {
    background: var(--tertiary-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.auth-btn.secondary:hover {
    background: rgba(0, 212, 255, 0.1);
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.2);
}

.btn-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 12px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    filter: blur(10px);
    transition: var(--transition-normal);
    z-index: -1;
}

.auth-btn:hover .btn-glow {
    opacity: 0.3;
}

/* 認證頁尾 */
.auth-footer {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.auth-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-fast);
}

.auth-link:hover {
    text-decoration: underline;
}

/* 驗證內容 */
.verify-content {
    text-align: center;
}

.verify-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 2rem;
    background: linear-gradient(45deg, var(--success-color), var(--primary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.verify-icon.success {
    background: linear-gradient(45deg, var(--success-color), var(--primary-color));
}

.verify-icon i {
    font-size: 2.5rem;
    color: var(--primary-bg);
}

.verify-message h3 {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.verify-message p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.verify-tips {
    background: rgba(0, 212, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-align: left;
}

.verify-tips h4 {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.verify-tips ul {
    list-style: none;
}

.verify-tips li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.verify-tips i {
    color: var(--success-color);
    font-size: 0.9rem;
}

.verify-features {
    background: rgba(0, 212, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-align: left;
}

.verify-features h4 {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.verify-features ul {
    list-style: none;
}

.verify-features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.verify-features i {
    color: var(--primary-color);
    font-size: 0.9rem;
}

.verify-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* 背景裝飾 */
.auth-bg-decoration {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.floating-icon {
    position: absolute;
    font-size: 2rem;
    color: var(--primary-color);
    opacity: 0.1;
    animation: float 6s ease-in-out infinite;
}

.floating-icon.icon-1 {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.floating-icon.icon-2 {
    top: 60%;
    right: 15%;
    animation-delay: 1.5s;
}

.floating-icon.icon-3 {
    bottom: 30%;
    left: 20%;
    animation-delay: 3s;
}

.floating-icon.icon-4 {
    top: 40%;
    right: 30%;
    animation-delay: 4.5s;
}

/* 動畫 */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* 響應式設計 - 修復 PC 端排列問題 */

/* 大螢幕 (PC 端) 優化 */
@media (min-width: 1200px) {
    .auth-container {
        padding: 3rem;
    }
    
    .auth-card {
        max-width: 600px;
        padding: 4rem;
    }
    
    .auth-title {
        font-size: 2.5rem;
    }
    
    .auth-subtitle {
        font-size: 1.2rem;
    }
    
    .form-input {
        padding: 1.25rem 1.5rem;
        font-size: 1.1rem;
    }
    
    .auth-btn {
        padding: 1.25rem 2rem;
        font-size: 1.1rem;
    }
}

/* 中等螢幕 (平板) */
@media (max-width: 1024px) and (min-width: 769px) {
    .auth-container {
        padding: 2rem;
    }
    
    .auth-card {
        max-width: 500px;
        padding: 3rem;
    }
    
    .auth-title {
        font-size: 2rem;
    }
}

/* 小螢幕 (手機) */
@media (max-width: 768px) {
    .auth-container {
        padding: 1rem;
        min-height: 100vh;
        align-items: flex-start;
        padding-top: 2rem;
    }
    
    .auth-card {
        padding: 2rem;
        width: 100%;
        max-width: 100%;
        margin: 0;
    }
    
    .auth-title {
        font-size: 1.5rem;
    }
    
    .auth-logo {
        width: 70px;
        height: 70px;
    }
    
    .auth-logo i {
        font-size: 1.8rem;
    }
    
    .verify-actions {
        flex-direction: column;
    }
    
    .floating-icon {
        font-size: 1.5rem;
    }
    
    .form-input {
        padding: 1rem 1.25rem;
    }
    
    .auth-btn {
        padding: 1rem 1.5rem;
    }
}

/* 超小螢幕 */
@media (max-width: 480px) {
    .auth-container {
        padding: 0.5rem;
        padding-top: 1rem;
    }
    
    .auth-card {
        padding: 1.5rem;
        border-radius: 15px;
    }
    
    .auth-logo {
        width: 60px;
        height: 60px;
    }
    
    .auth-logo i {
        font-size: 1.5rem;
    }
    
    .auth-title {
        font-size: 1.3rem;
    }
    
    .auth-subtitle {
        font-size: 0.9rem;
    }
    
    .verify-icon {
        width: 80px;
        height: 80px;
    }
    
    .verify-icon i {
        font-size: 2rem;
    }
    
    .form-input {
        padding: 0.875rem 1rem;
        font-size: 0.95rem;
    }
    
    .auth-btn {
        padding: 0.875rem 1.25rem;
        font-size: 0.95rem;
    }
}

/* 橫向模式優化 */
@media (max-height: 600px) and (orientation: landscape) {
    .auth-container {
        padding: 1rem;
        align-items: flex-start;
        padding-top: 1rem;
    }
    
    .auth-card {
        padding: 2rem;
        max-width: 500px;
    }
    
    .auth-header {
        margin-bottom: 1.5rem;
    }
    
    .auth-logo {
        width: 60px;
        height: 60px;
        margin-bottom: 1rem;
    }
    
    .auth-title {
        font-size: 1.5rem;
        margin-bottom: 0.25rem;
    }
    
    .auth-subtitle {
        font-size: 0.9rem;
    }
    
    .form-group {
        margin-bottom: 1rem;
    }
    
    .form-options {
        margin-bottom: 1.5rem;
    }
}

/* 載入狀態 */
.auth-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.auth-btn.loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 錯誤狀態 */
.form-input.error {
    border-color: var(--danger-color);
    box-shadow: 0 0 0 3px rgba(255, 71, 87, 0.1);
}

.error-message {
    color: var(--danger-color);
    font-size: 0.9rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* 成功狀態 */
.success-message {
    color: var(--success-color);
    font-size: 0.9rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* 欄位錯誤樣式 */
.field-error {
    color: var(--danger-color);
    font-size: 0.8rem;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.field-error::before {
    content: '⚠';
    font-size: 0.7rem;
}

.auth-input.error {
    border-color: var(--danger-color);
    box-shadow: 0 0 0 2px rgba(255, 71, 87, 0.2);
}

/* 通知樣式 */
.auth-notification {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow-glow);
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    max-width: 400px;
}

.auth-notification.show {
    transform: translateX(0);
}

.auth-notification.success {
    border-color: var(--success-color);
    background: rgba(46, 213, 115, 0.1);
}

.auth-notification.error {
    border-color: var(--danger-color);
    background: rgba(255, 71, 87, 0.1);
}

.auth-notification.info {
    border-color: var(--primary-color);
    background: rgba(0, 212, 255, 0.1);
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-primary);
}

.notification-content i {
    font-size: 1.2rem;
}

.auth-notification.success .notification-content i {
    color: var(--success-color);
}

.auth-notification.error .notification-content i {
    color: var(--danger-color);
}

.auth-notification.info .notification-content i {
    color: var(--primary-color);
}

/* 按鈕載入狀態 */
.auth-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.auth-btn .fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 表單聚焦狀態 */
.auth-input-group.focused .auth-label {
    color: var(--primary-color);
    transform: translateY(-1.5rem) scale(0.85);
}

/* 響應式通知 */
@media (max-width: 768px) {
    .auth-notification {
        top: 1rem;
        right: 1rem;
        left: 1rem;
        max-width: none;
    }
}
