/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px 0;
}

.container {
    max-width: 1200px;
    padding: 30px;
    margin: 0 auto;
    background-color: rgba(255, 255, 255, 0.95);
    min-height: 100vh;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    background: linear-gradient(45deg, #3498db, #2ecc71);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h2 {
    text-align: center;
    color: #2c3e50;
    margin: 20px 0;
    font-size: 22px;
    font-weight: 600;
}

/* 二维码区域样式 */
.qr-section {
    margin-bottom: 25px;
    background: rgba(255, 255, 255, 0.8);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    position: relative;
}

.qr-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.qr-code {
    width: 200px;
    height: 200px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.qr-text {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    text-align: center;
}

.close-btn {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
}

.close-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.6);
    background: linear-gradient(45deg, #c0392b, #a93226);
}

/* 输入区域样式 */
.input-section {
    margin-bottom: 25px;
    background: rgba(255, 255, 255, 0.8);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.input-section label {
    display: block;
    margin-bottom: 12px;
    font-weight: 600;
    font-size: 17px;
    color: #2c3e50;
}

.input-section textarea {
    width: 100%;
    height: 200px;
    padding: 18px;
    border: 2px solid #e0e6ed;
    border-radius: 12px;
    font-size: 16px;
    resize: vertical;
    background: linear-gradient(to bottom, #ffffff, #f8fafc);
    transition: all 0.3s ease;
    font-family: inherit;
}

.input-section textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
    transform: translateY(-2px);
}

/* 按钮区域样式 */
.button-section {
    margin-bottom: 25px;
}

#calculate-btn {
    background: linear-gradient(45deg, #3498db, #2ecc71);
    color: white;
    border: none;
    padding: 16px 40px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
    letter-spacing: 1px;
    width: 100%;
    display: block;
}

#calculate-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.6);
    background: linear-gradient(45deg, #2980b9, #27ae60);
}

#calculate-btn:active {
    transform: translateY(-1px);
}

/* 搜索区域样式 */
.search-section {
    margin-bottom: 25px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: rgba(255, 255, 255, 0.8);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.search-section label {
    font-weight: 600;
    font-size: 17px;
    color: #2c3e50;
}

.search-section input {
    padding: 14px;
    border: 2px solid #e0e6ed;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: linear-gradient(to bottom, #ffffff, #f8fafc);
}

.search-section input:focus {
    outline: none;
    border-color: #9b59b6;
    box-shadow: 0 0 0 3px rgba(155, 89, 182, 0.2);
    transform: translateY(-2px);
}

#search-btn {
    background: linear-gradient(45deg, #9b59b6, #8e44ad);
    color: white;
    border: none;
    padding: 14px 25px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(155, 89, 182, 0.4);
    width: 100%;
    display: block;
}

#search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(155, 89, 182, 0.6);
    background: linear-gradient(45deg, #8e44ad, #7d3c98);
}

/* 结果展示区域样式 */
.result-section {
    margin-top: 25px;
}

#result-container {
    overflow-x: auto;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

#result-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

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

#result-table th {
    background: linear-gradient(45deg, #34495e, #2c3e50);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 14px;
}

#result-table tr:nth-child(even) {
    background-color: #f8f9fa;
}

#result-table tr:hover {
    background-color: #e3f2fd;
    transform: scale(1.01);
    transition: all 0.2s ease;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
        margin: 10px;
    }
    
    h1 {
        font-size: 24px;
        padding: 0 10px;
    }
    
    h2 {
        font-size: 20px;
    }
    
    .qr-code {
        width: 150px;
        height: 150px;
    }
    
    .qr-text {
        font-size: 16px;
    }
    
    .input-section, .search-section, #result-container, .qr-section {
        padding: 15px;
    }
    
    .input-section textarea {
        height: 150px;
        font-size: 14px;
        padding: 12px;
    }
    
    #calculate-btn {
        padding: 14px 24px;
        font-size: 16px;
    }
    
    #search-btn {
        padding: 12px 20px;
        font-size: 15px;
    }
    
    #result-table {
        font-size: 13px;
    }
    
    #result-table th,
    #result-table td {
        padding: 10px 8px;
    }
    
    #result-table th {
        font-size: 12px;
    }
}

/* 卡片式展示样式 */
.card {
    background: linear-gradient(145deg, #ffffff, #f0f0f0);
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
}

/* 流式布局 */
.flex-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.flex-item {
    flex: 1 1 100%;
}

@media (min-width: 600px) {
    .flex-item {
        flex: 1 1 calc(50% - 10px);
    }
}

@media (min-width: 992px) {
    .flex-item {
        flex: 1 1 calc(33.333% - 14px);
    }
}

/* 加载状态 */
.loading {
    text-align: center;
    padding: 30px;
    font-size: 17px;
    color: #7f8c8d;
    font-style: italic;
}

/* 无结果状态 */
.no-results {
    text-align: center;
    padding: 30px;
    font-size: 17px;
    color: #e74c3c;
    font-weight: 500;
}

/* 表格特殊样式 */
#result-table tr.success-row {
    background: linear-gradient(to right, #e8f5e8, #d4edda) !important;
    border-left: 4px solid #2ecc71;
}

#result-table tr.highlight {
    animation: highlight 2s ease;
}

@keyframes highlight {
    0% { background-color: #fff3cd; }
    50% { background-color: #ffeaa7; }
    100% { background-color: transparent; }
}