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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 头部样式 */
.header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.header .subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 300;
}

/* 主要内容区域 */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* 卡片通用样式 */
.weather-form-card,
.ai-report-card,
.weather-details-card,
.settings-card,
.features-section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
}

.weather-form-card h2,
.ai-report-card h2,
.weather-details-card h2,
.settings-card h2,
.features-section h2 {
    color: #4a5568;
    margin-bottom: 20px;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 表单样式 */
.weather-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    color: #4a5568;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group input,
.form-group select {
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 复选框样式 */
.checkbox-group h3 {
    color: #4a5568;
    margin-bottom: 15px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-weight: 500;
    color: #4a5568;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #667eea;
}

/* 按钮样式 */
.submit-btn,
.back-btn,
.action-btn {
    padding: 14px 28px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    justify-content: center;
}

.submit-btn:hover,
.back-btn:hover,
.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

/* 警告提示 */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-error {
    background-color: #fed7d7;
    color: #c53030;
    border: 1px solid #feb2b2;
}

/* 功能特色区域 */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.feature-card {
    text-align: center;
    padding: 20px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.feature-card i {
    font-size: 2.5rem;
    color: #667eea;
    margin-bottom: 15px;
}

.feature-card h3 {
    color: #4a5568;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.feature-card p {
    color: #718096;
    font-size: 0.9rem;
}

/* AI播报卡片 */
.report-content {
    background: #f7fafc;
    border-radius: 10px;
    padding: 25px;
    border-left: 4px solid #667eea;
}

.report-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #2d3748;
    margin-bottom: 20px;
    white-space: pre-wrap;
}

.report-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
    font-size: 0.9rem;
    color: #718096;
}

/* 天气详情网格 */
.weather-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.weather-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f7fafc;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.weather-item i {
    font-size: 1.5rem;
    color: #667eea;
    width: 30px;
    text-align: center;
}

.weather-info {
    display: flex;
    flex-direction: column;
}

.weather-info .label {
    font-size: 0.85rem;
    color: #718096;
    margin-bottom: 2px;
}

.weather-info .value {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
}

/* 设置网格 */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #f7fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.setting-label {
    font-weight: 500;
    color: #4a5568;
}

.setting-value {
    font-weight: 600;
    color: #2d3748;
}

/* 返回按钮容器 */
.back-button-container {
    margin-bottom: 20px;
}

/* 操作按钮区域 */
.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

.copy-btn {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
}

.share-btn {
    background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
}

.new-query-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* 页脚 */
.footer {
    text-align: center;
    padding: 20px 0;
    color: white;
    opacity: 0.8;
    margin-top: 40px;
}

/* AI播报卡片样式 */
.ai-report-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
}

.report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.report-title-section {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.report-header h2 {
    color: #4a5568;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.report-datetime {
    display: flex;
    gap: 8px;
    font-size: 0.85rem;
    color: #718096;
    margin-left: 30px; /* 与图标对齐 */
}

.report-datetime span {
    background: #f7fafc;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
}

.voice-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.voice-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    min-width: 80px;
    justify-content: center;
}

.voice-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.voice-btn:active {
    transform: translateY(0);
}

.play-btn {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
}

.pause-btn {
    background: linear-gradient(135deg, #ff9800, #f57c00);
    color: white;
}

.stop-btn {
    background: linear-gradient(135deg, #f44336, #d32f2f);
    color: white;
}

.error-btn {
    background: linear-gradient(135deg, #9e9e9e, #757575);
    color: white;
    cursor: not-allowed;
}

.voice-settings {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    flex-wrap: wrap;
}

.voice-settings label {
    color: #666;
    font-weight: 500;
    margin-right: 5px;
}

.voice-settings select {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    min-width: 80px;
}

.voice-status {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #4CAF50;
}

.voice-progress {
    display: flex;
    align-items: center;
    gap: 15px;
}

.progress-bar {
    flex: 1;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #45a049);
    border-radius: 3px;
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 14px;
    color: #666;
    font-weight: 500;
    min-width: 100px;
}

/* 进度条动画 */
@keyframes progress-animation {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

/* 语音提示动画 */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 分享面板样式 */
/* 重构后的分享面板样式 */
.share-panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.share-panel-overlay.show {
    opacity: 1;
    visibility: visible;
}

.share-panel-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    cursor: pointer;
}

.share-panel-container {
    position: relative;
    background: white;
    border-radius: 24px 24px 0 0;
    width: 100%;
    max-width: 480px;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.2);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.share-panel-overlay.show .share-panel-container {
    transform: translateY(0);
}

.share-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 24px 16px;
    border-bottom: 1px solid #f1f5f9;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.share-header-content {
    display: flex;
    align-items: center;
    gap: 16px;
}

.share-header-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

.share-header-text h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 4px 0;
}

.share-header-text p {
    font-size: 14px;
    color: #64748b;
    margin: 0;
}

.share-close-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: #f1f5f9;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #64748b;
    font-size: 16px;
    transition: all 0.2s ease;
}

