/* 气象科普平台 - 全局样式 */
:root {
    --sky-light: #e0f2fe;
    --sky-blue: #38bdf8;
    --sky-dark: #0284c7;
    --grass-light: #86efac;
    --grass-green: #22c55e;
    --sun-yellow: #fbbf24;
    --sun-orange: #f97316;
    --cloud-white: rgba(255, 255, 255, 0.95);
    --card-shadow: 0 8px 32px rgba(14, 165, 233, 0.15);
    --radius: 1.25rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    min-height: 100vh;
    color: #334155;
    line-height: 1.6;
}

/* 天空渐变背景 */
.sky-bg {
    background: linear-gradient(180deg, #60a5fa 0%, #93c5fd 25%, #bfdbfe 55%, #dcfce7 80%, #86efac 100%);
    position: relative;
    min-height: 100vh;
}

.sky-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 10% 15%, rgba(255,255,255,0.5) 0%, transparent 25%),
        radial-gradient(circle at 85% 10%, rgba(255,255,255,0.4) 0%, transparent 20%),
        radial-gradient(circle at 55% 30%, rgba(255,255,255,0.3) 0%, transparent 18%);
    pointer-events: none;
}

/* 草地底部装饰 */
.grass-bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 180px;
    pointer-events: none;
    z-index: 0;
}

.grass-bottom svg {
    width: 100%;
    height: 100%;
}

/* 导航栏 */
.main-nav {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 4px 24px rgba(14, 165, 233, 0.12);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-radius: 0 0 1.5rem 1.5rem;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 800;
    font-size: 1.35rem;
    color: var(--sky-dark);
}

.nav-brand-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--sky-blue), var(--sky-dark));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.35);
}

.nav-link {
    color: #475569;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.nav-link:hover,
.nav-link.active {
    color: var(--sky-dark);
    background: rgba(56, 189, 248, 0.12);
}

/* 卡片样式 */
.meteo-card {
    background: var(--cloud-white);
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: var(--card-shadow);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.meteo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(14, 165, 233, 0.2);
}

.meteo-card-body {
    padding: 1.5rem;
}

/* ===== 卡通首页样式 ===== */
.hero-banner-cartoon {
    background: url('../images/hero-bg.jpg') center/cover no-repeat;
    border-radius: 2.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(14, 165, 233, 0.25);
    aspect-ratio: 16/9;
    min-height: 300px;
    border: 4px solid rgba(255,255,255,0.5);
}

.hero-banner-cartoon::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(96,165,250,0.4) 0%, rgba(96,165,250,0.1) 60%, transparent 100%);
    pointer-events: none;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.95);
    color: var(--sky-dark);
    padding: 0.6rem 1.2rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.hero-title {
    font-size: 3.2rem;
    font-weight: 900;
    color: white;
    text-shadow: 0 3px 12px rgba(14, 165, 233, 0.4);
    letter-spacing: 2px;
}

.hero-desc {
    font-size: 1.15rem;
    color: rgba(255,255,255,0.95);
    font-weight: 500;
    text-shadow: 0 1px 4px rgba(14, 165, 233, 0.3);
}

.hero-cloud-float {
    position: absolute;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    animation: cloudFloat 6s ease-in-out infinite;
}

@keyframes cloudFloat {
    0%, 100% { transform: translateY(0) translateX(0); }
    50% { transform: translateY(-20px) translateX(10px); }
}

/* 云朵吉祥物（图片版） */
.mascot-clay {
    width: 320px;
    height: 380px;
    max-width: 100%;
    filter: drop-shadow(0 15px 30px rgba(0,0,0,0.15));
    animation: mascotBounce 3s ease-in-out infinite;
}

@keyframes mascotBounce {
    0%, 100% { transform: translateY(0) rotate(-2deg); }
    50% { transform: translateY(-18px) rotate(2deg); }
}

.mascot-small {
    width: 130px;
    height: 160px;
    filter: drop-shadow(0 6px 12px rgba(0,0,0,0.1));
    animation: mascotBounce 2.5s ease-in-out infinite;
}

.mascot-img-default {
    display: inline-block;
}

