:root {
    --primary: #5D5CDE;
    --primary-dark: #4a49b7;
    --secondary: #FF6B6B;
    --tertiary: #4ECDC4;
    --light-bg: #FFFFFF;
    --dark-bg: #181818;
    --light-card: #F8F9FA;
    --dark-card: #2D2D2D;
    --light-text: #333333;
    --dark-text: #E0E0E0;
    --success-color: #3CAB85;
    --error-color: #F25F5C;
}

body {
    font-family: 'Segoe UI', 'Microsoft JhengHei', sans-serif;
    transition: background-color 0.3s ease, color 0.3s ease;
    background-color: var(--light-bg);
    color: var(--light-text);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.search-input {
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 16px 10px 40px;
    font-size: 16px;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 100%;
    background-color: white;
}

.search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(93, 92, 222, 0.2);
    outline: none;
}

.search-select {
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 16px;
    transition: all 0.3s ease;
    background-color: white;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%235D5CDE'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 20px;
    padding-right: 40px;
    width: 100%;
    max-width: 100%;
}

.search-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(93, 92, 222, 0.2);
    outline: none;
}

.search-select option {
    padding: 10px;
}

.search-select option[class="pl-6"] {
    padding-left: 24px;
    color: #666;
    font-size: 15px;
}

.btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    max-width: 100%;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    border: 2px solid var(--primary);
}

.btn-primary:hover {
    background-color: white;
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(93, 92, 222, 0.2);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: none;
}

.btn-outline {
    background-color: transparent;
    border: 2px solid #e2e8f0;
    color: var(--light-text);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(93, 92, 222, 0.1);
}

.btn-outline.active {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
}

.sort-btn {
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 5px;
}

.sort-btn.rating {
    background-color: #FFD700;
    color: #333;
    border: 2px solid #FFD700;
}

.sort-btn.rating:hover, .sort-btn.rating.active {
    background-color: white;
    color: #CC9900;
}

.sort-btn.popularity {
    background-color: #FF6B6B;
    color: white;
    border: 2px solid #FF6B6B;
}

.sort-btn.popularity:hover, .sort-btn.popularity.active {
    background-color: white;
    color: #D63031;
}

.sort-btn.commission {
    background-color: #4ECDC4;
    color: white;
    border: 2px solid #4ECDC4;
}

.sort-btn.commission:hover, .sort-btn.commission.active {
    background-color: white;
    color: #1A8F89;
}

.agent-card {
    border-radius: 12px;
    overflow: hidden;
    background-color: var(--light-card);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    margin-bottom: 20px;
    cursor: pointer;
}

.agent-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.avatar {
    width: 120px !important;
    height: 120px !important;
    min-width: 120px !important;
    min-height: 120px !important;
    max-width: 120px !important;
    max-height: 120px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    border: 3px solid white !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    aspect-ratio: 1 / 1 !important;
    display: block !important;
    flex-shrink: 0 !important;
    overflow: hidden !important;
}

.company-name {
    color: var(--primary);
    font-weight: 700;
}

.agent-name {
    font-weight: 600;
}

.license {
    color: #718096;
    font-size: 0.875rem;
}

.area-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    background-color: #EBF4FF;
    color: #3182CE;
    font-weight: 600;
    font-size: 0.875rem;
    margin-right: 5px;
    margin-bottom: 5px;
}

.area-tag.main-region {
    background-color: #3182CE;
    color: white;
}

.intro-heading {
    font-weight: 600;
    color: #4A5568;
    margin-bottom: 6px;
}

