/**
 * 首页特定样式
 * Index Page Specific Styles
 */

/* 非手機模式下隱藏底部浮動欄 */
.mobile-bottom-bar {
    display: none !important;
}

/* 確保容器和側邊欄布局正確 */
.container {
    max-width: 1200px !important;
    margin: 0 auto !important;
    display: grid !important;
    grid-template-columns: 1fr 352px !important;
    gap: 16px !important;
    align-items: start !important;
}

.main-content {
    min-width: 0 !important;
}

.sidebar {
    position: sticky;
    top: 12px;
    width: 100%;
    max-width: 352px;
    min-width: 0;
    box-sizing: border-box;
}

/* 搜索侧边栏 */
.search-sidebar {
    background: #ffffff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
    border: 1px solid #e8e8e8;
    position: sticky;
    top: 12px;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden;
}

/* 确保 sidebar 内的所有表单元素不会溢出 */
.sidebar *,
.search-sidebar * {
    box-sizing: border-box;
}

.sidebar input,
.sidebar button,
.sidebar select,
.sidebar textarea,
.search-sidebar input,
.search-sidebar button,
.search-sidebar select,
.search-sidebar textarea {
    max-width: 100% !important;
    box-sizing: border-box !important;
    width: 100% !important;
}

/* 确保登录表单也不会溢出 */
.login-form input,
.login-form button {
    max-width: 100% !important;
    box-sizing: border-box !important;
    width: 100% !important;
}

/* 确保所有链接和文本元素也不会溢出 */
.sidebar a,
.search-sidebar a {
    word-break: break-word;
    overflow-wrap: break-word;
}

.search-sidebar h2 {
    color: #1a1a1a;
    margin-bottom: 16px;
    font-size: 1.35em;
    padding-bottom: 10px;
    border-bottom: 2px solid #1a1a1a;
    font-weight: 600;
    letter-spacing: -0.4px;
    position: relative;
}

.search-sidebar h2::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background: #1a1a1a;
}

.search-box {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.search-box input {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid #d5d5d5;
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff;
    color: #1a1a1a;
    font-weight: 400;
    box-sizing: border-box;
    max-width: 100%;
}

.search-box input:focus {
    border-color: #1a1a1a;
    box-shadow: 0 0 0 4px rgba(26, 26, 26, 0.06);
    transform: translateY(-1px);
}

.search-box input::placeholder {
    color: #999;
    font-weight: 400;
}

.search-box button {
    width: 100%;
    padding: 12px;
    background: #1a1a1a;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    max-width: 100%;
}

.search-box button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.search-box button:hover {
    background: #2a2a2a;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.18);
}

.search-box button:hover::before {
    width: 300px;
    height: 300px;
}

.search-box button:active {
    transform: translateY(0);
}

/* 店家卡片网格 */
.stores-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 16px;
    width: 100%;
}

.store-card {
    background: #ffffff;
    border-radius: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: 1px solid #e8e8e8;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
    position: relative;
    min-width: 0; /* 防止 grid 溢出 */
    max-width: 100%;
}

.store-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 0;
    padding: 1px;
    background: linear-gradient(135deg, rgba(26,26,26,0.1) 0%, rgba(26,26,26,0) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.store-card:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 12px 28px rgba(0,0,0,0.12), 0 4px 8px rgba(0,0,0,0.08);
    border-color: #1a1a1a;
}

.store-card:hover::before {
    opacity: 1;
}

.store-image {
    width: 100%;
    height: 160px;
    object-fit: cover;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
    border: none;
    outline: none;
}

/* 確保圖片容器正確顯示 */
.store-card > .store-image:first-of-type {
    display: block;
}

.store-card > .store-image:not(:first-of-type) {
    display: flex;
    align-items: center;
    justify-content: center;
}

.store-card:hover .store-image {
    transform: scale(1.05);
}

.store-info {
    padding: 14px;
    position: relative;
}

