/* 全局样式 */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap');

:root {
    --primary-color: #000000;
    --secondary-color: #111111;
    --accent-color: #ffffff;
    --accent-hover: #e8e8e8;
    --gold-color: #d4af37;
    --blue-accent: #7aa6ff; /* 更柔和的蓝色点缀 */
    --red-accent: #a64d4d; /* 更柔和的红色点缀 */
    --text-color: #ffffff;
    --light-text: #d9d9d9;
    --dark-bg: #000000;
    --card-bg: #111111;
    --border-radius: 8px;
    --box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    --transition: all 0.25s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', 'Microsoft YaHei', sans-serif;
}

body {
    background-color: var(--dark-bg);
    color: var(--text-color);
    line-height: 1.6;
    position: relative;
    min-height: 100vh;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M54.627 0l.83.828-1.415 1.415L51.8 0h2.827zM5.373 0l-.83.828L5.96 2.243 8.2 0H5.374zM48.97 0l3.657 3.657-1.414 1.414L46.143 0h2.828zM11.03 0L7.372 3.657 8.787 5.07 13.857 0H11.03zm32.284 0L49.8 6.485 48.384 7.9l-7.9-7.9h2.83zM16.686 0L10.2 6.485 11.616 7.9l7.9-7.9h-2.83zm20.97 0l9.315 9.314-1.414 1.414L34.828 0h2.83zM22.344 0L13.03 9.314l1.414 1.414L25.172 0h-2.83zM32 0l12.142 12.142-1.414 1.414L30 .828 17.272 13.556l-1.414-1.414L28 0h4zM.284 0l28 28-1.414 1.414L0 2.544V0h.284zM0 5.373l25.456 25.455-1.414 1.415L0 8.2V5.374zm0 5.656l22.627 22.627-1.414 1.414L0 13.86v-2.83zm0 5.656l19.8 19.8-1.415 1.413L0 19.514v-2.83zm0 5.657l16.97 16.97-1.414 1.415L0 25.172v-2.83zM0 28l14.142 14.142-1.414 1.414L0 30.828V28zm0 5.657L11.314 44.97 9.9 46.386l-9.9-9.9v-2.828zm0 5.657L8.485 47.8 7.07 49.212 0 42.143v-2.83zm0 5.657l5.657 5.657-1.414 1.415L0 47.8v-2.83zm0 5.657l2.828 2.83-1.414 1.413L0 53.456v-2.83zM54.627 60L30 35.373 5.373 60H8.2L30 38.2 51.8 60h2.827zm-5.656 0L30 41.03 11.03 60h2.828L30 43.858 46.142 60h2.83zm-5.656 0L30 46.686 16.686 60h2.83L30 49.515 40.485 60h2.83zm-5.657 0L30 52.343 22.344 60h2.83L30 55.172 34.828 60h2.83zM32 60l-2-2-2 2h4zM59.716 0l-28 28 1.414 1.414L60 2.544V0h-.284zM60 5.373L34.544 30.828l1.414 1.415L60 8.2V5.374zm0 5.656L37.373 33.656l1.414 1.414L60 13.86v-2.83zm0 5.656l-19.8 19.8 1.415 1.413L60 19.514v-2.83zm0 5.657l-16.97 16.97 1.414 1.415L60 25.172v-2.83zM60 28L45.858 42.142l1.414 1.414L60 30.828V28zm0 5.657L48.686 44.97l1.415 1.415 9.9-9.9v-2.828zm0 5.657L51.515 47.8l1.414 1.413 7.07-7.07v-2.83zm0 5.657l-5.657 5.657 1.414 1.415L60 47.8v-2.83zm0 5.657l-2.828 2.83 1.414 1.413L60 53.456v-2.83zM39.9 16.385l1.414-1.414L30 3.658 18.686 14.97l1.415 1.415 9.9-9.9 9.9 9.9zm-2.83 2.828l1.415-1.414L30 9.313 21.515 17.8l1.414 1.413L30 11.8l7.07 7.414v-.002zm-2.827 2.83l1.414-1.416L30 14.97l-5.657 5.657 1.414 1.415L30 17.8l4.243 4.242zm-2.83 2.827l1.415-1.414L30 20.626l-2.828 2.83 1.414 1.414L30 23.456l1.414 1.414zM56.87 59.414L58.284 58 30 29.716 1.716 58l1.414 1.414L30 32.544l26.87 26.87z' fill='%23222222' fill-opacity='0.1' fill-rule='evenodd'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Cg fill-rule='evenodd'%3E%3Cpath d='M20 18c-1.105 0-2-.895-2-2 0-1.105.895-2 2-2 1.105 0 2 .895 2 2 0 1.105-.895 2-2 2zm0-5c-1.657 0-3 1.343-3 3 0 1.657 1.343 3 3 3 1.657 0 3-1.343 3-3 0-1.657-1.343-3-3-3z' fill='%231e90ff' fill-opacity='0.05'/%3E%3Cpath d='M20 21c-1.105 0-2-.895-2-2 0-1.105.895-2 2-2 1.105 0 2 .895 2 2 0 1.105-.895 2-2 2zm0-5c-1.657 0-3 1.343-3 3 0 1.657 1.343 3 3 3 1.657 0 3-1.343 3-3 0-1.657-1.343-3-3-3z' fill='%23d4af37' fill-opacity='0.05'/%3E%3Cpath d='M40 20c0-2.5-5-2.5-5-5 0-1.657 1.343-3 3-3 1.657 0 3 1.343 3 3h2c0-2.76-2.24-5-5-5s-5 2.24-5 5c0 2.5 5 2.5 5 5 0 1.657-1.343 3-3 3-1.657 0-3-1.343-3-3h-2c0 2.76 2.24 5 5 5s5-2.24 5-5c0-2.5-5-2.5-5-5 0-1.657 1.343-3 3-3 1.657 0 3 1.343 3 3 0 2.5-5 2.5-5 5z' fill='%23b22222' fill-opacity='0.03'/%3E%3C/g%3E%3C/svg%3E");
    background-attachment: fixed;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 */
header {
    text-align: center;
    padding: 40px 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: var(--border-radius);
    margin-bottom: 40px;
    box-shadow: var(--box-shadow);
    position: relative;
    overflow: hidden;
    border: 1px solid #333;
}

.logo h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 2px;
    color: var(--accent-color);
}

