/* ===== 洛圣都市政府官网 - 高级视觉样式 ===== */
:root {
    --primary: #1a237e;
    --primary-light: #534bae;
    --primary-dark: #000051;
    --accent: #00bcd4;
    --accent-light: #62efff;
    --gold: #ffd700;
    --glass-bg: rgba(255, 255, 255, 0.12);
    --glass-border: rgba(255, 255, 255, 0.25);
    --glass-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
    --text-primary: #1a1a2e;
    --text-light: #ffffff;
    --gradient-primary: linear-gradient(135deg, #1a237e 0%, #0d47a1 50%, #01579b 100%);
    --gradient-accent: linear-gradient(135deg, #00bcd4 0%, #009688 100%);
    --gradient-hero: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: #f0f4f8;
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ===== 毛玻璃效果 ===== */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--glass-shadow);
}

.glass-dark {
    background: rgba(15, 12, 41, 0.7);
    backdrop-filter: blur(25px) saturate(200%);
    -webkit-backdrop-filter: blur(25px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
}

.glass-card {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.glass-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    border-color: var(--accent);
}

/* ===== 液态玻璃动效 ===== */
.liquid-glass {
    position: relative;
    overflow: hidden;
}

.liquid-glass::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at center, rgba(0, 188, 212, 0.15) 0%, transparent 70%);
    animation: liquidFlow 8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes liquidFlow {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(10px, -20px) rotate(5deg); }
    50% { transform: translate(-5px, 10px) rotate(-3deg); }
    75% { transform: translate(15px, 5px) rotate(2deg); }
}

/* ===== 导航栏 ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 12px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(26, 35, 126, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    padding: 8px 40px;
    background: rgba(26, 35, 126, 0.95);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    text-decoration: none;
    font-size: 1.3em;
    font-weight: 700;
    letter-spacing: 2px;
}

.nav-brand .emblem {
    width: 40px;
    height: 40px;
    background: var(--gradient-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
    box-shadow: 0 4px 15px rgba(0, 188, 212, 0.4);
}

.nav-links {
    display: flex;
    gap: 8px;
    list-style: none;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav-links a:hover, .nav-links a.active {
    color: white;
    background: rgba(255, 255, 255, 0.12);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 60%;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
    transition: transform 0.3s ease;
}

.nav-links a:hover::after, .nav-links a.active::after {
    transform: translateX(-50%) scaleX(1);
}

/* ===== Hero区域 ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-hero);
    position: relative;
    overflow: hidden;
    padding-top: 80px;
}

.hero-bg-animation {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.hero-bg-animation .orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.4;
    animation: orbFloat 15s ease-in-out infinite;
}

.hero-bg-animation .orb:nth-child(1) {
    width: 400px; height: 400px;
    background: #1a237e;
    top: 10%; left: 20%;
    animation-delay: 0s;
}

.hero-bg-animation .orb:nth-child(2) {
    width: 300px; height: 300px;
    background: #00bcd4;
    top: 50%; right: 15%;
    animation-delay: -5s;
}

.hero-bg-animation .orb:nth-child(3) {
    width: 250px; height: 250px;
    background: #9c27b0;
    bottom: 15%; left: 35%;
    animation-delay: -10s;
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -50px) scale(1.1); }
    66% { transform: translate(-20px, 30px) scale(0.9); }
}

.hero-content {
    text-align: center;
    color: white;
    z-index: 2;
    position: relative;
    max-width: 900px;
    padding: 0 20px;
}

.hero-content h1 {
    font-size: 4em;
    font-weight: 800;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #ffffff 0%, #e0e0e0 50%, #ffffff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s ease-in-out infinite;
    background-size: 200% 100%;
}

@keyframes shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hero-content .subtitle {
    font-size: 1.4em;
    opacity: 0.8;
    margin-bottom: 40px;
    font-weight: 300;
    letter-spacing: 4px;
}

.hero-btn {
    display: inline-block;
    padding: 16px 48px;
    background: var(--gradient-accent);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1em;
    transition: all 0.4s ease;
    box-shadow: 0 8px 30px rgba(0, 188, 212, 0.4);
    position: relative;
    overflow: hidden;
}

.hero-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 188, 212, 0.6);
}

.hero-btn::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.hero-btn:hover::before { left: 100%; }

/* ===== 内容区域 ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
}

.section-title {
    font-size: 2.2em;
    font-weight: 700;
    margin-bottom: 50px;
    text-align: center;
    position: relative;
    color: var(--primary);
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--gradient-accent);
    margin: 16px auto 0;
    border-radius: 2px;
}

/* ===== 卡片网格 ===== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.news-card {
    padding: 30px;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.news-card .card-tag {
    display: inline-block;
    padding: 4px 12px;
    background: var(--gradient-accent);
    color: white;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: 600;
    margin-bottom: 12px;
}

.news-card h3 {
    font-size: 1.2em;
    margin-bottom: 10px;
    line-height: 1.5;
    transition: color 0.3s ease;
}

.news-card:hover h3 { color: var(--accent); }

.news-card p {
    color: #666;
    font-size: 0.9em;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card .card-meta {
    margin-top: 15px;
    font-size: 0.8em;
    color: #999;
    display: flex;
    justify-content: space-between;
}

/* ===== 公告列表 ===== */
.announcement-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.announcement-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.announcement-item:hover {
    transform: translateX(8px);
}

