/* 表單相關樣式 */

/* 登入註冊表單 */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.auth-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    padding: 40px;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header .logo {
    font-size: 2.5rem;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 10px;
    display: block;
}

.auth-header h2 {
    color: #333;
    font-size: 1.8rem;
    margin: 0 0 12px 0;
    font-weight: 600;
}

.auth-header p {
    color: #666;
    font-size: 15px;
    line-height: 1.5;
    margin: 0;
}

.auth-form .form-group {
    margin-bottom: 20px;
}

.auth-form label {
    font-weight: 600;
    color: #555;
    margin-bottom: 8px;
    display: block;
}

.auth-form .form-control {
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    padding: 12px 15px;
    font-size: 16px;
    transition: border-color 0.3s;
}

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

.auth-form .invalid-feedback {
    display: block;
    color: #e74c3c;
    font-size: 14px;
    margin-top: 5px;
}

.auth-form .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    padding: 12px;
    font-size: 16px;
    font-weight: 600;
    width: 100%;
    margin-top: 10px;
    transition: transform 0.2s;
}

.auth-form .btn-primary:hover {
    transform: translateY(-2px);
}

.btn-auth {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.btn-auth:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.login-btn {
    width: 60%;
    text-align: right;
}

.auth-links {
    text-align: center;
    margin-top: 20px;
}

.auth-links a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.auth-links a:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* 新的表單動作佈局 */
.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 25px 0 20px 0;
    gap: 20px;
}

.form-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-wrapper input[type="checkbox"] {
    margin: 0;
    accent-color: #667eea;
    transform: scale(1.1);
}

.checkbox-wrapper label {
    font-size: 14px;
    color: #666;
    cursor: pointer;
    user-select: none;
    font-weight: 500;
}

.forgot-password-wrapper {
    margin-top: 2px;
}

.forgot-password-link {
    color: #667eea !important;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    padding: 2px 0;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
    display: inline-block;
}

.forgot-password-link:hover {
    color: #764ba2 !important;
    border-bottom-color: #764ba2;
    text-decoration: none;
    transform: translateX(2px);
}

.submit-wrapper {
    flex-shrink: 0;
    margin-left: 10px;
}

.submit-wrapper .btn-auth {
    margin: 0;
    min-width: 100px;
    padding: 14px 28px;
}

/* Alert Messages */
.alert {
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    font-size: 14px;
    line-height: 1.5;
}

.alert-danger {
    background-color: #fee;
    color: #721c24;
    border-color: #f5c6cb;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.success-icon {
    background: #28a745;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    flex-shrink: 0;
    margin-top: 2px;
}

.success-message {
    flex: 1;
}

/* 手機版優化 */
@media (max-width: 480px) {
    .form-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
    }
    
    .form-options {
        align-items: flex-start;
        gap: 12px;
    }
    
    .submit-wrapper .btn-auth {
        width: 100%;
        min-width: auto;
    }
    
    .auth-card {
        padding: 30px 20px;
        margin: 10px;
    }
    
    .auth-header .logo {
        font-size: 2rem;
    }
    
    .create-form-container {
        padding: 20px 10px;
    }
    
    .create-form {
        padding: 20px;
    }
    
    .create-form .form-actions {
        flex-direction: column;
    }
    
    .create-form .btn {
        width: 100%;
    }
    
    .search-form .search-input-group {
        flex-direction: column;
    }
    
    .search-form .search-input {
        width: 100%;
    }
    
    .search-form .search-btn {
        width: 100%;
    }
    
    .search-form .search-filters {
        flex-direction: column;
    }
    
    .search-form .filter-select {
        width: 100%;
    }
}

/* 創建內容表單 */
.create-form-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 30px 15px;
}

.create-form-header {
    text-align: center;
    margin-bottom: 30px;
}

.create-form-header h1 {
    color: #333;
    font-size: 2rem;
    margin-bottom: 10px;
}

.create-form-header p {
    color: #666;
    font-size: 1.1rem;
}