.stat {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    padding: 5px;
    border-radius: 6px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.stat:hover {
    background-color: rgba(93, 92, 222, 0.1);
}

.stat-icon {
    margin-right: 8px;
    color: var(--primary);
}

.stat-value {
    font-weight: 600;
}

.book-btn, .chat-btn {
    background-color: var(--primary);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid var(--primary);
    max-width: 240px;
    margin-top: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.book-btn {
    width: auto;
}

.book-btn:hover, .chat-btn:hover {
    background-color: white;
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(93, 92, 222, 0.2);
}

.book-btn:active, .chat-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

.chat-btn {
    background-color: var(--primary);
    color: white;
    margin-top: 8px;
    width: auto;
    display: inline-flex;
    padding: 6px 12px;
}

.pagination-btn {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    margin: 0 5px;
    transition: all 0.3s ease;
    cursor: pointer;
    font-weight: 600;
    background-color: white;
    color: #4A5568;
    border: 2px solid #E2E8F0;
}

.pagination-btn.active {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pagination-btn:hover:not(.active) {
    border-color: var(--primary);
    color: var(--primary);
}

.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--light-card);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: all 0.3s ease;
}

.agent-info, .agent-stats {
    cursor: pointer;
}

.agent-info-area {
    transition: all 0.2s ease;
}

.agent-info-area:hover {
    background-color: rgba(93, 92, 222, 0.05);
}

.agent-avatar-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-right: 16px;
    flex-shrink: 0;
}

/* Agent Modal Container */
.agent-modal-container {
    background-color: white;
    border-radius: 12px;
    width: 100%;
    max-width: 900px;
    overflow-y: auto;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    transform: translateY(20px);
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .search-row {
        flex-direction: row;
        flex-wrap: wrap;
        position: relative;
    }
    
    .search-col:first-child {
        width: 100%;
        margin-bottom: 15px;
    }
    
    .search-col:nth-child(2) {
        width: calc(100% - 130px);
        margin-bottom: 15px;
        padding-right: 5px;
    }
    
    .search-col:nth-child(3) {
        width: 130px;
        margin-bottom: 15px;
        padding-left: 0;
        position: absolute;
        right: 2px;
        bottom: 0;
    }
    
    .sort-options {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .sort-btn {
        margin-bottom: 10px;
    }
    
    .agent-content {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .agent-info {
        width: 100%;
        padding-left: 0;
        padding-top: 15px;
        order: 3;
    }
    
    .agent-stats {
        padding: 0 15px;
        border-left: none;
        display: flex;
        flex-direction: column;
        order: 2;
        width: calc(100% - 166px);
    }
    
    .agent-stats > div {
        display: flex;
        flex-direction: column;
    }
    
    .book-btn {
        width: 160px;
        max-width: 160px;
    }
    
    .agent-avatar-section {
        margin-right: 0;
        width: 166px;
        order: 1;
        flex-shrink: 0;
    }
    
    .stat {
        margin-bottom: 4px;
    }
}

/* 添加3.5英吋或更小屏幕的特殊樣式 */
@media (max-width: 480px) {
    .agent-stats .stat {
        display: block;
        text-align: right;
    }
    
    .agent-stats .stat-icon {
        display: inline-block;
        vertical-align: middle;
    }
    
    .agent-stats .stat-label {
        display: inline-block;
        vertical-align: middle;
    }
    
    .agent-stats .stat-value {
        display: block;
        margin-left: 0 !important;
        margin-top: 2px;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* Placeholder animation */
.placeholder-pulse {
    overflow: hidden;
    position: relative;
}

.placeholder-pulse::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, 
              rgba(255, 255, 255, 0) 0%, 
              rgba(255, 255, 255, 0.6) 50%, 
              rgba(255, 255, 255, 0) 100%);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Chat Modal Styles */
#chatModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    opacity: 0;
    pointer-events: none;
}

#chatModal.open {
    opacity: 1;
    pointer-events: auto;
}

.chat-container {
    background-color: var(--light-bg);
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    margin: 0 16px;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

#chatModal.open .chat-container {
    transform: translateY(0);
}

.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    border-bottom: 1px solid #e2e8f0;
    background-color: var(--light-card);
}

.chat-header-info {
    display: flex;
    align-items: center;
}

.chat-header-avatar {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    max-width: 40px !important;
    max-height: 40px !important;
    border-radius: 50% !important;
    margin-right: 12px;
    object-fit: cover !important;
    border: 2px solid white !important;
    aspect-ratio: 1 / 1 !important;
    display: block !important;
    flex-shrink: 0 !important;
    overflow: hidden !important;
}

.chat-header-text h3 {
    font-weight: 600;
    margin: 0;
    color: var(--light-text);
}