.store-name {
    font-size: 1em;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
    line-height: 1.4;
    letter-spacing: -0.3px;
    transition: color 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.store-card:hover .store-name {
    color: #000000;
}

.store-address {
    color: #666;
    font-size: 0.95em;
    line-height: 1.5;
    display: flex;
    align-items: flex-start;
    gap: 6px;
    word-break: break-word;
    overflow-wrap: break-word;
}

.store-address i {
    color: #999;
    margin-top: 2px;
    flex-shrink: 0;
    font-size: 0.85em;
    align-self: flex-start;
}

.store-address span {
    flex: 1;
    min-width: 0;
    word-break: break-word;
    overflow-wrap: break-word;
    line-height: 1.5;
}

.store-rating-mini {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
    font-size: 0.9em;
    color: #666;
}

.store-rating-mini i {
    color: #ffa500;
    font-size: 0.9em;
}

.store-rating-mini .rating-count {
    color: #999;
    font-size: 0.85em;
}

.store-type {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #f0f0f0;
    color: #888;
    font-size: 0.85em;
    display: flex;
    align-items: center;
    gap: 6px;
}

.store-type i {
    color: #aaa;
    font-size: 0.8em;
}

/* 頁面標題區域（與 store_detail.php 一致） */
.header {
    background: #ffffff;
    border-radius: 0;
    padding: 20px 24px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
    border: 1px solid #e8e8e8;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #1a1a1a 0%, rgba(26,26,26,0.3) 100%);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    position: relative;
}

.header h1 {
    color: #1a1a1a;
    font-size: 1.5em;
    margin: 0;
    font-weight: 600;
    letter-spacing: -0.4px;
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

.header h1 i {
    margin-right: 0;
}

/* Section 樣式（與 store_detail.php 一致） */
.section {
    background: #ffffff;
    border-radius: 0;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
    border: 1px solid #e8e8e8;
    position: relative;
}

.section-title {
    font-size: 1.5em;
    color: #1a1a1a;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #1a1a1a;
    font-weight: 600;
    letter-spacing: -0.4px;
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: #1a1a1a;
}

.section-title i {
    color: #1a1a1a;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 40px;
    padding: 20px;
}

.page-link {
    padding: 10px 20px;
    background: #1a1a1a;
    color: white;
    text-decoration: none;
    border-radius: 0;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.page-link:hover {
    background: #2a2a2a;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.page-info {
    color: #666;
    font-size: 0.95em;
}

/* 无结果提示 */
.no-results {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.no-results-icon {
    font-size: 3em;
    margin-bottom: 12px;
    opacity: 0.5;
}

.no-results-icon i {
    color: #999;
}

/* 技師卡片網格 */
.technicians-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    width: 100%;
}

.technician-card {
    background: #ffffff;
    border-radius: 0;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: 1px solid #e8e8e8;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px;
    text-align: center;
}

.technician-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12), 0 4px 8px rgba(0,0,0,0.08);
    border-color: #1a1a1a;
}

.technician-avatar-wrapper {
    position: relative;
    margin-bottom: 12px;
}

.technician-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e8e8e8;
    transition: transform 0.3s ease;
}

.technician-card:hover .technician-avatar {
    transform: scale(1.05);
}

.technician-status-badge {
    position: absolute;
    bottom: 0;
    right: 0;
    padding: 4px 8px;
    border-radius: 0;
    font-size: 0.75em;
    font-weight: 600;
    white-space: nowrap;
}

.technician-status-badge.active {
    background: #e8f5e9;
    color: #2e7d32;
}

.technician-status-badge.departed {
    background: #ffebee;
    color: #c62828;
}

.technician-info {
    width: 100%;
}

.technician-name {
    font-size: 1.05em;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
    line-height: 1.4;
}

.technician-store,
.technician-location {
    font-size: 0.85em;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-bottom: 4px;
    line-height: 1.4;
}

.technician-store i,
.technician-location i {
    font-size: 0.8em;
    color: #999;
    flex-shrink: 0;
}

.technician-store span,
.technician-location span {
    word-break: break-word;
    overflow-wrap: break-word;
}