.create-form {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.create-form .form-group {
    margin-bottom: 25px;
}

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

.create-form .form-control {
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    padding: 12px 15px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.create-form .form-control:focus {
    border-color: #FF6B6B;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

.create-form textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

.create-form .file-upload-area {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    transition: border-color 0.3s;
    cursor: pointer;
}

.create-form .file-upload-area:hover {
    border-color: #FF6B6B;
}

.create-form .file-upload-area.dragover {
    border-color: #FF6B6B;
    background-color: rgba(255, 107, 107, 0.05);
}

.create-form .file-upload-icon {
    font-size: 3rem;
    color: #ccc;
    margin-bottom: 15px;
}

.create-form .file-upload-text {
    color: #666;
    font-size: 16px;
}

.create-form .file-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.create-form .file-preview-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #eee;
}

.create-form .file-preview-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.create-form .file-preview-remove {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(231, 76, 60, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
}

.create-form .form-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.create-form .btn {
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

.create-form .btn-primary {
    background: #FF6B6B;
    color: white;
}

.create-form .btn-primary:hover {
    background: #ff5252;
    transform: translateY(-2px);
}

.create-form .btn-secondary {
    background: #6c757d;
    color: white;
}

.create-form .btn-secondary:hover {
    background: #5a6268;
}

.create-form .invalid-feedback {
    display: block;
    color: #e74c3c;
    font-size: 14px;
    margin-top: 5px;
}

.create-form .help-text {
    font-size: 14px;
    color: #777;
    margin-top: 5px;
}

/* 搜尋表單 */
.search-form {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.search-form .search-input-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-form .search-input {
    flex: 1;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    padding: 10px 15px;
    font-size: 16px;
}

.search-form .search-input:focus {
    border-color: #FF6B6B;
    outline: none;
}

.search-form .search-btn {
    background: #FF6B6B;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.search-form .search-btn:hover {
    background: #ff5252;
}

.search-form .search-filters {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.search-form .filter-select {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 8px 12px;
    background: white;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .auth-card {
        padding: 30px 20px;
        margin: 10px;
    }
    
    .auth-header .logo {
        font-size: 2rem;
    }
    
    .create-form-container {
        padding: 20px 10px;
    }
    
    .create-form {
        padding: 20px;
    }
    
    .create-form .form-actions {
        flex-direction: column;
    }
    
    .create-form .btn {
        width: 100%;
    }
    
    .search-form .search-input-group {
        flex-direction: column;
    }
    
    .search-form .search-input {
        width: 100%;
    }
    
    .search-form .search-btn {
        width: 100%;
    }
    
    .search-form .search-filters {
        flex-direction: column;
    }
    
    .search-form .filter-select {
        width: 100%;
    }
}

/* ==========================================================================
   Contact & Support Forms (合作提案與問題回報表單)
   ========================================================================== */

.contact-form-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.contact-form {
    background: white;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.contact-form .form-group {
    margin-bottom: 25px;
}

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

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

.contact-form .form-input,
.contact-form .form-select,
.contact-form .form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #ffffff;
    color: #333;
    font-family: inherit;
    box-sizing: border-box;
}

.contact-form .form-input:focus,
.contact-form .form-select:focus,
.contact-form .form-textarea:focus {
    outline: none;
    border-color: #8336D6;
    box-shadow: 0 0 0 3px rgba(131, 54, 214, 0.1);
}

.contact-form .form-textarea {
    min-height: 120px;
    resize: vertical;
    line-height: 1.6;
    font-family: inherit;
}

.contact-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.contact-form .submit-btn {
    background: linear-gradient(135deg, #8336D6, #943ddf);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 20px;
}

.contact-form .submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(131, 54, 214, 0.3);
}

/* Support form specific styles */
.support-form .form-input:focus,
.support-form .form-select:focus,
.support-form .form-textarea:focus {
    border-color: #FF6B6B;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

.support-form .submit-btn {
    background: linear-gradient(135deg, #FF6B6B, #ff5555);
}

.support-form .submit-btn:hover {
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.3);
}

/* Alert Messages */
.contact-alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    font-weight: 500;
}

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

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

/* Form Validation Errors */
.contact-form .field-error {
    color: #e74c3c;
    font-size: 0.875rem;
    margin-top: 5px;
    display: block;
}

/* Tips and Help Text */
.form-tip {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 12px;
    margin-top: 8px;
    font-size: 0.875rem;
    color: #666;
    line-height: 1.4;
}

.form-tip h5 {
    color: #333;
    margin-bottom: 5px;
    font-size: 0.875rem;
    font-weight: 600;
}

/* Responsive Design for Contact Forms */
@media (max-width: 768px) {
    .contact-form-container {
        padding: 15px;
    }
    
    .contact-form {
        padding: 25px;
    }
    
    .contact-form .form-row {
        grid-template-columns: 1fr;
        gap: 25px;
    }
}

@media (max-width: 480px) {
    .contact-form {
        padding: 20px;
    }
    
    .contact-form .form-input,
    .contact-form .form-select,
    .contact-form .form-textarea {
        font-size: 16px; /* 防止 iOS 自動縮放 */
    }
}

/* Facebook 登入樣式 */
.social-login {
    margin: 30px 0 20px 0;
}

.divider {
    text-align: center;
    margin: 20px 0;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e0e0e0;
}

.divider span {
    background: white;
    padding: 0 15px;
    color: #666;
    font-size: 14px;
    position: relative;
    z-index: 1;
}

.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px 15px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    gap: 10px;
}

.btn-facebook {
    background: #1877f2;
    color: white;
}

.btn-facebook:hover {
    background: #166fe5;
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(24, 119, 242, 0.3);
}

.btn-facebook i {
    font-size: 18px;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .social-login {
        margin: 25px 0 15px 0;
    }
    
    .btn-social {
        padding: 14px 15px;
        font-size: 15px;
    }
}
