

        /* 天气卡片核心样式 */
        .weather-card {
            position: fixed;
            right: 20px;
            bottom: 20px; /* 手机端默认底部显示 */
            left: 20px;   /* 手机端自动拉伸宽度 */
            max-width: 360px; /* 限制最大宽度 */
            background: #fff;
            border-radius: 12px;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
            z-index: 9999;
            overflow: hidden;
            transition: all 0.3s ease;
            display: flex;
            flex-direction: column;
            opacity: 1;
            transform: translateY(0);
        }

        /* 平板及以上设备样式 */
        @media (min-width: 768px) {
            .weather-card {
                position: fixed;
                top: 20px;
                right: 20px;
                bottom: auto;
                left: auto;
                max-width: 320px;
                width: 320px;
            }
        }

        /* 状态标识条 */
        .weather-card::before {
            content: "";
            position: absolute;
            top: 0;
            left: 0;
            width: 4px;
            height: 100%;
            background: #4cd964;
            transition: all 0.3s ease;
        }
        .weather-card.error::before {
            background: #ff4d4f;
        }

        /* 卡片头部 */
        .card-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 12px 16px;
            border-bottom: 1px solid #f2f2f2;
        }
        .card-location {
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 14px;
            color: #333;
        }
        .card-time {
            font-size: 12px;
            color: #999;
        }

        /* 关闭按钮 */
        .close-btn {
            background: transparent;
            border: none;
            width: 28px;
            height: 28px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #999;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        .close-btn:hover {
            background: #f2f2f2;
            color: #333;
        }

        /* 卡片主体内容 */
        .card-body {
            padding: 16px;
        }

        /* 当前天气 */
        .current-weather {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 12px;
        }
        .temp {
            font-size: 28px;
            font-weight: 700;
            color: #333;
            line-height: 1;
        }
        .weather-info {
            text-align: right;
        }
        .condition {
            font-size: 14px;
            color: #666;
            margin-bottom: 4px;
            display: flex;
            align-items: center;
            justify-content: flex-end;
            gap: 4px;
        }
        .meta {
            font-size: 12px;
            color: #999;
            line-height: 1.4;
        }

        /* 天气预报 */
        .forecast {
            display: flex;
            gap: 12px;
            overflow-x: auto;
            padding-bottom: 8px;
            scrollbar-width: none;
        }
        .forecast::-webkit-scrollbar {
            display: none;
        }
        .forecast-item {
            min-width: 60px;
            text-align: center;
            font-size: 12px;
            flex-shrink: 0;
        }
        .forecast-date {
            color: #999;
            margin-bottom: 4px;
        }
        .forecast-icon {
            font-size: 18px;
            margin: 2px 0;
        }
        .forecast-temp {
            color: #333;
        }

        /* 错误提示 */
        .error-message {
            padding: 16px;
            font-size: 14px;
            color: #666;
            line-height: 1.5;
        }

        /* 加载状态 */
        .loading {
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 20px;
        }
        .loading-spinner {
            width: 24px;
            height: 24px;
            border: 3px solid #f3f3f3;
            border-top: 3px solid #4cd964;
            border-radius: 50%;
            animation: spin 1s linear infinite;
            margin-bottom: 10px;
        }
        .loading-text {
            font-size: 12px;
            color: #999;
        }

        /* 动画效果 */
        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        @keyframes fadeOut {
            from {
                opacity: 1;
                transform: translateY(0);
            }
            to {
                opacity: 0;
                transform: translateY(20px);
            }
        }
        .fade-in {
            animation: fadeIn 0.3s ease-out forwards;
        }
        .fade-out {
            animation: fadeOut 0.3s ease-in forwards;
        }