/* 台湾补助金申请系统 - 样式表 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@400;500;700&display=swap');

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #06b6d4;
    --purple-color: #8b5cf6;
    --pink-color: #ec4899;
    --orange-color: #f97316;
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --card-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    --card-hover-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans TC', 'Microsoft JhengHei', sans-serif;
    background: linear-gradient(135deg, #f0f4ff 0%, #e0e7ff 50%, #fdf2f8 100%);
    min-height: 100vh;
    position: relative;
}

/* 背景装饰 */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 50%);
    z-index: -1;
}

body::after {
    content: '';
    position: fixed;
    bottom: -50%;
    left: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.08) 0%, transparent 50%);
    z-index: -1;
}

/* 顶部导航 */
.navbar {
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: 1px;
}

.navbar-brand .icon {
    margin-right: 8px;
}

/* 主容器 */
.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* 页面标题区 */
.page-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 50px 30px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
    border-radius: 24px;
    color: white;
    box-shadow: 0 20px 60px rgba(99, 102, 241, 0.3);
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 50%);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.page-header p {
    font-size: 1.2rem;
    opacity: 0.95;
    position: relative;
    z-index: 1;
}

/* 分类标题 */
.section-title {
    display: flex;
    align-items: center;
    margin: 35px 0 20px;
    font-size: 1.2rem;
    font-weight: 600;
    color: #374151;
}

.section-title::before {
    content: '';
    width: 4px;
    height: 24px;
    background: linear-gradient(135deg, #6366f1, #ec4899);
    border-radius: 2px;
    margin-right: 12px;
}

/* 查询入口卡片 */
.query-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 20px;
    padding: 25px 30px;
    margin-bottom: 30px;
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(99, 102, 241, 0.1);
    transition: all 0.3s ease;
}

.query-card:hover {
    box-shadow: var(--card-hover-shadow);
    transform: translateY(-2px);
}

.query-card h5 {
    color: #1f2937;
    margin-bottom: 8px;
    font-weight: 600;
}

.query-card .btn {
    border-radius: 12px;
    padding: 12px 28px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.query-card .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(6, 182, 212, 0.3);
}

/* 补助项目卡片 */
.subsidy-card {
    background: white;
    border-radius: 20px;
    padding: 28px 20px;
    height: 100%;
    box-shadow: var(--card-shadow);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.subsidy-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--card-accent, linear-gradient(90deg, #6366f1, #8b5cf6));
}

.subsidy-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--card-hover-shadow);
}

.subsidy-card .card-icon {
    width: 70px;
    height: 70px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 2rem;
    color: white;
    position: relative;
}

.subsidy-card .card-icon::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 23px;
    background: inherit;
    opacity: 0.3;
    z-index: -1;
}

.subsidy-card .card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 12px;
}

