/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    color: #333;
    overflow: hidden;
    backdrop-filter: blur(10px);
    /* 移动端优化 */
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    /* 安全区域适配 */
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

/* 应用容器 */
.app-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    margin: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.1);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* 顶部工具栏 */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    border-radius: 20px 20px 0 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
}

.toolbar-right {
    display: flex;
    align-items: center;
}

.github-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.github-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.toolbar-left {
    display: flex;
    align-items: center;
}

.github-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.github-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

.github-btn .github-icon {
    font-size: 18px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.github-btn:hover .github-icon {
    transform: scale(1.2) rotate(10deg);
}

.app-title {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #fff 0%, #e0e7ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.toolbar-center {
    display: flex;
    align-items: center;
    gap: 24px;
    flex: 1;
    justify-content: center;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* 搜索组件样式 */
.search-group {
    display: flex;
    align-items: center;
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 4px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-input-wrapper:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.search-input-wrapper:focus-within {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.place-search-input {
    background: transparent;
    border: none;
    outline: none;
    padding: 8px 12px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    width: 200px;
    transition: all 0.3s ease;
}

.place-search-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
    font-weight: 400;
}

.place-search-input:focus {
    width: 250px;
}

.search-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(5px);
}

.search-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.search-btn:active {
    transform: scale(0.95);
}

.button-group {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 300px;
    justify-content: flex-end;
}

/* 固定坐标显示样式 */
.fixed-coord {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    border-radius: 12px;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 350px;
    z-index: 1000;
}

.fixed-coord .coord-display {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.fixed-coord .coord-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    gap: 12px;
}

.fixed-coord .coord-text {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.fixed-coord .coord-label {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.fixed-coord .coord-value {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-size: 16px;
    font-weight: 700;
    color: #000000;
    background: rgba(255, 255, 255, 0.9);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px);
    text-shadow: none;
    user-select: text;
    cursor: text;
}

.fixed-coord .coord-separator {
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
}

.copy-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    padding: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    color: white;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.copy-btn:active {
    transform: scale(0.95);
    background: rgba(0, 255, 136, 0.3);
    border-color: rgba(0, 255, 136, 0.5);
}

.copy-btn svg {
    transition: all 0.3s ease;
}

.copy-btn:hover svg {
    color: #00ff88;
}

.map-type-selector {
    display: flex;
    align-items: center;
    gap: 12px;
}

.map-type-selector label {
    font-size: 14px;
    font-weight: 600;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.map-type-select {
    padding: 10px 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    min-width: 140px;
}

.map-type-select:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.map-type-select:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

.map-type-select option {
    background: rgba(30, 30, 30, 0.95);
    color: white;
    padding: 8px;
}

.clear-btn {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 50%, #b91c1c 100%);
}

.clear-btn:hover {
    background: linear-gradient(135deg, #f87171 0%, #ef4444 50%, #dc2626 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.3);
}

.clear-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(239, 68, 68, 0.2);
}

.format-btn, .input-btn, .clear-btn {
    padding: 12px 18px;
    border: none;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    position: relative;
    overflow: hidden;
    min-width: 100px;
    justify-content: center;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.format-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 50%, #047857 100%);
}

.format-btn:hover {
    background: linear-gradient(135deg, #34d399 0%, #10b981 50%, #059669 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
}

.format-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.2);
}

.input-btn {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 50%, #6d28d9 100%);
}

.input-btn:hover {
    background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 50%, #7c3aed 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.3);
}

.input-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(139, 92, 246, 0.2);
}

.info-btn {
    background: rgba(59, 130, 246, 0.8);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.info-btn:hover {
    background: rgba(59, 130, 246, 1);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

/* 主内容区域 */
.main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* 右下角动态坐标显示 */
.dynamic-coord {
    position: absolute;
    bottom: 60px;
    right: 20px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(15px);
    border-radius: 12px;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
}

.dynamic-coord.show {
    opacity: 1;
    transform: translateY(0);
}

.coord-display {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 200px;
}

.coord-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.coord-item .coord-label {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    white-space: nowrap;
}

.coord-item .coord-value {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-size: 16px;
    font-weight: 700;
    color: #000000;
    background: rgba(255, 255, 255, 0.9);
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    text-align: center;
    backdrop-filter: blur(5px);
    min-width: 100px;
    text-shadow: none;
}

/* 移动端隐藏动态坐标 */
@media (max-width: 768px) {
    .dynamic-coord {
        display: none !important;
    }
}





/* 帮助说明 */
.help-section {
    padding: 20px;
    background: #f8f9fa;
}

.help-section h4 {
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 12px;
}

.help-section ul {
    list-style: none;
    padding: 0;
}

.help-section li {
    padding: 6px 0;
    font-size: 13px;
    color: #6c757d;
    position: relative;
    padding-left: 16px;
}

.help-section li:before {
    content: '•';
    color: #4a90e2;
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* 地图包装器 */
.map-wrapper {
    flex: 1;
    position: relative;
    overflow: hidden;
    border-radius: 0 0 12px 0;
}

/* 地图容器 */
.map-container {
    width: 100%;
    height: 100%;
    position: relative;
}

#map {
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* 地图覆盖层 */
.map-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 2;
}



/* 底部状态栏 */


/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s ease;
}

.close:hover {
    color: #333;
}

.modal h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 24px;
}

.modal p {
    line-height: 1.6;
    color: #555;
    margin-bottom: 15px;
}

.modal ul {
    padding-left: 20px;
    color: #555;
}

.modal li {
    margin-bottom: 8px;
    line-height: 1.5;
}

/* 响应式设计 - 平板设备 */
@media (max-width: 1024px) {
    /* 平板设备样式 */
}

/* 响应式设计 - 手机设备 */
@media (max-width: 768px) {
    .app-container {
        height: 100vh;
        height: 100dvh; /* 动态视口高度 */
    }
    
    .toolbar {
        padding: 8px 12px;
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
        min-height: auto;
    }
    
    .toolbar-left,
    .toolbar-center {
        justify-content: center;
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .toolbar-right {
        display: none; /* 隐藏GitHub按钮 */
    }
    
    .control-group {
        gap: 8px;
    }
    
    .button-group {
        gap: 6px;
        padding: 6px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .main-content {
        flex: 1;
        display: flex;
        flex-direction: column;
        min-height: 0;
    }
    
    .map-wrapper {
        flex: 1;
        min-height: 0;
    }
    
    .fixed-coord {
        position: fixed;
        bottom: 60px;
        right: 10px;
        left: 10px;
        min-width: unset;
        max-width: unset;
        font-size: 12px;
        z-index: 1000;
    }
    
    .coord-row {
        padding: 6px 8px;
        gap: 8px;
    }
    
    .coord-text {
        gap: 4px;
        flex-wrap: wrap;
    }
    
    .coord-label {
        font-size: 11px;
    }
    
    .coord-value {
        font-size: 14px;
        padding: 3px 6px;
        color: #000000;
        background: rgba(255, 255, 255, 0.9);
        border: 1px solid rgba(0, 0, 0, 0.2);
        text-shadow: none;
    }
    
    .coord-separator {
        font-size: 11px;
    }
    
    .copy-btn {
        width: 28px;
        height: 28px;
        padding: 4px;
        min-width: unset;
    }
    
    .github-btn {
        width: 32px;
        height: 32px;
    }
    
    .github-btn svg {
        width: 16px;
        height: 16px;
    }
    
    .format-btn,
    .input-btn {
        min-width: 80px;
        padding: 10px 14px;
        font-size: 12px;
        border-radius: 8px;
    }
    
    .format-btn svg,
    .input-btn svg {
        width: 14px;
        height: 14px;
    }
    
    .app-title {
        font-size: 1.2rem;
        text-align: center;
        margin-bottom: 4px;
    }
    

    
    .clear-btn {
        min-width: 100px;
        padding: 10px 16px;
        font-size: 12px;
        border-radius: 8px;
    }
    
    .info-btn {
        padding: 10px 16px;
        font-size: 12px;
    }
    
    .github-btn {
        padding: 10px 14px;
        font-size: 12px;
    }
    
    .map-type-select {
        min-width: 100%;
        padding: 8px 12px;
        font-size: 12px;
    }
    
    #map {
        border-radius: 0;
        touch-action: pan-x pan-y;
        height: 100% !important;
    }
    
    .leaflet-container {
        touch-action: pan-x pan-y;
    }
    
    /* 确保地图点击事件正常工作 */
    .leaflet-clickable {
        cursor: pointer;
    }
}

/* 响应式设计 - 小屏手机 */
@media (max-width: 480px) {
    .toolbar {
        padding: 6px 8px;
        gap: 6px;
    }
    
    .app-title {
        font-size: 1rem;
    }
    

    
    .clear-btn,
    .info-btn,
    .github-btn,
    .format-btn,
    .input-btn {
        min-width: 70px;
        padding: 8px 12px;
        font-size: 11px;
    }
    
    .format-btn svg,
    .input-btn svg {
        width: 12px;
        height: 12px;
    }
    
    .clear-btn svg {
        width: 14px;
        height: 14px;
    }
    
    .github-btn {
        padding: 8px 10px;
        font-size: 10px;
    }
    
    .github-btn svg {
        width: 14px;
        height: 14px;
    }
    
    .map-type-select {
        padding: 6px 8px;
        font-size: 10px;
    }
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.95) 100%);
    margin: 10% auto;
    padding: 0;
    border: none;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    padding: 25px 30px 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.close {
    color: #6b7280;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
}

.close:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    transform: scale(1.1);
}

.modal-body {
    padding: 25px 30px;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

.input-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    box-sizing: border-box;
}

.input-group input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: rgba(255, 255, 255, 0.95);
}