.share-close-btn:hover {
    background: #e2e8f0;
    color: #475569;
    transform: scale(1.05);
}

.share-content-wrapper {
    padding: 24px;
    max-height: calc(85vh - 100px);
    overflow-y: auto;
}

/* 分享预览卡片 */
.share-preview-card {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.preview-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.preview-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
}

.preview-info h4 {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 4px 0;
}

.preview-source {
    font-size: 12px;
    color: #64748b;
}

.preview-content {
    font-size: 14px;
    color: #475569;
    line-height: 1.6;
    margin-bottom: 16px;
    max-height: 80px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
}

.preview-meta {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: #64748b;
}

/* 分享选项网格 */
.share-options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.share-option-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
    position: relative;
    overflow: hidden;
}

.share-option-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(102, 126, 234, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.share-option-card:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
}

.share-option-card:hover::before {
    opacity: 1;
}

.share-option-card:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.1);
}

.option-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    flex-shrink: 0;
}

.wechat-gradient {
    background: linear-gradient(135deg, #1aad19 0%, #00d100 100%);
}

.moments-gradient {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
}

.qr-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.link-gradient {
    background: linear-gradient(135deg, #3742fa 0%, #2f3542 100%);
}

.system-gradient {
    background: linear-gradient(135deg, #20bf6b 0%, #0fb9b1 100%);
}

.image-gradient {
    background: linear-gradient(135deg, #fd79a8 0%, #fdcb6e 100%);
}

.option-content {
    flex: 1;
    min-width: 0;
}

.option-content h5 {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 2px 0;
}

.option-content p {
    font-size: 12px;
    color: #64748b;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.option-arrow {
    color: #cbd5e1;
    font-size: 12px;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.share-option-card:hover .option-arrow {
    color: #667eea;
    transform: translateX(2px);
}

/* 响应式设计 */
@media (max-width: 480px) {
    .share-panel-container {
        max-width: 100%;
        border-radius: 20px 20px 0 0;
    }
    
    .share-content-wrapper {
        padding: 20px 16px;
    }
    
    .share-options-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .share-option-card {
        padding: 14px;
    }
    
    .option-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}

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

@keyframes shareSlideDown {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(100%);
    }
}

/* 二维码弹窗样式 */
.qr-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1100;
    backdrop-filter: blur(5px);
}

.qr-modal-content {
    background: white;
    border-radius: 20px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease-out;
}

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

.qr-modal-header h3 {
    color: #4a5568;
    font-size: 1.3rem;
    margin: 0;
}

.qr-code-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.qr-code {
    width: 200px;
    height: 200px;
    border: 2px solid #f0f0f0;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
}

.qr-tip {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .share-panel-content {
        padding: 20px;
        margin: 20px;
    }
    
    .share-options {
        grid-template-columns: 1fr;
    }
    
    .qr-modal-content {
        padding: 20px;
        margin: 20px;
    }
    
    .qr-code {
        width: 150px;
        height: 150px;
    }
    
    .report-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .voice-controls {
        width: 100%;
        justify-content: flex-start;
    }
    
    .voice-btn {
        flex: 1;
        min-width: auto;
    }
    
    .voice-settings {
        width: 100%;
        justify-content: space-between;
    }
    
    .container {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .weather-form-card,
    .ai-report-card,
    .weather-details-card,
    .settings-card,
    .features-section {
        padding: 20px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .weather-grid {
        grid-template-columns: 1fr;
    }
    
    .settings-grid {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .report-meta {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.8rem;
    }
    
    .checkbox-container {
        gap: 8px;
    }
    
    .weather-item {
        padding: 12px;
    }
    
    .setting-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}