.logo p {
    font-size: 1.3rem;
    opacity: 0.9;
    font-weight: 500;
    letter-spacing: 1px;
    color: var(--light-text);
}

.lure-decoration {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: sway 6s infinite ease-in-out; /* 减缓动画，更协调 */
}

.lure-icon {
    font-size: 24px;
    color: var(--blue-accent);
    margin-right: 10px;
}

.lure-line {
    font-size: 20px;
    letter-spacing: 2px;
    color: var(--accent-color);
}

.lure-hook {
    font-size: 24px;
    color: var(--gold-color);
    margin-left: 10px;
    transform: rotate(45deg);
}

/* 主要内容区域 */
main {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: var(--box-shadow);
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
    border: 1px solid #333;
}

/* 搜索区域 */
.search-container {
    text-align: center;
    padding: 30px 0;
    position: relative;
}

.search-container::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
}

.search-container h2 {
    margin-bottom: 30px;
    color: var(--accent-color);
    font-weight: 600;
    font-size: 1.8rem;
    position: relative;
    display: inline-block;
}

.search-container h2::before {
    content: "🎣";
    position: absolute;
    left: -30px;
    top: 0;
}

.search-container h2::after {
    content: "🎣";
    position: absolute;
    right: -30px;
    top: 0;
}

.search-form {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

#search-input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #333;
    background-color: #222;
    color: var(--text-color);
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    font-size: 16px;
    outline: none;
    transition: var(--transition);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

#search-input:focus {
    border-color: var(--blue-accent);
    box-shadow: 0 4px 15px rgba(30, 144, 255, 0.2);
}

#search-btn {
    padding: 15px 30px;
    background: linear-gradient(135deg, #f0f0f0, #dcdcdc); /* 改为黑白渐变 */
    color: #111; /* 按钮文字更易读 */
    border: 1px solid #444; /* 与整体更协调 */
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: var(--transition);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
}
#search-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.3);
}

/* 结果区域 */
.result-container {
    max-width: 800px;
    margin: 20px auto;
    border: 2px solid var(--blue-accent);
    border-radius: var(--border-radius);
    overflow: hidden;
    background-color: var(--card-bg);
    box-shadow: var(--box-shadow);
}

.result-header {
    background-color: var(--blue-accent);
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.result-header h3 {
    margin: 0;
    font-weight: 600;
}

#close-result {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    transition: var(--transition);
}

