/* 头部样式 */
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    margin: 0 auto;
}

.back-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--dark-color);
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.header-content h1 {
    font-size: 20px;
    font-weight: 600;
    color: var(--dark-color);
    margin: 0;
}

.header-right {
    width: 40px;
}

/* 头部用户菜单按钮样式 */
.user-menu-btn {
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark-color);
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-menu-btn:hover {
    background-color: rgba(239, 68, 17, 0.1);
    color: var(--primary-color);
    transform: rotate(90deg);
}

/* 防止滚动穿透 */
body.sidebar-open {
    overflow: hidden;
}
/* 侧边栏样式 */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.sidebar {
    position: fixed;
    top: 0;
    right: -85%;
    width: 85%;
    height: 100%;
    background: white;
    z-index: 1001;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform: translateX(100%);
}

.sidebar.active {
    transform: translateX(0);
    right: 0;
}

.sidebar-header {
    padding: 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.sidebar-header h3 {
    margin: 0;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.sidebar-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.sidebar-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-menu {
    flex: 1;
    padding: 20px 0;
    overflow-y: auto;
    min-height: 0;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 16px 20px;
    color: var(--dark-color);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
    cursor: pointer;
}

.menu-item:hover {
    background: #f8fafc;
    border-left-color: var(--primary-color);
    color: var(--primary-color);
}

.menu-item i {
    width: 20px;
    text-align: center;
    font-size: 18px;
}

.menu-item span {
    font-size: 16px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid #f0f0f0;
    background: #f8fafc;
    flex-shrink: 0;
}

.app-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.app-logo {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

.app-details h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
    color: var(--dark-color);
}

.app-details p {
    margin: 0;
    color: var(--gray-color);
    font-size: 13px;
}

.location-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding: 12px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.location-info i {
    color: var(--primary-color);
}

.location-info span {
    font-size: 14px;
    color: var(--dark-color);
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.share-btn {
    width: 100%;
    padding: 12px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    color: var(--dark-color);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.share-btn:hover {
    background: #f3f4f6;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* 确保弹窗在侧边栏之上 */
.about-modal,
.contact-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1003; /* 比侧边栏更高 */
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.about-modal.active,
.contact-modal.active {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

/* 弹窗遮罩层 */
.about-modal .modal-overlay,
.contact-modal .modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 1;
}

.modal-close {
    background: #f5f5f5;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--dark-color);
    font-size: 18px;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #e5e5e5;
    transform: rotate(90deg);
}

/* 弹窗内容 */
.about-modal .modal-content,
.contact-modal .modal-content {
    position: relative;
    background: white;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    z-index: 2;
    overflow: hidden;
}

.about-modal.active .modal-content,
.contact-modal.active .modal-content {
    transform: scale(1);
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 25px;
}

.modal-footer {
    padding: 20px 25px;
    border-top: 1px solid #f0f0f0;
    text-align: center;
}

/* 关于我们弹窗特定样式 */
.about-logo {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.logo-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    color: white;
    font-size: 32px;
}

.version {
    color: var(--gray-color);
    font-size: 14px;
}

.about-section {
    margin-bottom: 25px;
}

.about-section h4 {
    font-size: 16px;
    color: var(--dark-color);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.about-section p, .about-section li {
    color: var(--gray-color);
    line-height: 1.6;
    font-size: 14px;
}

.about-section ul {
    padding-left: 20px;
}

.about-section li {
    margin-bottom: 8px;
}

/* 联系我们弹窗特定样式 */
.contact-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.contact-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.contact-section h4 {
    font-size: 16px;
    color: var(--dark-color);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-section p {
    color: var(--gray-color);
    line-height: 1.6;
    font-size: 15px;
    margin-bottom: 5px;
}

.contact-section .note {
    font-size: 13px;
    color: var(--gray-color);
    font-style: italic;
}

/* 按钮样式 */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(239, 68, 17, 0.3);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .sidebar {
        width: 90%;
        right: -90%;
    }
}

@media (max-width: 480px) {
    .sidebar {
        width: 92%;
        right: -92%;
    }
    
    .sidebar-header {
        padding: 15px;
    }
    
    .menu-item {
        padding: 14px 15px;
    }
    
    .menu-item span {
        font-size: 14px;
    }
    
    .app-info {
        padding: 12px;
    }
    
    .modal-content {
        width: 95%;
        max-height: 90vh;
    }
}

@media (min-width: 769px) {
    .sidebar {
        width: 380px;
        right: -380px;
        max-width: 85%;
    }
    
    .sidebar.active {
        right: 0;
    }
}

/* 位置信息点击区域样式 */
.location-clickable {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 8px;
    background: rgba(239, 68, 17, 0.05);
    border: 1px solid rgba(239, 68, 17, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    flex-wrap: wrap;
}

.location-clickable:hover {
    background: rgba(239, 68, 17, 0.1);
    border-color: rgba(239, 68, 17, 0.3);
    transform: translateY(-1px);
}

.location-clickable i {
    color: var(--primary-color);
}

.location-text {
    flex: 1;
    font-size: 14px;
    color: var(--dark-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.location-refresh {
    font-size: 12px;
    color: var(--primary-color);
    background: rgba(239, 68, 17, 0.1);
    padding: 3px 8px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.3s ease;
}

.location-clickable:hover .location-refresh {
    background: rgba(239, 68, 17, 0.2);
}

.location-source {
    font-size: 10px;
    color: var(--gray-color);
    text-align: right;
    margin-top: 4px;
    opacity: 0.7;
}

/* 位置权限提示样式 */
.location-permission-hint {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.15);
    z-index: 1005;
    opacity: 1;
    transition: opacity 0.3s ease;
    overflow: hidden;
    border-left: 4px solid var(--orange-color);
}

.hint-content {
    display: flex;
    align-items: flex-start;
    padding: 15px;
    gap: 12px;
}

.hint-content i {
    color: var(--orange-color);
    font-size: 20px;
    margin-top: 2px;
    flex-shrink: 0;
}

.hint-text {
    flex: 1;
}

.hint-text h4 {
    margin: 0 0 5px 0;
    font-size: 15px;
    color: var(--dark-color);
}

.hint-text p {
    margin: 0 0 5px 0;
    font-size: 13px;
    color: var(--gray-color);
    line-height: 1.4;
}

.hint-close {
    background: none;
    border: none;
    color: var(--gray-color);
    cursor: pointer;
    padding: 5px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.hint-close:hover {
    color: var(--dark-color);
    transform: rotate(90deg);
}

/* 侧边栏加载动画 */
@keyframes locationLoading {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.location-loading .location-refresh i {
    animation: locationLoading 1s linear infinite;
}