* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

/* 容器和布局 */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 */
header {
    text-align: center;
    margin-bottom: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px 20px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

header h1 {
    font-size: 3em;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    font-weight: 700;
}

header p {
    font-size: 1.3em;
    opacity: 0.95;
    font-weight: 300;
}

/* 导航标签 */
.tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
    background: white;
    padding: 15px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.tab-btn {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #dee2e6;
    padding: 15px 20px;
    color: #495057;
    cursor: pointer;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tab-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: left 0.3s ease;
    z-index: -1;
}

.tab-btn:hover::before {
    left: 0;
}

.tab-btn:hover {
    color: white;
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.tab-btn.active::before {
    left: 0;
}

/* 内容区域 */
.tab-content {
    display: none;
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    animation: fadeIn 0.4s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(30px);
    }
    to { 
        opacity: 1; 
        transform: translateY(0);
    }
}

/* 标题样式 */
.tab-content h2 {
    color: #667eea;
    font-size: 2.5em;
    margin-bottom: 30px;
    text-align: center;
    position: relative;
    padding-bottom: 15px;
}

.tab-content h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

/* 理论讲解样式 */
.theory-section {
    margin-bottom: 40px;
}

.theory-section h3 {
    color: #495057;
    font-size: 1.8em;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.feature-box {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    padding: 30px;
    border-radius: 15px;
    margin: 25px 0;
    border-left: 5px solid #2196f3;
    box-shadow: 0 5px 15px rgba(33, 150, 243, 0.1);
}

.feature-box h4 {
    color: #1976d2;
    margin-bottom: 20px;
    font-size: 1.3em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.feature-box ul {
    list-style: none;
}

.feature-box li {
    padding: 12px 0;
    padding-left: 30px;
    position: relative;
    font-size: 1.1em;
    line-height: 1.7;
}

.feature-box li::before {
    content: "✨";
    position: absolute;
    left: 0;
    font-size: 1.2em;
}

/* 特性详细演示样式 */
.feature-item {
    margin-bottom: 30px;
    padding: 25px;
    background: white;
    border-radius: 12px;
    border-left: 5px solid #667eea;
    box-shadow: 0 3px 15px rgba(0,0,0,0.05);
}

.feature-item h5 {
    color: #667eea;
    font-size: 1.3em;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.feature-item p {
    color: #6c757d;
    margin-bottom: 15px;
    font-size: 16px;
}

.feature-demo {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px;
    border-radius: 10px;
    border: 2px solid #dee2e6;
}

.demo-example {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e1e5e9;
}

.demo-row {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    padding: 10px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 6px;
    border-left: 3px solid #667eea;
}

.demo-input {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #1976d2;
    padding: 6px 12px;
    border-radius: 5px;
    font-family: 'Courier New', monospace;
    font-weight: 600;
    min-width: 120px;
    text-align: center;
    border: 2px solid #2196f3;
}

.demo-arrow {
    margin: 0 15px;
    font-size: 1.2em;
    color: #667eea;
    font-weight: bold;
}

.demo-output {
    background: linear-gradient(135deg, #f3e5f5 0%, #ce93d8 100%);
    color: #7b1fa2;
    padding: 6px 12px;
    border-radius: 5px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    flex: 1;
    word-break: break-all;
    border: 2px solid #9c27b0;
}

.demo-note {
    background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
    color: #2e7d32;
    padding: 10px 15px;
    border-radius: 6px;
    text-align: center;
    font-weight: 600;
    margin-top: 15px;
    border: 2px solid #4caf50;
}

/* 单向性演示样式 */
.oneway-demo {
    display: grid;
    gap: 15px;
    margin-bottom: 15px;
}

.forward-direction, .reverse-direction {
    display: flex;
    align-items: center;
    padding: 15px;
    border-radius: 8px;
    border: 2px solid;
}

.forward-direction {
    background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
    border-color: #4caf50;
}

.reverse-direction {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    border-color: #f44336;
}

.direction-label {
    font-weight: 700;
    min-width: 100px;
    color: #495057;
}

.demo-arrow.easy {
    color: #4caf50;
    margin: 0 15px;
}

.demo-arrow.hard {
    color: #f44336;
    margin: 0 15px;
}

/* 雪崩效应演示样式 */
.avalanche-demo {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e1e5e9;
}

.avalanche-row {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    padding: 10px;
    border-radius: 6px;
    border-left: 3px solid #ff9800;
}

.demo-label {
    min-width: 120px;
    font-weight: 600;
    color: #495057;
    font-size: 14px;
}

.highlight-original {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%) !important;
    border-color: #2196f3 !important;
}

.highlight-changed {
    background: linear-gradient(135deg, #fff3e0 0%, #ffcc02 100%) !important;
    border-color: #ff9800 !important;
    color: #ef6c00 !important;
}

/* 碰撞演示样式 */
.collision-demo-simple {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 15px;
}

.collision-goal {
    background: linear-gradient(135deg, #fff3e0 0%, #ffcc02 100%);
    padding: 15px;
    border-radius: 8px;
    border: 2px solid #ff9800;
}

.collision-goal h6 {
    color: #ef6c00;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.collision-difficulty {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e1e5e9;
}

.difficulty-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    gap: 10px;
}

.algo-name {
    font-weight: 700;
    min-width: 70px;
    font-size: 14px;
}

.difficulty-bar {
    flex: 1;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.difficulty-fill {
    height: 100%;
    transition: width 0.3s ease;
}

.difficulty-fill.weak {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
}

.difficulty-fill.medium {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
}

.difficulty-fill.strong {
    background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
}

.difficulty-text {
    font-size: 12px;
    font-weight: 600;
    min-width: 100px;
}

.collision-math {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
    padding: 15px;
    border-radius: 8px;
    border: 2px solid #9c27b0;
}

.collision-math h6 {
    color: #7b1fa2;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.math-example {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: #6a1b9a;
}

.math-example p {
    margin: 5px 0;
}

.impossibility {
    background: linear-gradient(135deg, #fff3e0 0%, #ffcc02 100%);
    color: #ef6c00 !important;
    padding: 8px 12px;
    border-radius: 5px;
    font-weight: 700 !important;
    margin-top: 10px !important;
    border: 1px solid #ff9800;
}

/* 特性提示样式 */
.feature-note {
    padding: 12px 18px;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    margin-top: 15px;
    border: 2px solid;
}

.feature-note.success {
    background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
    color: #2e7d32;
    border-color: #4caf50;
}

.feature-note.warning {
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
    color: #ef6c00;
    border-color: #ff9800;
}

.feature-note.info {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #1976d2;
    border-color: #2196f3;
}

.feature-note.error {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    color: #c62828;
    border-color: #f44336;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .collision-demo-simple {
        grid-template-columns: 1fr;
    }
    
    .demo-row {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .demo-arrow {
        transform: rotate(90deg);
        margin: 5px 0;
    }
    
    .difficulty-item {
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
    }
    
    .forward-direction, .reverse-direction {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}

.algorithm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.algorithm-card {
    background: white;
    border: 3px solid #f8f9fa;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    position: relative;
    overflow: hidden;
}

.algorithm-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.algorithm-card:hover {
    border-color: #667eea;
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.2);
}

.algorithm-card h4 {
    color: #667eea;
    font-size: 1.5em;
    margin-bottom: 15px;
    font-weight: 700;
}

.application-list {
    display: grid;
    gap: 20px;
    margin: 30px 0;
}

.app-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 25px;
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    border-radius: 15px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
}

.app-item:hover {
    border-color: #667eea;
    transform: translateX(5px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
}

.app-item .icon {
    font-size: 2.5em;
    min-width: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.app-item h4 {
    color: #667eea;
    margin-bottom: 8px;
    font-size: 1.3em;
}

.app-example {
    margin-top: 10px;
    padding: 8px 12px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 6px;
    font-size: 13px;
    color: #495057;
    border-left: 3px solid #667eea;
}

/* 示例演示样式 */
.example-demo {
    background: linear-gradient(135deg, #fff9c4 0%, #fff59d 100%);
    padding: 25px;
    border-radius: 15px;
    margin: 25px 0;
    border: 2px solid #ffeb3b;
    box-shadow: 0 5px 20px rgba(255, 235, 59, 0.2);
}

.example-demo h4 {
    color: #f57f17;
    margin-bottom: 20px;
    font-size: 1.4em;
}

.hash-example {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
}

.example-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding: 15px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    border: 2px solid #dee2e6;
}

.input-box, .output-box {
    flex: 1;
    padding: 12px 15px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
}

.input-box {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border: 2px solid #2196f3;
    color: #1976d2;
}

.output-box {
    background: linear-gradient(135deg, #f3e5f5 0%, #ce93d8 100%);
    border: 2px solid #9c27b0;
    color: #7b1fa2;
    word-break: break-all;
}

.arrow {
    font-size: 1.5em;
    color: #667eea;
    margin: 0 15px;
    font-weight: bold;
}

.example-note {
    background: linear-gradient(135deg, #fff3e0 0%, #ffcc02 100%);
    color: #ef6c00;
    padding: 12px 18px;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    margin-top: 15px;
    border: 2px solid #ff9800;
}

/* 交互式演示样式 */
.interactive-demo {
    background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
    padding: 25px;
    border-radius: 15px;
    margin: 25px 0;
    border: 2px solid #4caf50;
    box-shadow: 0 5px 20px rgba(76, 175, 80, 0.2);
}

.interactive-demo h4 {
    color: #2e7d32;
    margin-bottom: 20px;
    font-size: 1.4em;
}

.demo-controls {
    margin-bottom: 20px;
}

#demo-input {
    width: 100%;
    padding: 15px 20px;
    border: 3px solid #4caf50;
    border-radius: 12px;
    font-size: 16px;
    background: white;
    transition: all 0.3s ease;
}

#demo-input:focus {
    border-color: #2e7d32;
    outline: none;
    box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.1);
}

.demo-results {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
}

.demo-hash-result {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding: 12px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    border-left: 4px solid #4caf50;
}

.hash-label {
    font-weight: 700;
    color: #2e7d32;
    min-width: 80px;
    font-size: 14px;
}

.hash-output {
    font-family: 'Courier New', monospace;
    background: #2c3e50;
    color: #ecf0f1;
    padding: 8px 12px;
    border-radius: 6px;
    flex: 1;
    margin-left: 15px;
    font-size: 13px;
    word-break: break-all;
}

.demo-tips {
    text-align: center;
}

.tip-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 15px 0;
    flex-wrap: wrap;
}

.tip-btn {
    background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 14px;
}

.tip-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 15px rgba(76, 175, 80, 0.4);
}

.tip-note {
    color: #2e7d32;
    font-style: italic;
    font-size: 14px;
    margin: 10px 0 0 0;
}

/* 哈希碰撞演示样式 */
.collision-demo {
    background: linear-gradient(135deg, #fce4ec 0%, #f8bbd9 100%);
    padding: 30px;
    border-radius: 15px;
    margin: 30px 0;
    border: 2px solid #e91e63;
    box-shadow: 0 5px 20px rgba(233, 30, 99, 0.2);
}

.collision-demo h4 {
    color: #ad1457;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.collision-box {
    background: white;
    padding: 25px;
    border-radius: 12px;
    margin: 20px 0;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
}

.collision-box h5 {
    color: #ad1457;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.pigeonhole-demo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 20px 0;
    padding: 20px;
    background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
    border-radius: 12px;
}

.input-space, .output-space {
    flex: 1;
    text-align: center;
    padding: 15px;
    background: white;
    border-radius: 10px;
    border: 2px solid #ce93d8;
}

.space-label {
    font-weight: 700;
    color: #7b1fa2;
    font-size: 16px;
    margin-bottom: 8px;
}

.space-desc {
    color: #ad1457;
    font-size: 14px;
    margin-bottom: 10px;
}

.items {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: #6a1b9a;
    background: #f3e5f5;
    padding: 8px;
    border-radius: 6px;
}

.mapping-arrow {
    font-size: 2em;
    color: #ad1457;
    margin: 0 20px;
    font-weight: bold;
}

.collision-note {
    background: linear-gradient(135deg, #fff3e0 0%, #ffcc02 100%);
    color: #ef6c00;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    border: 2px solid #ff9800;
    text-align: center;
    font-weight: 600;
}

/* 安全级别样式 */
.security-levels {
    margin-top: 30px;
}

.security-levels h5 {
    color: #ad1457;
    margin-bottom: 20px;
    font-size: 1.3em;
}

.security-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.security-card {
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    border: 3px solid;
    transition: all 0.3s ease;
}

.security-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.security-card h6 {
    font-size: 1.2em;
    margin-bottom: 10px;
    font-weight: 700;
}

.security-level {
    font-weight: 600;
    margin-bottom: 12px;
    font-size: 14px;
}

.security-card p {
    font-size: 13px;
    line-height: 1.5;
    margin: 0;
}

.security-card.weak {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    border-color: #f44336;
    color: #c62828;
}

.security-card.medium {
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
    border-color: #ff9800;
    color: #ef6c00;
}

.security-card.strong {
    background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
    border-color: #4caf50;
    color: #2e7d32;
}

.security-card.strongest {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-color: #2196f3;
    color: #1976d2;
}

/* 计算器样式 */
.calculator-section {
    max-width: 900px;
    margin: 0 auto;
}

.input-group {
    margin-bottom: 30px;
}

.input-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 12px;
    color: #495057;
    font-size: 1.1em;
}

#input-text {
    width: 100%;
    min-height: 150px;
    padding: 20px;
    border: 3px solid #e9ecef;
    border-radius: 15px;
    font-size: 16px;
    font-family: 'Courier New', monospace;
    resize: vertical;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
}

#input-text:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    background: white;
}

.algorithm-selector {
    margin-bottom: 40px;
    text-align: center;
}

.checkbox-group {
    display: flex;
    gap: 25px;
    justify-content: center;
    margin-top: 15px;
    flex-wrap: wrap;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 12px 20px;
    border-radius: 25px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #dee2e6;
    transition: all 0.3s ease;
    font-weight: 600;
}

.checkbox-group label:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
    transform: scale(1.05);
}

.checkbox-group input[type="checkbox"]:checked + span {
    color: white;
}

.checkbox-group label:has(input[type="checkbox"]:checked) {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

.results-section {
    margin-bottom: 40px;
}

.hash-result {
    margin-bottom: 25px;
    padding: 25px;
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    border-radius: 15px;
    border-left: 5px solid #667eea;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.hash-result:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.hash-result h4 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.4em;
    font-weight: 700;
}

.hash-value {
    font-family: 'Courier New', monospace;
    background: #2c3e50;
    color: #ecf0f1;
    padding: 15px;
    border-radius: 8px;
    word-break: break-all;
    font-size: 14px;
    line-height: 1.6;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.2);
}

/* 演示示例样式 */
.demo-examples {
    background: linear-gradient(135deg, #fff3e0 0%, #ffcc02 100%);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(255, 193, 7, 0.2);
}

.demo-examples h3 {
    color: #e65100;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.example-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.example-buttons button {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 14px;
}

.example-buttons button:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 20px rgba(255, 152, 0, 0.4);
}

/* 密码验证演示样式 */
.demo-intro {
    background: linear-gradient(135deg, #e3f2fd 0%, #1976d2 100%);
    color: white;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 40px;
    box-shadow: 0 8px 25px rgba(25, 118, 210, 0.3);
}

.demo-intro ol {
    margin-left: 25px;
    margin-top: 20px;
}

.demo-intro li {
    margin-bottom: 12px;
    font-size: 1.1em;
    line-height: 1.6;
}

.demo-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.database-section {
    grid-column: 1 / -1;
}

.database-section h3,
.form-section h3,
.log-section h3 {
    color: #667eea;
    margin-bottom: 25px;
    font-size: 1.6em;
    display: flex;
    align-items: center;
    gap: 12px;
}

.database-view {
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    border-radius: 15px;
    padding: 25px;
    overflow-x: auto;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

#user-database {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

#user-database th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 15px;
    text-align: left;
    font-weight: 700;
    font-size: 16px;
}

#user-database td {
    padding: 18px 15px;
    border-bottom: 1px solid #f1f3f4;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    word-break: break-all;
}

#user-database tr:hover {
    background: linear-gradient(135deg, #f8f9ff 0%, #e8eaff 100%);
}

.form-section {
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    padding: 30px;
    border-radius: 15px;
    border: 3px solid #e9ecef;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: #495057;
    font-size: 1.1em;
}

.form-group input {
    width: 100%;
    padding: 15px;
    border: 3px solid #e9ecef;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
}

.form-group input:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.form-section button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    width: 100%;
    transition: all 0.3s ease;
}

.form-section button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.log-section {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, #263238 0%, #37474f 100%);
    color: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.log-section h3 {
    color: #4fc3f7;
}

.log-container {
    background: #1a252f;
    padding: 20px;
    border-radius: 10px;
    min-height: 250px;
    max-height: 350px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    margin-bottom: 20px;
    border: 2px solid #37474f;
}

.log-entry {
    margin-bottom: 12px;
    padding: 10px 15px;
    border-left: 4px solid #4fc3f7;
    background: rgba(79, 195, 247, 0.1);
    border-radius: 0 8px 8px 0;
    line-height: 1.5;
}

.log-entry.success {
    border-left-color: #4caf50;
    background: rgba(76, 175, 80, 0.1);
}

.log-entry.error {
    border-left-color: #f44336;
    background: rgba(244, 67, 54, 0.1);
}

/* 文件完整性验证样式 */
.file-demo-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.file-upload-section,
.fingerprint-section,
.integrity-check-section,
.demo-cases-section,
.file-viewer-section,
.file-log-section {
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    padding: 30px;
    border-radius: 15px;
    border: 3px solid #e9ecef;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.upload-area {
    border: 4px dashed #667eea;
    border-radius: 15px;
    padding: 50px 30px;
    text-align: center;
    background: linear-gradient(135deg, #fff 0%, #f8f9ff 100%);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    margin-bottom: 25px;
}

.upload-area:hover {
    border-color: #5a6fd8;
    background: linear-gradient(135deg, #f8f9ff 0%, #e8eaff 100%);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2);
}

.upload-area.dragover {
    border-color: #4caf50;
    background: linear-gradient(135deg, #f1f8e9 0%, #dcedc8 100%);
}

.upload-icon {
    font-size: 4em;
    display: block;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .container {
        padding: 15px;
    }
    
    .tabs {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2.2em;
    }
    
    .tabs {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .tab-content {
        padding: 25px;
    }
    
    .demo-container,
    .file-demo-container {
        grid-template-columns: 1fr;
    }
    
    .algorithm-grid {
        grid-template-columns: 1fr;
    }
    
    .checkbox-group {
        flex-direction: column;
        gap: 15px;
    }
    
    .example-buttons {
        justify-content: center;
        gap: 10px;
    }
    
    .upload-area {
        padding: 35px 20px;
    }
    
    .upload-icon {
        font-size: 3em;
    }
}

/* 文件操作按钮样式 */
.file-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 20px;
}

.file-actions button {
    padding: 12px 25px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s ease;
    font-size: 14px;
}

.clear-btn {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
    color: white;
}

.clear-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(244, 67, 54, 0.4);
}

.modify-btn {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: white;
}

.modify-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 152, 0, 0.4);
}

/* 指纹数据库样式 */
.fingerprint-view {
    background: white;
    border-radius: 12px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

#fingerprint-database {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

#fingerprint-database th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 18px 12px;
    text-align: left;
    font-weight: 700;
    font-size: 14px;
}

#fingerprint-database td {
    padding: 15px 12px;
    border-bottom: 1px solid #f1f3f4;
    font-size: 12px;
    word-break: break-all;
}

#fingerprint-database tr:hover {
    background: linear-gradient(135deg, #f8f9ff 0%, #e8eaff 100%);
}

.file-status {
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-verified {
    background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.status-modified {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    color: #c62828;
    border: 1px solid #ef9a9a;
}

.status-new {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #1565c0;
    border: 1px solid #90caf9;
}

.action-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 11px;
    margin: 0 3px;
    transition: all 0.3s ease;
    font-weight: 600;
}

.action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.action-btn.danger {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
}

.action-btn.danger:hover {
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.3);
}

/* 完整性检查样式 */
.check-controls {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    justify-content: center;
}

.check-btn, .report-btn {
    background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s ease;
    font-size: 16px;
}

.check-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.4);
}