.chat-header-text p {
    font-size: 0.875rem;
    margin: 0;
    color: #718096;
}

.chat-close-btn {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: #718096;
    transition: all 0.2s ease;
}

.chat-close-btn:hover {
    color: var(--primary);
}

#chatBox {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    max-height: 400px;
    min-height: 150px;
}

.message {
    display: flex;
    margin-bottom: 15px;
    position: relative;
}

.message.agent {
    justify-content: flex-end;
}

.message.user {
    justify-content: flex-start;
}

.message-content {
    max-width: 70%;
    padding: 10px 15px;
    border-radius: 18px;
    position: relative;
    word-break: break-word;
}

.message.user .message-content {
    background-color: var(--primary);
    color: white;
    border-top-left-radius: 4px;
}

.message.agent .message-content {
    background-color: #E2E8F0;
    color: var(--light-text);
    border-top-right-radius: 4px;
}

.message.warning .message-content {
    background-color: #FED7D7;
    color: #C53030;
    border-radius: 8px;
    font-weight: 500;
    max-width: 90%;
    margin: 10px auto;
}

.chat-input-container {
    padding: 15px;
    background-color: var(--light-card);
    border-top: 1px solid #e2e8f0;
    display: flex;
}

#messageInput {
    flex: 1;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    padding: 10px 16px;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
    background-color: white;
}

#messageInput:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(93, 92, 222, 0.2);
}

#sendMessageBtn {
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 24px;
    width: 40px;
    height: 40px;
    margin-left: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

#sendMessageBtn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

#sendMessageBtn:active {
    transform: translateY(0);
}

#chatWarning {
    display: none;
}

/* 預約表單模態彈窗樣式 */
#bookingModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    opacity: 0;
    pointer-events: none;
}

#bookingModal.open {
    opacity: 1;
    pointer-events: auto;
    display: flex;
}

.booking-container {
    background-color: var(--light-bg);
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    margin: 0 16px;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

#bookingModal.open .booking-container {
    transform: translateY(0);
}

.booking-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-radius: 12px 12px 0 0;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.booking-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: absolute;
    right: 20px;
}

.booking-close-btn:hover {
    transform: scale(1.1);
}

.booking-agent-info {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #e2e8f0;
    background-color: var(--light-card);
}

.booking-agent-avatar {
    width: 60px !important;
    height: 60px !important;
    min-width: 60px !important;
    min-height: 60px !important;
    max-width: 60px !important;
    max-height: 60px !important;
    border-radius: 50% !important;
    margin-right: 15px;
    object-fit: cover !important;
    border: 3px solid white !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    aspect-ratio: 1 / 1 !important;
    display: block !important;
    flex-shrink: 0 !important;
    overflow: hidden !important;
}

.booking-agent-details h3 {
    margin: 0 0 5px 0;
    font-weight: 600;
    color: var(--light-text);
}

.booking-agent-details p {
    margin: 0;
    color: #718096;
    font-size: 0.875rem;
}

.form-field {
    position: relative;
    transition: all 0.3s;
    margin-bottom: 16px;
}

.form-field:hover {
    transform: translateY(-2px);
}

.form-field label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 5px;
    color: var(--light-text);
}

.form-field input, 
.form-field select, 
.form-field textarea {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background-color: #f9fafb;
    transition: all 0.3s ease;
}

.form-field input:focus, 
.form-field select:focus, 
.form-field textarea:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(93, 92, 222, 0.2);
}

.radio-item {
    position: relative;
    display: inline-block;
    margin-right: 15px;
    margin-bottom: 10px;
}

.radio-item input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.radio-item label {
    display: inline-block;
    padding-left: 30px;
    position: relative;
    cursor: pointer;
    font-weight: normal;
}

.radio-item label:before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #cbd5e1;
    background-color: #f9fafb;
    transition: all 0.3s ease;
}

.radio-item input[type="radio"]:checked + label:before {
    border-color: var(--primary);
    background-color: var(--primary);
}

