:root {
    --primary-gradient: linear-gradient(135deg, #60a5fa, #3b82f6);
    --secondary-gradient: linear-gradient(135deg, #f87171, #ef4444);
    --tertiary-gradient: linear-gradient(135deg, #6ee7b7, #34d399);
    --purple-gradient: linear-gradient(135deg, #a78bfa, #8b5cf6);
    --orange-gradient: linear-gradient(135deg, #fbbf24, #f59e0b);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f5f7fa;
    color: #334155;
    width: 100%;
    margin: 0 auto;
    position: relative;
    min-height: 100vh;
    overflow-x: hidden;
}

.card {
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.weather-main {
    background: var(--primary-gradient);
    color: white;
}

.ai-button {
    position: absolute;
    bottom: 15px;
    right: 15px;
    width: 50px;
    height: 50px;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.ai-button:hover {
    transform: scale(1.05);
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: white;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    z-index: 99;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 0;
    color: #94a3b8;
    transition: all 0.2s ease;
}

.nav-item.active {
    color: #3b82f6;
}

.nav-item[href="typhoon-path.html"].active {
    color: #ef4444;
}

.nav-item[href="typhoon-knowledge.html"].active {
    color: #34d399;
}

.nav-item[href="professional.html"].active {
    color: #8b5cf6;
}

.nav-item[href="disaster-report.html"].active {
    color: #f59e0b;
}

.nav-icon {
    font-size: 22px;
    margin-bottom: 4px;
}

.nav-text {
    font-size: 12px;
}

/* 微交互动画 */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.pulse {
    animation: pulse 2s infinite;
}

.weather-details {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px;
    margin-top: 15px;
}

.aqi-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    background-color: #84cc16;
    color: white;
}

.forecast-day {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 0;
}

.forecast-day:last-child {
    border-bottom: none;
}

.iframe-container {
    width: 100%;
    height: calc(100vh - 130px);
    overflow: hidden;
    border-radius: 16px;
    margin-top: 10px;
}

iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.page-header {
    background: var(--secondary-gradient);
    color: white;
    border-radius: 16px;
    padding: 15px;
}

.page-header.green {
    background: var(--tertiary-gradient);
}

.page-header.purple {
    background: var(--purple-gradient);
}

.page-header.orange {
    background: var(--orange-gradient);
}

/* 聊天页面样式 */
.chat-container {
    height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
    background-color: #f0f2f5;
}

.chat-header {
    background: var(--primary-gradient);
    color: white;
    padding: 16px;
    text-align: center;
    position: relative;
}

.back-button {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 20px;
}

.chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.message {
    max-width: 80%;
    margin-bottom: 16px;
    padding: 10px 14px;
    border-radius: 16px;
    position: relative;
    word-wrap: break-word;
}

.message-received {
    background-color: white;
    border-top-left-radius: 2px;
    align-self: flex-start;
    margin-right: auto;
}

.message-sent {
    background-color: #dcf8c6;
    border-top-right-radius: 2px;
    align-self: flex-end;
    margin-left: auto;
}

.chat-footer {
    padding: 12px;
    background-color: white;
    display: flex;
    align-items: center;
    border-top: 1px solid #e0e0e0;
}

.chat-input {
    flex: 1;
    border: none;
    border-radius: 20px;
    padding: 10px 15px;
    background-color: #f0f2f5;
    margin-right: 10px;
}

.chat-input:focus {
    outline: none;
}

.send-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    border: none;
    cursor: pointer;
}

/* 台风科普页面样式 */
.search-container {
    position: relative;
    margin-bottom: 16px;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

.search-input {
    width: 100%;
    padding: 8px 8px 8px 38px;
    border-radius: 20px;
    border: none;
    background-color: white;
    font-size: 14px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.search-input:focus {
    outline: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.article-card {
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 16px;
    transition: transform 0.2s;
}

.article-card:active {
    transform: scale(0.98);
}

.article-image {
    height: 150px;
    overflow: hidden;
    background-position: center;
    background-size: cover;
}

.tag {
    display: inline-block;
    padding: 2px 8px;
    background-color: rgba(52, 211, 153, 0.1);
    color: #34d399;
    border-radius: 10px;
    font-size: 11px;
    margin-right: 6px;
}

/* 专业气象页面样式 */
.tool-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    padding: 15px 10px;
    transition: all 0.2s ease;
}

.tool-button:active {
    transform: scale(0.95);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.tool-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    color: white;
}

.tool-category {
    background-color: #f1f5f9;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 16px;
}

.tool-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 10px;
    color: #64748b;
}

/* 灾情上报页面样式 */
.form-container {
    background-color: white;
    border-radius: 16px;
    padding: 15px;
    margin-bottom: 16px;
}

.form-group {
    margin-bottom: 15px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
    color: #64748b;
}

.form-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: #f59e0b;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}

.form-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
}

.form-select:focus {
    outline: none;
    border-color: #f59e0b;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}

.form-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    resize: vertical;
    min-height: 100px;
}

.form-textarea:focus {
    outline: none;
    border-color: #f59e0b;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}

.image-upload {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.upload-box {
    width: 80px;
    height: 80px;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    background-color: #f8fafc;
}

.upload-box:hover {
    border-color: #f59e0b;
    background-color: #fef3c7;
}

.preview-box {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.preview-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.delete-btn {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.submit-btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background: var(--orange-gradient);
    color: white;
    font-weight: 500;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.submit-btn:hover {
    opacity: 0.9;
} 