#close-result:hover {
    transform: scale(1.2);
}

#result-content {
    padding: 30px;
    color: var(--text-color);
}

/* 证书样式 */
.certificate-style {
    transition: all 0.5s ease;
    opacity: 0;
    transform: translateY(20px);
}

.show-certificate {
    opacity: 1;
    transform: translateY(0);
}

.certified {
    background-color: #111;
    border: 2px solid var(--gold-color);
    border-radius: var(--border-radius);
    padding: 30px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h20v20H0V0zm10 17a7 7 0 1 0 0-14 7 7 0 0 0 0 14zm0-12a5 5 0 1 1 0 10 5 5 0 0 1 0-10z' fill='%23d4af37' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
}

.certified::before {
    content: "🎣";
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 24px;
    opacity: 0.2;
}

.certified::after {
    content: "🎣";
    position: absolute;
    bottom: 10px;
    right: 10px;
    font-size: 24px;
    opacity: 0.2;
}

.certificate-header {
    text-align: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #333;
    padding-bottom: 15px;
    position: relative;
}

.certificate-header::before,
.certificate-header::after {
    content: "";
    position: absolute;
    height: 2px;
    width: 80px;
    background: linear-gradient(90deg, transparent, var(--gold-color), transparent);
    bottom: -1px;
}

.certificate-header::before {
    left: 30%;
}

.certificate-header::after {
    right: 30%;
}

.certificate-logo {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gold-color);
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.certificate-logo::before {
    content: "🎣";
    font-size: 1.5rem;
}

.certificate-logo::after {
    content: "🎣";
    font-size: 1.5rem;
}

.certificate-title {
    font-size: 1.2rem;
    color: var(--gold-color);
    margin-top: 5px;
}

.certificate-content {
    text-align: center;
    padding: 20px 0;
}

.angler-info {
    font-style: italic;
    color: #aaa;
    line-height: 1.6;
    margin: 20px 0;
    padding: 0 20px;
}

.verification-stamp {
    margin-top: 30px;
    padding: 15px;
    border: 1px dashed var(--gold-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    background-color: rgba(212, 175, 55, 0.05);
}

.stamp-icon {
    font-size: 24px;
    color: var(--gold-color);
    margin-bottom: 5px;
    animation: pulse 2s infinite;
}

.certificate-seal {
    position: absolute;
    right: 20px;
    bottom: 20px;
    width: 100px;
    height: 100px;
    border: 3px solid var(--gold-color);
    border-radius: 50%;
    opacity: 0.9;
    background: radial-gradient(circle at center, 
        transparent 0%, 
        transparent 30%, 
        var(--gold-color) 30%, 
        var(--gold-color) 32%, 
        transparent 32%, 
        transparent 45%, 
        var(--gold-color) 45%, 
        var(--gold-color) 47%, 
        transparent 47%, 
        transparent 60%, 
        var(--gold-color) 60%, 
        var(--gold-color) 62%, 
        transparent 62%, 
        transparent 100%);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3), inset 0 0 20px rgba(212, 175, 55, 0.2);
    transform: rotate(-15deg);
    animation: pulse-seal 3s infinite alternate;
}

.certificate-seal::before {
    content: "🎣";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    color: var(--gold-color);
}

.certificate-seal::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    border: 1px dashed var(--gold-color);
    opacity: 0.5;
    transform: scale(0.9);
}

@keyframes pulse-seal {
    0% { transform: rotate(-15deg) scale(1); }
    100% { transform: rotate(-15deg) scale(1.05); }
}

.not-certified {
    text-align: center;
    padding: 40px 20px;
    color: var(--red-accent);
}

.not-certified h4 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

/* 管理员区域 */
.admin-container {
    max-width: 400px;
    margin: 0 auto;
    padding: 20px;
    text-align: center;
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    border: 1px solid #333;
}

.admin-container h2 {
    color: var(--accent-color);
    margin-bottom: 20px;
}

.admin-form {
    display: flex;
    margin-top: 20px;
}

#admin-password {
    flex: 1;
    padding: 15px;
    border: 2px solid #333;
    background-color: #222;
    color: var(--text-color);
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    font-size: 16px;
    outline: none;
    transition: var(--transition);
}

#admin-password:focus {
    border-color: var(--accent-color);
}

#admin-login-btn {
    padding: 15px 25px;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: var(--transition);
}

#admin-login-btn:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
}