.radio-item label:after {
    content: '';
    position: absolute;
    left: 5px;
    top: 50%;
    transform: translateY(-50%) scale(0);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: white;
    transition: all 0.2s ease;
}

.radio-item input[type="radio"]:checked + label:after {
    transform: translateY(-50%) scale(1);
}

.card-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-radius: 10px 10px 0 0;
}

.form-card {
    background-color: var(--light-card);
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

.form-col {
    padding: 0 10px;
    flex: 1;
}

@media (max-width: 580px) {
    .form-col {
        width: 100%;
        flex: none;
    }
}

.error-message {
    color: #e53e3e;
    font-size: 0.875rem;
    margin-top: 5px;
    display: none;
}

.book-submit-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.book-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(93, 92, 222, 0.4);
}

.book-submit-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

.book-submit-btn i {
    margin-right: 8px;
}

/* 確認模態彈窗樣式 */
#confirmationModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    opacity: 0;
    pointer-events: none;
}

#confirmationModal.open {
    opacity: 1;
    pointer-events: auto;
    display: flex;
}

.confirmation-container {
    background-color: var(--light-bg);
    border-radius: 12px;
    width: 100%;
    max-width: 450px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    margin: 0 16px;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

#confirmationModal.open .confirmation-container {
    transform: translateY(0);
}

.confirmation-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-radius: 12px 12px 0 0;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.confirmation-content {
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
}

.confirmation-field {
    margin-bottom: 15px;
}

.confirmation-field-label {
    font-size: 0.85rem;
    color: #718096;
    margin-bottom: 3px;
    font-weight: 500;
}

.confirmation-field-value {
    font-weight: 600;
    font-size: 1.05rem;
}

.confirmation-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.confirmation-btn {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-edit {
    background-color: #E2E8F0;
    color: #4A5568;
    border: none;
}

.btn-edit:hover {
    background-color: #CBD5E0;
    transform: translateY(-2px);
}

.btn-confirm {
    background: linear-gradient(135deg, var(--success-color), #359e7a);
    color: white;
    border: none;
}

.btn-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(60, 171, 133, 0.4);
}

.btn-confirm i, .btn-edit i {
    margin-right: 8px;
}

/* 成功訊息樣式 */
#successModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1002;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    opacity: 0;
    pointer-events: none;
}

#successModal.open {
    opacity: 1;
    pointer-events: auto;
    display: flex;
}

.success-container {
    background-color: var(--light-bg);
    border-radius: 12px;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    margin: 0 16px;
    transform: translateY(20px);
    transition: all 0.3s ease;
    overflow: hidden;
    text-align: center;
}

#successModal.open .success-container {
    transform: translateY(0);
}