.report-btn {
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
}

.report-btn:hover {
    box-shadow: 0 8px 25px rgba(33, 150, 243, 0.4);
}

.check-results {
    background: white;
    border-radius: 12px;
    padding: 25px;
    min-height: 120px;
    border: 3px solid #e9ecef;
    box-shadow: 0 3px 15px rgba(0,0,0,0.05);
}

.integrity-result {
    margin-bottom: 20px;
    padding: 20px;
    border-radius: 12px;
    border-left: 5px solid;
}

.result-success {
    border-left-color: #4caf50;
    background: linear-gradient(135deg, #f1f8e9 0%, #dcedc8 100%);
    color: #2e7d32;
}

.result-warning {
    border-left-color: #ff9800;
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
    color: #ef6c00;
}

.result-error {
    border-left-color: #f44336;
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    color: #c62828;
}

/* 演示案例样式 */
.demo-cases {
    display: grid;
    gap: 20px;
}

.demo-case-btn {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    border: 3px solid #e9ecef;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.demo-case-btn:hover {
    border-color: #667eea;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2);
}

.demo-case-btn.attack {
    border-color: #f44336;
}

.demo-case-btn.attack:hover {
    border-color: #d32f2f;
    box-shadow: 0 10px 30px rgba(244, 67, 54, 0.2);
}

.demo-case-btn .icon {
    font-size: 2.5em;
    min-width: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.demo-case-btn.attack .icon {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.demo-case-btn h4 {
    margin: 0 0 8px 0;
    color: #667eea;
    font-size: 1.3em;
}

.demo-case-btn.attack h4 {
    color: #f44336;
}

.demo-case-btn p {
    margin: 0;
    color: #6c757d;
    font-size: 14px;
    line-height: 1.5;
}

/* 文件内容查看器样式 */
.viewer-controls {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    align-items: center;
}

#file-selector {
    flex: 1;
    padding: 12px 15px;
    border: 3px solid #e9ecef;
    border-radius: 10px;
    font-size: 16px;
    background: white;
    transition: all 0.3s ease;
}

#file-selector:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.refresh-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s ease;
    font-size: 14px;
}

.refresh-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.file-content-display {
    background: white;
    border: 3px solid #e9ecef;
    border-radius: 12px;
    min-height: 350px;
    max-height: 600px;
    overflow-y: auto;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.content-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 300px;
    color: #9e9e9e;
}

.placeholder-icon {
    font-size: 4em;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #e0e0e0 0%, #bdbdbd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.file-content {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.8;
    white-space: pre-wrap;
    word-wrap: break-word;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.file-meta {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    border-left: 5px solid #2196f3;
}

.file-meta h4 {
    color: #1976d2;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.file-meta p {
    margin: 8px 0;
    font-size: 14px;
    line-height: 1.6;
}

.content-section {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
}

.content-section h4 {
    color: #495057;
    margin-bottom: 15px;
    font-size: 1.2em;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 图像显示样式 */
.image-content {
    text-align: center;
}

.preview-image {
    max-width: 100%;
    max-height: 450px;
    border: 3px solid #e9ecef;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.preview-image:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 35px rgba(0,0,0,0.2);
}

.image-info {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px;
    border-radius: 12px;
    text-align: left;
    border-left: 5px solid #667eea;
}

.image-note {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #1976d2;
    padding: 12px 18px;
    border-radius: 8px;
    font-style: italic;
    margin-top: 15px !important;
    border: 2px solid #90caf9;
    font-weight: 600;
} 