/* 用户小程序样式 */

/* 场地排布容器 */
.court-layout-container {
    background: #f8f9fa;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

.layout-canvas-user {
    width: 100%;
    min-height: 300px;
    background: white;
    border: 2px dashed #dee2e6;
    border-radius: 0.5rem;
    position: relative;
    background-image: 
        linear-gradient(rgba(0,0,0,0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,0,0,0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    overflow: hidden;
}

/* 用户端场地元素 */
.court-item-user {
    position: absolute;
    width: 100px;
    height: 70px;
    border: 2px solid #007bff;
    border-radius: 0.5rem;
    background: white;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
    user-select: none;
}

.court-item-user:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.court-item-user.selected {
    border-color: #28a745;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.25);
}

/* 场地类型样式 */
.court-item-user.standard {
    border-color: #007bff;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
}

.court-item-user.vip {
    border-color: #ffc107;
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
}

.court-item-user.training {
    border-color: #28a745;
    background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
}

.court-item-user.competition {
    border-color: #dc3545;
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
}

.court-item-user.maintenance {
    border-color: #6c757d;
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
    opacity: 0.6;
    cursor: not-allowed;
}

.court-item-user.occupied {
    border-color: #fd7e14;
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    cursor: not-allowed;
}

/* 场地信息显示 */
.court-info-user {
    text-align: center;
    font-size: 0.7rem;
    font-weight: 600;
    color: #333;
}

.court-name-user {
    margin-bottom: 0.2rem;
    font-size: 0.75rem;
}

.court-status-user {
    font-size: 0.65rem;
    padding: 0.1rem 0.25rem;
    border-radius: 0.2rem;
    color: white;
}

.court-status-user.available {
    background: #28a745;
}

.court-status-user.occupied {
    background: #fd7e14;
}

.court-status-user.maintenance {
    background: #6c757d;
}

/* 图例样式 */
.layout-legend {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 0.25rem;
    border: 1px solid #ddd;
}

.legend-color.available {
    background: #28a745;
}

.legend-color.occupied {
    background: #fd7e14;
}

.legend-color.maintenance {
    background: #6c757d;
}

.legend-color.vip {
    background: #ffc107;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .court-item-user {
        width: 80px;
        height: 60px;
    }
    
    .layout-canvas-user {
        min-height: 250px;
    }
    
    .legend-item {
        font-size: 0.7rem;
    }
    
    .legend-color {
        width: 12px;
        height: 12px;
    }
}
.main-content-mobile {
    padding-top: 70px;
    padding-bottom: 80px;
    min-height: 100vh;
}

/* 搜索区域样式 */
.search-section {
    margin-top: -20px;
    border-radius: 0 0 20px 20px;
}

/* 场馆卡片样式 */
.venue-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.venue-card:hover {
    transform: translateY(-2px);
}

.venue-image {
    position: relative;
}

.venue-badge {
    position: absolute;
    top: 10px;
    right: 10px;
}

.venue-info {
    background: white;
}

.venue-rating {
    display: flex;
    align-items: center;
}

.venue-features .badge {
    font-size: 0.7rem;
}

/* 活动卡片样式 */
.activity-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.activity-card:hover {
    transform: translateY(-2px);
}

.activity-image {
    height: 120px;
    overflow: hidden;
}

.activity-info {
    background: white;
}

/* 场馆详情样式 */
.venue-detail-header {
    background: white;
    margin-bottom: 20px;
}

.venue-detail-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.venue-detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.back-btn {
    position: absolute;
    top: 15px;
    left: 15px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 场地卡片样式 */
.court-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    cursor: pointer;
}

.court-card:hover {
    transform: translateY(-2px);
}

.court-card.available {
    border: 2px solid #28a745;
}

.court-card.occupied {
    border: 2px solid #ffc107;
    opacity: 0.7;
}

.court-card.maintenance {
    border: 2px solid #dc3545;
    opacity: 0.5;
}

.court-card.selected {
    border: 2px solid #007bff;
    background-color: rgba(0,123,255,0.1);
}

/* 时间选择样式 */
.time-slot {
    border-radius: 8px;
    transition: all 0.3s ease;
}

.time-slot.selected {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

.time-slot.disabled {
    background-color: #e9ecef;
    color: #6c757d;
    border-color: #e9ecef;
    cursor: not-allowed;
}

/* 预订摘要样式 */
.booking-summary {
    border: 1px solid #e9ecef;
}

/* 订单卡片样式 */
.order-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.order-header {
    background-color: #f8f9fa;
}

.order-body {
    background: white;
}

.order-footer {
    background-color: #f8f9fa;
}

/* 个人中心样式 */
.profile-header {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.profile-avatar img {
    width: 80px;
    height: 80px;
    object-fit: cover;
}

.profile-stats {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.stat-item {
    padding: 10px;
}

/* 底部导航样式 */
.bottom-nav {
    z-index: 1000;
    padding: 8px 0;
}

.nav-item {
    color: #6c757d;
    text-decoration: none;
    border: none;
    background: none;
    padding: 8px;
    transition: color 0.3s ease;
}

.nav-item.active {
    color: #007bff;
}

.nav-item:hover {
    color: #007bff;
}

.nav-item i {
    font-size: 18px;
}

/* 订单标签样式 */
.order-tabs .btn-group .btn {
    border-radius: 0;
}

.order-tabs .btn-group .btn:first-child {
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

.order-tabs .btn-group .btn:last-child {
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

/* 响应式设计 */
@media (max-width: 576px) {
    .main-content-mobile {
        padding-top: 60px;
    }
    
    .venue-card .venue-info {
        padding: 15px;
    }
    
    .activity-card .activity-info {
        padding: 15px;
    }
    
    .court-card .court-info {
        padding: 15px;
    }
}

/* 动画效果 */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.content-section {
    animation: slideInRight 0.3s ease-out;
}

.content-section.slide-left {
    animation: slideInLeft 0.3s ease-out;
}

/* 加载状态 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}