.input-note {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
    padding: 15px;
    border-radius: 12px;
    border-left: 4px solid #3b82f6;
}

.input-note p {
    margin: 0;
    font-size: 13px;
    color: #6b7280;
    line-height: 1.5;
}

.modal-footer {
    padding: 20px 30px 30px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.locate-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 50%, #047857 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.locate-btn:hover {
    background: linear-gradient(135deg, #34d399 0%, #10b981 50%, #059669 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

.cancel-btn {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 50%, #374151 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(107, 114, 128, 0.3);
}

.cancel-btn:hover {
    background: linear-gradient(135deg, #9ca3af 0%, #6b7280 50%, #4b5563 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(107, 114, 128, 0.4);
}

/* 移动端模态框优化 */
@media (max-width: 768px) {
    .modal-content {
        margin: 20% auto;
        width: 95%;
        border-radius: 16px;
    }
    
    .modal-header {
        padding: 20px 20px 15px;
    }
    
    .modal-header h3 {
        font-size: 1.3rem;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .modal-footer {
        padding: 15px 20px 25px;
        flex-direction: column;
    }
    
    .locate-btn,
    .cancel-btn {
        width: 100%;
        padding: 14px;
    }
}

/* 移动端触摸优化 */
@media (hover: none) and (pointer: coarse) {
    /* 增加触摸目标大小 */
    .clear-btn,
    .info-btn,
    .github-btn,
    .format-btn,
    .input-btn,
    .map-type-select {
        min-height: 44px;
        touch-action: manipulation;
    }
    
    .map-type-select {
        min-height: 44px;
        touch-action: manipulation;
    }
    
    /* 移除悬停效果，使用触摸反馈 */
    .clear-btn:hover,
    .info-btn:hover,
    .github-btn:hover {
        transform: none;
    }
    
    .clear-btn:active,
    .info-btn:active,
    .github-btn:active,
    .format-btn:active,
    .input-btn:active {
        transform: scale(0.95);
        transition: transform 0.1s;
    }
    

    
     /* 地图移动端优化 */
     #map {
         touch-action: pan-x pan-y;
     }
    
     /* 防止移动端双击缩放 */
     .leaflet-container {
         touch-action: pan-x pan-y;
     }
    
     /* 移动端文本选择优化 */
     .coord-value {
         -webkit-user-select: text;
         user-select: text;
     }
}



/* 加载动画 */
.loading {
    position: relative;
}

.loading:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #4a90e2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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