/* 板块卡片 - 卡通风格 */
.section-card {
    border-radius: 2rem;
    padding: 1.75rem;
    position: relative;
    overflow: hidden;
    min-height: 170px;
    color: white;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 12px 30px rgba(0,0,0,0.12);
    border: 3px solid rgba(255,255,255,0.4);
    text-decoration: none;
}

.section-card:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 20px 45px rgba(0,0,0,0.18);
    color: white;
}

.section-card::before {
    content: '';
    position: absolute;
    top: -30px;
    right: -30px;
    width: 120px;
    height: 120px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
}

.section-card-green {
    background: linear-gradient(135deg, #86efac 0%, #4ade80 50%, #22c55e 100%);
}
.section-card-yellow {
    background: linear-gradient(135deg, #fde047 0%, #fbbf24 50%, #f59e0b 100%);
}
.section-card-blue {
    background: linear-gradient(135deg, #7dd3fc 0%, #38bdf8 50%, #0ea5e9 100%);
}
.section-card-sky {
    background: linear-gradient(135deg, #bae6fd 0%, #60a5fa 50%, #3b82f6 100%);
}
.section-card-pink {
    background: linear-gradient(135deg, #fbcfe8 0%, #f472b6 50%, #ec4899 100%);
}

.section-card-icon {
    width: 80px;
    height: 80px;
    background: rgba(255,255,255,0.35);
    border-radius: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    flex-shrink: 0;
    backdrop-filter: blur(4px);
    border: 2px solid rgba(255,255,255,0.4);
}

.section-card h4 {
    font-size: 1.45rem;
    font-weight: 800;
    margin-bottom: 0.35rem;
}

.section-card p {
    font-size: 0.85rem;
    opacity: 0.95;
    margin: 0;
}

.section-card-mascot {
    position: absolute;
    right: 10px;
    bottom: -10px;
    width: 100px;
    height: 120px;
    opacity: 0.85;
    pointer-events: none;
    overflow: hidden;
}

.section-card-mascot svg {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* 板块图标（旧版兼容） */
.section-icon {
    width: 70px;
    height: 70px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    margin-bottom: 1rem;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.icon-blue { background: linear-gradient(135deg, #38bdf8, #0284c7); }
.icon-green { background: linear-gradient(135deg, #4ade80, #16a34a); }
.icon-yellow { background: linear-gradient(135deg, #fbbf24, #f59e0b); }
.icon-orange { background: linear-gradient(135deg, #fb923c, #ea580c); }
.icon-red { background: linear-gradient(135deg, #f87171, #dc2626); }
.icon-purple { background: linear-gradient(135deg, #a78bfa, #7c3aed); }
.icon-pink { background: linear-gradient(135deg, #f472b6, #db2777); }

/* 按钮 */
.btn-meteo {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 999px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary-meteo {
    background: linear-gradient(135deg, var(--sky-blue), var(--sky-dark));
    color: white;
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.35);
}

.btn-primary-meteo:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(56, 189, 248, 0.45);
    color: white;
}

.btn-light-meteo {
    background: rgba(255,255,255,0.9);
    color: var(--sky-dark);
}

/* ===== 气象+文旅详情页风格 ===== */
.page-title-center {
    text-align: center;
    margin-bottom: 2rem;
}

.page-title-center h1 {
    font-size: 2.4rem;
    font-weight: 900;
    color: white;
    text-shadow: 0 2px 10px rgba(14, 165, 233, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 1rem;
}

.page-title-center h1::before,
.page-title-center h1::after {
    content: '';
    width: 80px;
    height: 3px;
    background: rgba(255,255,255,0.7);
    border-radius: 2px;
}

.travel-panel {
    background: rgba(255,255,255,0.92);
    border-radius: 2rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    padding: 1.5rem;
    border: 3px solid rgba(255,255,255,0.6);
    backdrop-filter: blur(10px);
}

.weather-card {
    background: white;
    border-radius: 1.5rem;
    padding: 1.25rem;
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
    height: 100%;
}

.weather-card-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.weather-icon-big {
    width: 90px;
    height: 90px;
    margin: 0 auto 1rem;
}

.weather-temp {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--sky-dark);
    text-align: center;
}

.weather-label {
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 0.25rem;
}

.weather-value {
    font-size: 1.25rem;
    font-weight: 800;
    color: #1e293b;
}

.scenic-main-image {
    width: 100%;
    height: 100%;
    min-height: 400px;
    object-fit: cover;
    border-radius: 1.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.travel-info-card {
    background: white;
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
    transition: transform 0.3s ease;
    margin-bottom: 1rem;
}

.travel-info-card:hover {
    transform: translateY(-5px);
}

.travel-info-card img {
    width: 100%;
    height: 140px;
    object-fit: cover;
}

.travel-info-card-body {
    padding: 1rem;
}

.travel-info-card h6 {
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 0.35rem;
}

.travel-info-card p {
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 0.75rem;
}

.tag-meteo {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    background: linear-gradient(135deg, #4ade80, #22c55e);
    color: white;
}

/* 预警级别标签 */
.warning-level {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    color: white;
    font-weight: 800;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Three.js 容器 */
.three-container {
    width: 100%;
    height: 500px;
    border-radius: var(--radius);
    overflow: hidden;
    background: linear-gradient(180deg, #bae6fd 0%, #e0f2fe 50%, #f0fdf4 100%);
    box-shadow: var(--card-shadow);
    position: relative;
}

.canvas-container {
    width: 100%;
    height: 400px;
    border-radius: var(--radius);
    background: #f8fafc;
    box-shadow: var(--card-shadow);
    position: relative;
}

/* 答题样式 */
.quiz-option {
    padding: 1rem 1.25rem;
    border: 2px solid #e2e8f0;
    border-radius: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 0.75rem;
    background: white;
}

.quiz-option:hover {
    border-color: var(--sky-blue);
    background: #f0f9ff;
}

.quiz-option.correct {
    border-color: #22c55e;
    background: #f0fdf4;
}

.quiz-option.wrong {
    border-color: #ef4444;
    background: #fef2f2;
}

/* 后台管理表格 */
.admin-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.admin-table th,
.admin-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.admin-table th {
    background: #f1f5f9;
    font-weight: 700;
    color: #475569;
}

.admin-table tr:hover td {
    background: #f8fafc;
}

/* 表单样式 */
.meteo-form .form-label {
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.5rem;
}

.meteo-form .form-control,
.meteo-form .form-select {
    border: 2px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 0.625rem 1rem;
    transition: border-color 0.2s ease;
}

.meteo-form .form-control:focus,
.meteo-form .form-select:focus {
    border-color: var(--sky-blue);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

/* 动画设备卡片 */
.device-card {
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.device-card:hover,
.device-card.active {
    border-color: var(--sky-blue);
    transform: translateY(-3px);
}

.device-card.active {
    background: #f0f9ff;
}

/* 资源类型标签 */
.type-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-video { background: #dbeafe; color: #1e40af; }
.badge-ppt { background: #fce7f3; color: #9d174d; }
.badge-image { background: #dcfce7; color: #166534; }
.badge-article { background: #f3f4f6; color: #374151; }
.badge-animation { background: #fef3c7; color: #92400e; }

/* 页脚 */
.meteo-footer {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    border-top: 1px solid rgba(255, 255, 255, 0.6);
    padding: 2rem 0;
    margin-top: 3rem;
}

/* 响应式 */
@media (max-width: 768px) {
    .hero-title { font-size: 2rem; }
    .mascot-clay { width: 160px; height: 200px; }
    .section-card { min-height: 130px; padding: 1.25rem; }
    .section-card-icon { width: 60px; height: 60px; font-size: 1.6rem; }
    .scenic-main-image { min-height: 250px; }
    .three-container { height: 350px; }
    .nav-link { padding: 0.4rem 0.75rem; font-size: 0.9rem; }
    .hero-banner-cartoon { aspect-ratio: auto; min-height: 280px; }
}

/* 加载动画 */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(56, 189, 248, 0.2);
    border-top-color: var(--sky-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