/* 响应式 */
@media (max-width: 1200px) {
    .technicians-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .container {
        grid-template-columns: 1fr !important;
        max-width: 100% !important;
        width: 100% !important;
        padding: 0 10px;
        display: flex !important;
        flex-direction: column !important;
    }
    
    .sidebar {
        position: static !important;
        margin-top: 0 !important;
        margin-bottom: 20px !important;
        order: -1 !important; /* 移到最上方 */
        max-width: 100% !important;
        width: 100% !important;
    }
    
    .main-content {
        order: 1 !important; /* 移到下方 */
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .search-sidebar {
        position: static !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .stores-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .technicians-grid {
        grid-template-columns: repeat(3, 1fr);
        width: 100% !important;
        max-width: 100% !important;
    }
}

@media (max-width: 768px) {
    /* 防止横向滚动 - 最优先设置 */
    html {
        overflow-x: hidden !important;
        overflow-y: auto !important;
        max-width: 100vw !important;
        width: 100vw !important;
        position: relative !important;
        -webkit-overflow-scrolling: touch !important;
        /* 强制禁止横向滚动 */
        touch-action: pan-y !important;
        overscroll-behavior-x: none !important;
    }
    
    body {
        overflow-x: hidden !important;
        overflow-y: auto !important;
        max-width: 100vw !important;
        width: 100vw !important;
        position: relative !important;
        -webkit-overflow-scrolling: touch !important;
        /* 强制禁止横向滚动 */
        touch-action: pan-y !important;
        overscroll-behavior-x: none !important;
        /* 确保body不会超出视口 */
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* 确保所有元素不会超出屏幕，但排除浮动层 */
    *:not(.mobile-bottom-bar):not(.mobile-bottom-bar *) {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* 特别处理可能超出的元素 */
    img, video, iframe, embed, object {
        max-width: 100% !important;
        height: auto !important;
    }
    
    /* 确保所有容器都不会超出 */
    .container,
    .main-content,
    .sidebar,
    .search-sidebar,
    .stores-grid,
    .store-card,
    .technicians-grid,
    .technician-card {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .container {
        display: flex !important;
        flex-direction: column !important;
        max-width: 100vw !important;
        width: 100vw !important;
        padding: 0 10px !important;
        margin: 0 auto !important;
        overflow-x: hidden !important;
        overflow-y: visible !important;
        box-sizing: border-box !important;
        /* 确保容器不会导致横向滚动 */
        position: relative !important;
    }
    
    .sidebar {
        order: -1 !important; /* 移到最上方 */
        margin-top: 0 !important;
        margin-bottom: 20px !important;
        max-width: 100% !important;
        width: 100% !important;
    }
    
    .main-content {
        order: 1 !important; /* 移到下方 */
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .search-sidebar {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* 隱藏sidebar中的登入狀態 */
    .sidebar .user-status {
        display: none !important;
    }
    
    .stores-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .store-card {
        min-width: 0 !important;
        width: 100% !important;
    }
    
    .technicians-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }
    
    /* 限制只显示4个技师 */
    .technicians-grid > .technician-card:nth-child(n+5) {
        display: none !important;
    }
    
    /* 隐藏评分信息 - 隐藏包含评分星星和评分数量的整个div */
    .technician-card .technician-info > div[style*="margin-top: 8px"] {
        display: none !important;
    }
    
    .technician-card .rating-stars {
        display: none !important;
    }
    
    .technician-avatar {
        width: 80px;
        height: 80px;
    }
    
    .header h1 {
        font-size: 1.3em;
    }
    
    .section-title {
        font-size: 1.3em;
    }
    
    /* 手機版隱藏側邊欄中的登入區塊 */
    .login-section {
        display: none !important;
    }
    
    /* 手機版隱藏討論區入口（未登入用戶） */
    .forum-entry-section {
        display: none !important;
    }
    
    /* 手機模式底部浮動欄 */
    .mobile-bottom-bar {
        display: flex !important;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100vw !important;
        max-width: 100vw !important;
        min-width: 100vw !important;
        background: #ffffff !important;
        border-top: 2px solid #1a1a1a !important;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1) !important;
        z-index: 10000 !important;
        padding: 2px 12px 4px 12px !important;
        align-items: flex-end !important;
        gap: 10px !important;
        min-height: 40px !important;
        overflow: visible !important; /* 允许头像溢出 */
        /* 硬件加速优化，防止滑动时位移 */
        transform: translate3d(0, 0, 0) !important;
        -webkit-transform: translate3d(0, 0, 0) !important;
        will-change: transform !important;
        backface-visibility: hidden !important;
        -webkit-backface-visibility: hidden !important;
        /* 使用视口宽度，不受文档宽度影响 */
        margin: 0 !important;
        box-sizing: border-box !important;
        -webkit-box-sizing: border-box !important;
        /* 确保不受父元素影响 */
        top: auto !important;
        /* 禁止触摸滚动影响 */
        touch-action: none !important;
        overscroll-behavior: none !important;
    }
    
    .mobile-bottom-bar .mobile-avatar-wrapper {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 2px !important;
        flex-shrink: 0 !important;
        position: relative !important;
    }
    
    .mobile-bottom-bar .mobile-avatar {
        width: 70px !important;
        height: 70px !important;
        border-radius: 50% !important;
        background: #1a1a1a !important;
        color: #ffffff !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 1.6em !important;
        font-weight: 600 !important;
        overflow: hidden !important;
        margin-top: -25px !important; /* 让头像溢出BAR上边界 */
        border: 3px solid #ffffff !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.15) !important;
    }
    
    .mobile-bottom-bar .mobile-avatar img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }
    
    .mobile-bottom-bar .mobile-user-name {
        font-size: 0.7em !important;
        font-weight: 600 !important;
        color: #1a1a1a !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
        max-width: 70px !important;
        text-align: center !important;
        margin-top: 2px !important;
    }
    
    .mobile-bottom-bar .mobile-user-info {
        flex: 1 !important;
        min-width: 0 !important;
        display: none !important; /* 隐藏原来的用户信息区域 */
    }
    
    .mobile-bottom-bar .mobile-user-role {
        display: none !important; /* 隐藏角色信息 */
    }
    
    .mobile-bottom-bar .mobile-currency {
        display: none !important; /* 隐藏货币余额 */
    }
    
    .mobile-bottom-bar .mobile-currency i {
        display: none !important;
    }
    
    .mobile-bottom-bar .mobile-actions {
        display: flex !important;
        gap: 8px !important;
        flex-shrink: 0 !important;
        align-items: center !important;
    }
    
    .mobile-bottom-bar .mobile-actions a {
        width: 44px !important;
        height: 44px !important;
        border-radius: 50% !important;
        background: #f0f0f0 !important;
        color: #1a1a1a !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        text-decoration: none !important;
        transition: all 0.3s !important;
        font-size: 1.2em !important;
        position: relative !important;
    }
    
    .mobile-bottom-bar .mobile-actions a i {
        font-size: 1.2em !important;
    }
    
    .mobile-bottom-bar .mobile-actions a:hover,
    .mobile-bottom-bar .mobile-actions a:active {
        background: #1a1a1a !important;
        color: #ffffff !important;
        transform: scale(1.1) !important;
    }
    
    .mobile-bottom-bar .mobile-actions a .badge {
        position: absolute !important;
        top: -4px !important;
        right: -4px !important;
        background: #e74c3c !important;
        color: white !important;
        border-radius: 8px !important;
        padding: 2px 5px !important;
        font-size: 0.65em !important;
        min-width: 14px !important;
        text-align: center !important;
        font-weight: 600 !important;
        line-height: 1.2 !important;
    }
    
    /* 未登入用戶的手機版底部浮動欄 */
    .mobile-bottom-bar-guest {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 8px 16px !important;
        gap: 12px !important;
    }
    
    .mobile-login-btn,
    .mobile-register-btn {
        flex: 1 !important;
        padding: 12px 16px !important;
        border-radius: 8px !important;
        font-size: 0.95em !important;
        font-weight: 600 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
        text-decoration: none !important;
        transition: all 0.3s !important;
        border: 2px solid #1a1a1a !important;
        cursor: pointer !important;
    }
    
    .mobile-login-btn {
        background: #ffffff !important;
        color: #1a1a1a !important;
    }
    
    .mobile-login-btn:active {
        background: #f0f0f0 !important;
        transform: scale(0.98) !important;
    }
    
    .mobile-register-btn {
        background: #1a1a1a !important;
        color: #ffffff !important;
    }
    
    .mobile-register-btn:active {
        background: #2a2a2a !important;
        transform: scale(0.98) !important;
    }
    
    .mobile-login-btn i,
    .mobile-register-btn i {
        font-size: 1.1em !important;
    }
    
    /* 手機版登入表單滑動面板 */
    .mobile-login-panel {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        background: #ffffff !important;
        border-top-left-radius: 20px !important;
        border-top-right-radius: 20px !important;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.15) !important;
        z-index: 10001 !important;
        transform: translateY(100%) !important;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        max-height: 80vh !important;
        overflow-y: auto !important;
        display: none !important;
    }
    
    .mobile-login-panel.show {
        transform: translateY(0) !important;
        display: block !important;
    }
    
    .mobile-login-panel-header {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 16px 20px !important;
        border-bottom: 2px solid #1a1a1a !important;
        position: sticky !important;
        top: 0 !important;
        background: #ffffff !important;
        z-index: 1 !important;
    }
    
    .mobile-login-panel-header h3 {
        margin: 0 !important;
        font-size: 1.2em !important;
        font-weight: 600 !important;
        color: #1a1a1a !important;
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
    }
    
    .mobile-login-close {
        width: 36px !important;
        height: 36px !important;
        border-radius: 50% !important;
        background: #f0f0f0 !important;
        border: none !important;
        color: #1a1a1a !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        cursor: pointer !important;
        transition: all 0.3s !important;
        font-size: 1.1em !important;
    }
    
    .mobile-login-close:active {
        background: #1a1a1a !important;
        color: #ffffff !important;
        transform: scale(0.95) !important;
    }
    
    .mobile-login-panel-body {
        padding: 20px !important;
    }
    
    .mobile-login-panel-body .login-form {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
    }
    
    .mobile-login-panel-body .login-form input {
        width: 100% !important;
        padding: 12px 16px !important;
        border: 2px solid #d5d5d5 !important;
        border-radius: 8px !important;
        font-size: 16px !important; /* 防止iOS自動縮放 */
        outline: none !important;
        transition: all 0.3s !important;
        background: #ffffff !important;
        color: #1a1a1a !important;
        box-sizing: border-box !important;
    }
    
    .mobile-login-panel-body .login-form input:focus {
        border-color: #1a1a1a !important;
        box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.1) !important;
    }
    
    .mobile-login-panel-body .login-form button {
        width: 100% !important;
        padding: 12px 16px !important;
        background: #1a1a1a !important;
        color: #ffffff !important;
        border: none !important;
        border-radius: 8px !important;
        font-size: 16px !important;
        font-weight: 600 !important;
        cursor: pointer !important;
        transition: all 0.3s !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
    }
    
    .mobile-login-panel-body .login-form button:active {
        background: #2a2a2a !important;
        transform: scale(0.98) !important;
    }
    
    .mobile-login-panel-body .login-links {
        margin-top: 16px !important;
        padding-top: 16px !important;
        border-top: 1px solid #e8e8e8 !important;
        text-align: center !important;
    }
    
    .mobile-login-panel-body .login-links a {
        color: #1a1a1a !important;
        text-decoration: none !important;
        font-size: 0.9em !important;
        display: inline-flex !important;
        align-items: center !important;
        gap: 6px !important;
        transition: color 0.3s !important;
    }
    
    .mobile-login-panel-body .login-links a:active {
        color: #2a2a2a !important;
    }
    
    .mobile-login-panel-body .login-error {
        padding: 12px 16px !important;
        background: #fee !important;
        color: #c33 !important;
        border: 1px solid #fcc !important;
        border-radius: 8px !important;
        font-size: 0.9em !important;
        margin-bottom: 16px !important;
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
    }
    
    /* 遮罩層 */
    .mobile-login-overlay {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        background: rgba(0, 0, 0, 0.5) !important;
        z-index: 10000 !important;
        opacity: 0 !important;
        visibility: hidden !important;
        transition: opacity 0.3s, visibility 0.3s !important;
    }
    
    .mobile-login-overlay.show {
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    /* 為底部浮動欄留出空間 */
    body {
        padding-bottom: 45px !important;
    }
}

@media (max-width: 480px) {
    .stores-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }
    
    .store-card {
        min-width: 0 !important;
    }
    
    .store-image {
        height: 120px !important;
    }
    
    .store-info {
        padding: 10px !important;
    }
    
    .store-name {
        font-size: 0.9em !important;
        margin-bottom: 6px !important;
    }
    
    .store-address {
        font-size: 0.85em !important;
        margin-bottom: 0 !important;
    }
    
    /* 手機模式下隱藏店家類型 */
    .store-type {
        display: none !important;
    }
    
    .technicians-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
    
    /* 限制只显示4个技师 */
    .technicians-grid > .technician-card:nth-child(n+5) {
        display: none !important;
    }
    
    /* 隐藏评分信息 - 隐藏包含评分星星和评分数量的整个div */
    .technician-card .technician-info > div[style*="margin-top: 8px"] {
        display: none !important;
    }
    
    .technician-card .rating-stars {
        display: none !important;
    }
}

/* 手機模式（768px以下）也隱藏店家類型 */
@media (max-width: 768px) {
    .store-type {
        display: none !important;
    }
}