/* 管理面板 */
.admin-panel-container {
    padding: 30px;
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin: 20px auto;
    max-width: 1000px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #333;
}

.admin-header h2 {
    color: var(--accent-color);
    font-weight: 600;
}

#admin-logout {
    padding: 10px 20px;
    background-color: var(--red-accent);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

#admin-logout:hover {
    background-color: #8b0000;
    transform: translateY(-2px);
}

.admin-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

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

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #333;
    border-radius: var(--border-radius);
    font-size: 16px;
    background-color: #222;
    color: var(--text-color);
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--accent-color);
    outline: none;
}

.add-angler form button {
    padding: 12px 25px;
    background-color: var(--blue-accent);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 16px;
    margin-top: 15px;
    font-weight: 500;
    transition: var(--transition);
}

.add-angler form button:hover {
    background-color: #0066cc;
    transform: translateY(-2px);
}

/* 钓手列表表格 */
#anglers-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    color: var(--text-color);
}

#anglers-table th,
#anglers-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #333;
}

#anglers-table th {
    background-color: #222;
    font-weight: 600;
    color: var(--blue-accent);
}

#anglers-table tr:hover {
    background-color: rgba(30, 144, 255, 0.05);
}

.delete-btn {
    padding: 8px 15px;
    background-color: var(--red-accent);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

.delete-btn:hover {
    background-color: #8b0000;
    transform: translateY(-2px);
}

/* 页脚 */
footer {
    text-align: center;
    padding: 25px 0;
    color: #777;
    border-top: 1px solid #333;
    margin-top: 40px;
}

footer a {
    color: var(--blue-accent);
    text-decoration: none;
    transition: var(--transition);
}

footer a:hover {
    color: #0066cc;
}

/* 工具类 */
.hidden {
    display: none !important;
}

/* 动画效果 */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes sway {
    0% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    100% { transform: translateX(-5px); }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header {
        padding: 25px 0;
        margin-bottom: 25px;
    }
    
    .logo h1 {
        font-size: 2rem;
    }
    
    .logo p {
        font-size: 1rem;
    }
    
    .lure-decoration {
        transform: scale(0.9);
    }
    
    main {
        padding: 20px;
    }
    
    .search-form {
        flex-direction: column;
    }
    
    #search-input {
        border-radius: var(--border-radius) var(--border-radius) 0 0;
        padding: 12px 15px;
        -webkit-appearance: none; /* 移动端表单优化 */
    }
    
    #search-btn {
        border-radius: 0 0 var(--border-radius) var(--border-radius);
        padding: 12px 20px;
        width: 100%;
    }
    
    .admin-content {
        grid-template-columns: 1fr;
    }
    
    .certificate {
        padding: 15px;
    }
    
    .certificate-seal {
        width: 80px;
        height: 80px;
        margin: 10px auto;
    }
    
    .table-container {
        overflow-x: auto;
        margin: 0 -10px;
        padding: 0 10px;
        -webkit-overflow-scrolling: touch; /* 移动端滚动优化 */
    }
    
    table {
        min-width: 500px; /* 确保表格在移动端可以横向滚动 */
    }
    
    .form-control {
        -webkit-appearance: none; /* 移动端表单优化 */
        font-size: 16px; /* 防止iOS自动缩放 */
    }
    
    .btn {
        -webkit-tap-highlight-color: transparent; /* 移除移动端点击高亮 */
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 1.5rem;
        margin-bottom: 8px;
    }
    
    .logo p {
        font-size: 0.9rem;
    }
    
    .lure-decoration {
        transform: scale(0.8);
    }
    
    .lure-icon, .lure-hook {
        font-size: 20px;
    }
    
    .search-container h2 {
        font-size: 1.3rem;
    }
    
    .search-container h2::before,
    .search-container h2::after {
        display: none; /* 移动端隐藏装饰图标 */
    }
    
    .admin-panel-container {
        padding: 15px;
    }
    
    #result-content {
        padding: 15px;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    .form-group label {
        margin-bottom: 5px;
    }
    
    .btn {
        padding: 10px 15px;
        width: 100%; /* 移动端按钮全宽 */
        margin-bottom: 10px;
    }
    
    .certified {
        padding: 15px;
    }
    
    .certificate-header {
        padding-bottom: 10px;
        margin-bottom: 15px;
    }
    
    .certificate-content {
        font-size: 0.9rem;
    }
}