.success-header {
    background: linear-gradient(135deg, var(--success-color), #359e7a);
    color: white;
    padding: 30px 20px;
    position: relative;
}

.success-icon {
    width: 80px;
    height: 80px;
    background-color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.success-icon i {
    font-size: 40px;
    color: var(--success-color);
}

.success-content {
    padding: 30px 20px;
}

.agent-success-info {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px 0;
    padding: 15px;
    background-color: var(--light-card);
    border-radius: 10px;
}

.agent-success-avatar {
    width: 70px !important;
    height: 70px !important;
    min-width: 70px !important;
    min-height: 70px !important;
    max-width: 70px !important;
    max-height: 70px !important;
    border-radius: 50% !important;
    margin-right: 15px;
    object-fit: cover !important;
    border: 3px solid white !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    aspect-ratio: 1 / 1 !important;
    display: block !important;
    flex-shrink: 0 !important;
    overflow: hidden !important;
}

.agent-success-details {
    text-align: left;
}

.booking-number {
    display: inline-block;
    background-color: var(--primary);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 600;
    margin-top: 10px;
    font-size: 1.1rem;
}

.close-success-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background: none;
    border: none;
    border-top: 1px solid #e2e8f0;
    font-weight: 600;
    color: var(--primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-success-btn:hover {
    background-color: rgba(93, 92, 222, 0.1);
}

/* 警告訊息樣式 */
.warning-message {
    background-color: #FED7D7;
    color: #C53030;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 0.875rem;
    margin-top: 10px;
    display: none;
}

.warning-message i {
    margin-right: 8px;
}

/* 淡入淡出動畫效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* 表單相關樣式 - 從未集成的預約系統中添加 */
.btn {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.btn:focus:not(:active)::after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    100% {
        transform: scale(30, 30);
        opacity: 0;
    }
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(93, 92, 222, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, var(--secondary), #e55c5c);
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #e55c5c, var(--secondary));
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(229, 92, 92, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color), #359e7a);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, #359e7a, var(--success-color));
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(60, 171, 133, 0.4);
}

.btn.disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 主要區域標籤在意向地區選擇器中的樣式 */
.main-region-option {
    font-weight: 700; /* 使區域選項顯示為粗體 */
}

/* 手机端弹窗全屏显示 */
@media (max-width: 480px) {
    /* 所有模态框在手机端都应该全屏显示 */
    #chatModal, #bookingModal, #confirmationModal, #successModal {
        align-items: stretch !important;
        justify-content: stretch !important;
    }
    
    /* 聊天弹窗全屏 */
    .chat-container {
        max-width: 100vw !important;
        width: 100vw !important;
        height: 100vh !important;
        max-height: 100vh !important;
        border-radius: 0 !important;
        margin: 0 !important;
    }
    
    .chat-header {
        border-radius: 0 !important;
    }
    
    #chatBox {
        max-height: none !important;
        flex: 1 !important;
    }
    
    .message-content {
        max-width: 85% !important;
    }
    
    #chatModal.open .chat-container {
        transform: translateY(0) !important;
        height: 100vh !important;
        width: 100vw !important;
    }
    
    /* 预约表单弹窗全屏 */
    .booking-container {
        max-width: 100vw !important;
        width: 100vw !important;
        height: 100vh !important;
        max-height: 100vh !important;
        border-radius: 0 !important;
        margin: 0 !important;
    }
    
    .booking-header {
        border-radius: 0 !important;
    }
    
    .card-header {
        border-radius: 0 !important;
    }
    
    .form-card {
        border-radius: 0 !important;
        height: 100% !important;
    }
    
    #bookingModal.open .booking-container {
        transform: translateY(0) !important;
        height: 100vh !important;
        width: 100vw !important;
    }
    
    /* 确认弹窗全屏 */
    .confirmation-container {
        max-width: 100vw !important;
        width: 100vw !important;
        height: 100vh !important;
        max-height: 100vh !important;
        border-radius: 0 !important;
        margin: 0 !important;
        display: flex !important;
        flex-direction: column !important;
    }
    
    .confirmation-header {
        border-radius: 0 !important;
        flex-shrink: 0 !important;
    }
    
    .confirmation-content {
        max-height: none !important;
        flex: 1 !important;
        overflow-y: auto !important;
    }
    
    #confirmationModal.open .confirmation-container {
        transform: translateY(0) !important;
        height: 100vh !important;
        width: 100vw !important;
    }
    
    /* 成功弹窗全屏 */
    .success-container {
        max-width: 100vw !important;
        width: 100vw !important;
        height: 100vh !important;
        max-height: 100vh !important;
        border-radius: 0 !important;
        margin: 0 !important;
    }
    
    .success-header {
        border-radius: 0 !important;
    }
    
    #successModal.open .success-container {
        transform: translateY(0) !important;
        height: 100vh !important;
        width: 100vw !important;
    }
    
    /* Agent Modal Container 手机端全屏 - 添加父容器和transform重置 */
    .agent-modal-container {
        max-width: 100vw !important;
        width: 100vw !important;
        height: 100vh !important;
        border-radius: 0 !important;
        margin: 0 !important;
        transform: translateY(0) !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
    }
    
    /* 如果有父容器也需要全屏 */
    .modal-container:has(.agent-modal-container) {
        align-items: stretch !important;
        justify-content: stretch !important;
    }
    
    /* 通用的模态框父容器全屏设置 */
    .modal-overlay {
        align-items: stretch !important;
        justify-content: stretch !important;
    }
    
    .modal-overlay .agent-modal-container {
        transform: translateY(0) !important;
    }
}