.announcement-item .level-badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.72em;
    font-weight: 600;
    white-space: nowrap;
}

.level-NORMAL { background: #e3f2fd; color: #1565c0; }
.level-IMPORTANT { background: #fff3e0; color: #e65100; }
.level-URGENT { background: #fce4ec; color: #c62828; }

.announcement-item .title { flex: 1; font-weight: 500; }
.announcement-item .date { color: #999; font-size: 0.85em; }

/* ===== 表单样式 ===== */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1em;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(0, 188, 212, 0.1);
}

textarea.form-control { min-height: 150px; resize: vertical; }

.btn {
    display: inline-block;
    padding: 14px 36px;
    border: none;
    border-radius: 12px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(26, 35, 126, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(26, 35, 126, 0.4);
}

.btn-accent {
    background: var(--gradient-accent);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 188, 212, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #e53935, #c62828);
    color: white;
}

.btn-sm { padding: 8px 20px; font-size: 0.85em; }

/* ===== 工单工牌样式 ===== */
.admin-badge {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #1a237e 0%, #283593 100%);
    border-radius: 12px;
    color: white;
    margin-bottom: 12px;
    box-shadow: 0 4px 15px rgba(26, 35, 126, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-badge .badge-avatar {
    width: 42px; height: 42px;
    background: var(--gradient-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1em;
}

.admin-badge .badge-info { line-height: 1.6; }
.admin-badge .badge-name { font-weight: 700; font-size: 1em; }
.admin-badge .badge-detail { font-size: 0.75em; opacity: 0.8; }

/* ===== 工单状态标签 ===== */
.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 600;
}

.status-OPEN { background: #e8f5e9; color: #2e7d32; }
.status-PROCESSING { background: #fff3e0; color: #e65100; }
.status-CLOSED { background: #eceff1; color: #546e7a; }

/* ===== 回复气泡 ===== */
.reply-item {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    animation: fadeInUp 0.4s ease;
}

.reply-item.admin-reply {
    flex-direction: row-reverse;
}

.reply-avatar {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    flex-shrink: 0;
}

.reply-item.admin-reply .reply-avatar {
    background: var(--gradient-accent);
}

.reply-bubble {
    max-width: 70%;
    padding: 16px 20px;
    border-radius: 16px;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.reply-item.admin-reply .reply-bubble {
    background: #e3f2fd;
}

.reply-meta {
    font-size: 0.78em;
    color: #999;
    margin-top: 8px;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== 页面内容页 ===== */
.page-header {
    padding: 120px 0 60px;
    background: var(--gradient-primary);
    color: white;
    text-align: center;
}

.page-header h1 {
    font-size: 2.5em;
    font-weight: 700;
}

.page-content {
    padding: 60px 0;
}

/* ===== 登录/注册页面 ===== */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-hero);
    position: relative;
    overflow: hidden;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    padding: 48px;
    z-index: 2;
}

.auth-card h2 {
    text-align: center;
    margin-bottom: 32px;
    color: white;
    font-size: 1.8em;
}

.auth-card .form-control {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: white;
}

.auth-card .form-control::placeholder { color: rgba(255, 255, 255, 0.5); }

.auth-card .form-control:focus {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.15);
}

.auth-card .btn { width: 100%; }

.auth-card .auth-link {
    text-align: center;
    margin-top: 20px;
    color: rgba(255, 255, 255, 0.7);
}

.auth-card .auth-link a { color: var(--accent-light); }

/* ===== 提示消息 ===== */
.alert {
    padding: 14px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-weight: 500;
    animation: slideIn 0.3s ease;
}

.alert-success { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }
.alert-error { background: #fce4ec; color: #c62828; border: 1px solid #ef9a9a; }

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

/* ===== 工单专用样式 ===== */
.wo-page {
    background: #f5f7fb;
    min-height: 100vh;
    padding-top: 70px;
}

.wo-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 30px 20px;
}

.wo-card {
    background: white;
    border-radius: 0;
    padding: 28px 32px;
    border-bottom: 1px solid #e8eaed;
}

.wo-card:first-child {
    border-radius: 12px 12px 0 0;
}

.wo-card:last-child {
    border-radius: 0 0 12px 12px;
    border-bottom: none;
}

.wo-card:only-child {
    border-radius: 12px;
    border-bottom: none;
}

.wo-header {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    font-size: 1.05em;
}

.wo-divider {
    border: none;
    border-top: 2px solid #e0e0e0;
    margin: 0;
}

.wo-section-title {
    font-size: 0.95em;
    color: #555;
    margin-bottom: 10px;
    font-weight: 600;
}

.wo-content-box {
    line-height: 1.8;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    white-space: pre-wrap;
    word-break: break-word;
}

.wo-reply-box {
    line-height: 1.8;
    padding: 16px;
    background: #e8f5e9;
    border-radius: 8px;
    white-space: pre-wrap;
    word-break: break-word;
}

.wo-supplement-box {
    line-height: 1.8;
    padding: 16px;
    background: #fff8e1;
    border-radius: 8px;
    white-space: pre-wrap;
    word-break: break-word;
}

.wo-meta {
    color: #999;
    font-size: 0.9em;
}

.wo-empty {
    text-align: center;
    color: #999;
    padding: 60px;
    background: white;
    border-radius: 12px;
}

/* ===== 管理后台 ===== */
.admin-layout {
    display: flex;
    min-height: 100vh;
    padding-top: 70px;
}

.admin-sidebar {
    width: 260px;
    background: var(--gradient-primary);
    padding: 30px 0;
    position: fixed;
    top: 70px;
    bottom: 0;
    overflow-y: auto;
}

.admin-sidebar a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 30px;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.admin-sidebar a:hover, .admin-sidebar a.active {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    border-left: 3px solid var(--accent);
}

.admin-main {
    flex: 1;
    margin-left: 260px;
    padding: 30px;
    background: #f5f7fb;
}

.admin-card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    padding: 24px;
    border-radius: 16px;
    color: white;
    text-align: center;
}

.stat-card:nth-child(1) { background: linear-gradient(135deg, #667eea, #764ba2); }
.stat-card:nth-child(2) { background: linear-gradient(135deg, #f093fb, #f5576c); }
.stat-card:nth-child(3) { background: linear-gradient(135deg, #4facfe, #00f2fe); }
.stat-card:nth-child(4) { background: linear-gradient(135deg, #43e97b, #38f9d7); }

.stat-card .stat-num { font-size: 2.5em; font-weight: 800; }
.stat-card .stat-label { opacity: 0.85; margin-top: 4px; }

/* ===== 表格 ===== */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th, .table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #555;
}

.table tr:hover td { background: #f8fffe; }

/* ===== Footer ===== */
.footer {
    background: var(--gradient-primary);
    color: white;
    padding: 50px 0 30px;
    text-align: center;
}

.footer p { opacity: 0.7; margin-top: 10px; font-size: 0.9em; }

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .hero-content h1 { font-size: 2.2em; }
    .card-grid { grid-template-columns: 1fr; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .navbar { padding: 10px 20px; }
    .nav-links { display: none; }
    .admin-sidebar { width: 200px; }
    .admin-main { margin-left: 200px; }
}

/* ===== 粒子动画 ===== */
.particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    animation: particleFloat 10s linear infinite;
}

@keyframes particleFloat {
    0% { transform: translateY(100vh) scale(0); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-100px) scale(1); opacity: 0; }
}

/* ===== 波纹效果 ===== */
.ripple-bg {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    overflow: hidden;
}

.ripple-bg svg {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 100%;
}