.subsidy-card .amount {
    font-size: 1.6rem;
    font-weight: 700;
    background: linear-gradient(135deg, #10b981, #059669);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.subsidy-card .amount small {
    font-size: 0.8rem;
    -webkit-text-fill-color: #6b7280;
}

.subsidy-card .description {
    color: #6b7280;
    font-size: 0.85rem;
    margin-bottom: 18px;
    min-height: 40px;
    line-height: 1.5;
}

.subsidy-card .btn-apply {
    width: 100%;
    border-radius: 12px;
    padding: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.subsidy-card .btn-apply::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.subsidy-card .btn-apply:hover::before {
    left: 100%;
}

.subsidy-card .btn-apply:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* 不同颜色主题 */
.card-green { --card-accent: linear-gradient(90deg, #10b981, #059669); }
.card-blue { --card-accent: linear-gradient(90deg, #3b82f6, #2563eb); }
.card-purple { --card-accent: linear-gradient(90deg, #8b5cf6, #7c3aed); }
.card-pink { --card-accent: linear-gradient(90deg, #ec4899, #db2777); }
.card-orange { --card-accent: linear-gradient(90deg, #f97316, #ea580c); }
.card-cyan { --card-accent: linear-gradient(90deg, #06b6d4, #0891b2); }
.card-yellow { --card-accent: linear-gradient(90deg, #eab308, #ca8a04); }
.card-red { --card-accent: linear-gradient(90deg, #ef4444, #dc2626); }

/* 申请表单页 */
.form-container {
    max-width: 600px;
    margin: 0 auto;
}

.form-card {
    background: white;
    border-radius: 24px;
    padding: 45px 40px;
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.form-card .form-header {
    text-align: center;
    margin-bottom: 35px;
    padding-bottom: 25px;
    border-bottom: 2px solid #f3f4f6;
}

.form-card .form-header h2 {
    color: #1f2937;
    margin-bottom: 15px;
    font-weight: 700;
}

.form-card .form-header .badge {
    font-size: 1.3rem;
    padding: 12px 28px;
    border-radius: 30px;
    font-weight: 600;
}

.form-card .form-label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.form-card .form-control {
    border-radius: 12px;
    padding: 14px 18px;
    border: 2px solid #e5e7eb;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-card .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.form-card .form-text {
    color: #9ca3af;
    font-size: 0.85rem;
    margin-top: 6px;
}

/* 警示户勾选区 */
.alert-account-box {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #fbbf24;
    border-radius: 16px;
    padding: 20px;
    margin: 28px 0;
}

.alert-account-box .form-check-label {
    font-weight: 600;
    color: #92400e;
}

.alert-account-box .hint {
    color: #a16207;
    font-size: 0.88rem;
    margin-top: 10px;
    margin-left: 28px;
    line-height: 1.5;
}

/* 提交按钮 */
.btn-submit {
    width: 100%;
    border-radius: 14px;
    padding: 16px;
    font-size: 1.15rem;
    font-weight: 700;
    margin-top: 25px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
}

/* 查询页 */
.query-container {
    max-width: 520px;
    margin: 0 auto;
}

.query-form-card {
    background: white;
    border-radius: 24px;
    padding: 45px 40px;
    box-shadow: var(--card-shadow);
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.query-form-card h2 {
    margin-bottom: 10px;
    color: #1f2937;
    font-weight: 700;
}

.query-form-card .icon-large {
    font-size: 4.5rem;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
}

/* 查询结果 */
.result-card {
    background: white;
    border-radius: 20px;
    padding: 28px;
    margin-top: 30px;
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.result-card .result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 18px;
    border-bottom: 2px solid #f3f4f6;
}

.result-card .result-item {
    display: flex;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid #f9fafb;
}

.result-card .result-item:last-child {
    border-bottom: none;
}

.result-card .result-label {
    color: #6b7280;
    font-size: 0.9rem;
}

.result-card .result-value {
    font-weight: 600;
    color: #1f2937;
}

/* 状态标签 */
.status-badge {
    padding: 8px 18px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.85rem;
}

.status-pending {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
}

.status-approved {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #065f46;
}

.status-rejected {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #991b1b;
}

.status-paid {
    background: linear-gradient(135deg, #cffafe, #a5f3fc);
    color: #155e75;
}

/* 警示户标记 */
.alert-badge {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 10px;
}

/* 返回按钮 */
.btn-back {
    border-radius: 10px;
    padding: 8px 20px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-back:hover {
    transform: translateX(-3px);
}

/* 页脚 */
.footer {
    text-align: center;
    padding: 40px 20px;
    color: #6b7280;
    font-size: 0.9rem;
}

/* ==================== */
/* 手机版响应式优化 */
/* ==================== */

@media (max-width: 992px) {
    .main-container {
        padding: 20px 15px;
    }
    
    .page-header {
        padding: 35px 20px;
        margin-bottom: 30px;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    .page-header {
        padding: 30px 20px;
        border-radius: 18px;
        margin-bottom: 25px;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
    }
    
    .page-header p {
        font-size: 0.95rem;
    }
    
    .section-title {
        font-size: 1rem;
        margin: 25px 0 15px;
    }
    
    .query-card {
        padding: 20px;
        text-align: center;
        border-radius: 16px;
    }
    
    .query-card h5 {
        font-size: 1rem;
    }
    
    .query-card .btn {
        width: 100%;
        margin-top: 15px;
    }
    
    .subsidy-card {
        padding: 22px 16px;
        border-radius: 16px;
    }
    
    .subsidy-card .card-icon {
        width: 55px;
        height: 55px;
        font-size: 1.5rem;
        border-radius: 15px;
    }
    
    .subsidy-card .card-title {
        font-size: 0.95rem;
    }
    
    .subsidy-card .amount {
        font-size: 1.3rem;
    }
    
    .subsidy-card .description {
        display: none;
    }
    
    .subsidy-card .btn-apply {
        padding: 10px;
        font-size: 0.85rem;
    }
    
    .form-card, .query-form-card {
        padding: 30px 22px;
        border-radius: 18px;
    }
    
    .form-card .form-header h2 {
        font-size: 1.25rem;
    }
    
    .form-card .form-control {
        font-size: 16px;
        padding: 14px 16px;
    }
    
    .alert-account-box {
        padding: 16px;
    }
    
    .alert-account-box .hint {
        margin-left: 0;
        margin-top: 12px;
    }
    
    .btn-submit {
        padding: 16px;
        font-size: 1.05rem;
    }
    
    .query-form-card .icon-large {
        font-size: 3.5rem;
    }
    
    .query-form-card h2 {
        font-size: 1.3rem;
    }
    
    .result-card {
        padding: 20px;
    }
    
    .result-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 12px 0;
    }
    
    .result-label {
        font-size: 0.8rem;
        margin-bottom: 4px;
    }
    
    .footer {
        padding: 25px 15px;
        font-size: 0.8rem;
    }
}

@media (max-width: 375px) {
    .page-header h1 {
        font-size: 1.3rem;
    }
    
    .subsidy-card .amount {
        font-size: 1.15rem;
    }
    
    .form-card, .query-form-card {
        padding: 25px 18px;
    }
}

/* 触摸优化 */
@media (hover: none) and (pointer: coarse) {
    .subsidy-card:hover {
        transform: none;
    }
    
    .btn {
        min-height: 48px;
    }
    
    .form-check-input {
        width: 1.4em;
        height: 1.4em;
    }
}

/* 动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.subsidy-card {
    animation: fadeInUp 0.5s ease forwards;
}

.row .col-6:nth-child(1) .subsidy-card { animation-delay: 0.05s; }
.row .col-6:nth-child(2) .subsidy-card { animation-delay: 0.1s; }
.row .col-6:nth-child(3) .subsidy-card { animation-delay: 0.15s; }
.row .col-6:nth-child(4) .subsidy-card { animation-delay: 0.2s; }
.row .col-6:nth-child(5) .subsidy-card { animation-delay: 0.25s; }
.row .col-6:nth-child(6) .subsidy-card { animation-delay: 0.3s; }
.row .col-6:nth-child(7) .subsidy-card { animation-delay: 0.35s; }
.row .col-6:nth-child(8) .subsidy-card { animation-delay: 0.4s; }
