/* 全局样式 */
:root {
    --primary: #ff6b6b;
    --secondary: #4ecdc4;
    --accent: #ffd166;
    --dark: #2b2d42;
    --light: #f8f9fa;
    --highlight-pink: #ffb6c1;
    --highlight-gray: #e9ecef;
    --secret-color: #a0a0a0;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --gradient: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    --nav-bg: rgba(43, 45, 66, 0.95);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--gradient);
    color: var(--dark);
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    background-attachment: fixed;
}

/* 右侧隐藏导航样式 */
.smart-nav {
    position: fixed;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    background: var(--nav-bg);
    backdrop-filter: blur(5px);
    border-radius: 15px 0 0 15px;
    padding: 15px 5px;
    box-shadow: var(--shadow);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 20px;
    transition: transform 0.5s ease, opacity 0.5s ease;
    width: 50px;
    overflow: hidden;
    opacity: 0.7;
}

.smart-nav:hover {
    width: auto;
    transform: translateY(-50%) translateX(0);
    opacity: 1;
    padding: 15px 15px 15px 10px;
}

.nav-link {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 8px 12px;
    border-radius: 8px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-link i {
    min-width: 20px;
    text-align: center;
}

.nav-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(-5px);
}

.nav-text {
    opacity: 0;
    transition: opacity 0.3s ease 0.1s;
    white-space: nowrap;
}

.smart-nav:hover .nav-text {
    opacity: 1;
}

/* 容器样式 */
.container {
    max-width: 1200px;
    width: 95%;
    margin: 0 auto 40px;
    padding: 25px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    margin-top: 20px;
}

/* 头部样式 */
header {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

h1 {
    font-size: 2.3rem;
    color: var(--primary);
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    display: inline-block;
}

h1:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--accent);
    border-radius: 2px;
}

.subtitle {
    color: var(--dark);
    font-size: 1.1rem;
    opacity: 0.8;
    margin-top: 15px;
}

/* 控制区域样式 */
.controls {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
    padding: 20px;
    background: var(--light);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.controls > * {
    flex: 1;
    min-width: 200px;
}

.controls select, .controls input {
    height: 50px;
    padding: 0 15px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    background: white;
    transition: all 0.3s ease;
}

.controls select:focus, .controls input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.2);
    outline: none;
}

.controls input {
    padding-left: 45px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23999999" width="24" height="24"><path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/></svg>');
    background-repeat: no-repeat;
    background-position: 15px center;
    background-size: 20px;
}

.buttons {
    display: flex;
    gap: 15px;
}

button {
    height: 50px;
    padding: 0 25px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

button:active {
    transform: translateY(0);
}

#searchBtn {
    background: var(--secondary);
    color: white;
    flex: 2;
}

#drawBtn {
    background: var(--primary);
    color: white;
    flex: 1;
}

/* 直播间样式 */
.live-container {
    margin: 30px 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
}

.live-container::before {
    content: "LIVE";
    position: absolute;
    top: 10px;
    left: 10px;
    background: #ff0000;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: bold;
    z-index: 10;
}

iframe {
    width: 100%;
    height: 400px;
    border: none;
    display: block;
}

/* 表格样式 */
.table-container {
    max-height: 950px;
    overflow-y: auto;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    margin-top: 20px;
    position: relative;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
}

thead {
    position: sticky;
    top: 0;
    z-index: 10;
}

th {
    background: var(--dark);
    color: white;
    padding: 16px 12px;
    text-align: left;
    font-weight: 600;
    position: sticky;
    top: 0;
}

th:first-child {
    border-top-left-radius: 12px;
}

th:last-child {
    border-top-right-radius: 12px;
}

tbody tr {
    transition: all 0.2s ease;
}

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

tbody tr:hover {
    background-color: #f1f1f1;
    transform: translateX(5px);
}

td {
    padding: 14px 12px;
    border-bottom: 1px solid #eee;
}

/* 高亮样式 */
.highlight-true {
    background-color: var(--highlight-pink) !important;
    font-weight: 600;
}

.highlight-false {
    background-color: var(--highlight-gray) !important;
}

/* 抽取动画效果 */
.drawing-animation {
    animation: drawPulse 1s infinite;
}

@keyframes drawPulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(255, 107, 107, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 107, 107, 0); }
}

/* 结果卡片样式 */
.result-card {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    max-width: 90%;
    width: 400px;
    text-align: center;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.result-card.show {
    transform: translate(-50%, -50%) scale(1);
}

.result-card h2 {
    color: var(--primary);
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.result-card p {
    margin: 10px 0;
    font-size: 1.2rem;
}

.result-card .close-btn {
    margin-top: 20px;
    background: var(--secondary);
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.result-card .close-btn:hover {
    background: var(--primary);
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999;
    display: none;
}

.overlay.show {
    display: block;
}

/* 回到顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: none;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: white;
    text-align: center;
    line-height: 50px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 100;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.back-to-top:hover {
    background: var(--secondary);
    transform: translateY(-3px);
}

/* 页脚样式 */
footer {
    width: 100%;
    height: auto;
    background: rgba(43, 45, 66, 0.9);
    padding: 15px 0;
    text-align: center;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    margin-top: 20px;
}

footer a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.3s;
}

footer a:hover {
    color: var(--accent);
    text-decoration: underline;
}

.stats-bar {
    background-color: var(--secondary);
    color: white;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.stat-item {
    padding: 5px 10px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.2);
    margin: 5px;
}

/* 主题切换按钮 */
.theme-toggle {
    position: fixed;
    bottom: 90px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--dark);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    z-index: 100;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    transform: rotate(30deg) scale(1.1);
}