<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: "Noto Sans CJK SC", "Noto Sans CJK", "PingFang SC", "Microsoft YaHei", "WenQuanYi Micro Hei", "HYWenHei-85W", sans-serif;
            background-color: #ffffff;
            padding: 20px;
            line-height: 1.6;
        }

        .container {
            max-width: 1000px;
            margin: 0 auto;
            background: #ffffff;
            border-radius: 12px;
            overflow: hidden;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
        }

        .header {
            background: {{ header_bg }};
            padding: 30px;
            text-align: center;
            position: relative;
        }

        .title {
            font-size: 32px;
            font-weight: bold;
            color: {{ header_color }};
            margin: 0 0 15px 0;
        }

        .tip {
            font-size: 16px;
            color: {{ header_color }};
            background: rgba(255, 255, 255, 0.2);
            padding: 10px 20px;
            border-radius: 20px;
            display: inline-block;
            margin-top: 10px;
        }

        .table-container {
            padding: 30px;
            background: #fafafa;
        }

        .table-wrapper {
            background: white;
            border-radius: 8px;
            overflow: hidden;
            border: 1px solid #e0e0e0;
        }

        table {
            width: 100%;
            border-collapse: collapse;
            font-size: 14px;
        }

        thead {
            background: {{ header_bg }};
        }

        th {
            padding: 15px 12px;
            text-align: center;
            font-weight: bold;
            color: {{ header_color }};
            border-bottom: 2px solid {{ header_bg }};
            font-size: 15px;
        }

        td {
            padding: 12px;
            text-align: center;
            border-bottom: 1px solid #f0f0f0;
            vertical-align: middle;
        }

        tbody tr:nth-child(even) {
            background-color: #fafafa;
        }

        tbody tr:hover {
            background-color: {{ hover_bg }};
        }

        .footer {
            text-align: center;
            padding: 20px;
            color: #999;
            font-size: 14px;
            background: #f9f9f9;
        }

        /* 响应式设计 */
        @media (max-width: 768px) {
            body {
                padding: 10px;
            }
            
            .container {
                margin: 0;
            }
            
            .header {
                padding: 20px 15px;
            }
            
            .title {
                font-size: 24px;
            }
            
            .table-container {
                padding: 15px;
            }
            
            table {
                font-size: 12px;
            }
            
            th, td {
                padding: 8px 6px;
            }
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="header">
            <h1 class="title">{{ title }}</h1>
            {% if tip %}
            <div class="tip">{{ tip }}</div>
            {% endif %}
        </div>
        
        <div class="table-container">
            <div class="table-wrapper">
                <table>
                    <thead>
                        <tr>
                            {% for column in columns %}
                            <th>{{ column }}</th>
                            {% endfor %}
                        </tr>
                    </thead>
                    <tbody>
                        {% for row in data %}
                        <tr>
                            {% for cell in row %}
                            <td>{{ cell }}</td>
                            {% endfor %}
                        </tr>
                        {% endfor %}
                    </tbody>
                </table>
            </div>
        </div>
        
        {% if footer %}
        <div class="footer">{{ footer }}</div>
        {% endif %}
    </div>
</body>
</html>