.event-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
    background-color: white;
    transition: all 0.3s ease;
}
.event-card:hover {
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}
.event-icon {
    width: 50px;
    height: 50px;
    background-color: #e74c3c;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 1.2em;
}
.event-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}
.event-title {
    font-size: 1.3em;
    font-weight: bold;
    color: #2c3e50;
    margin: 0;
}
.syntax-box {
    background-color: #f8f9fa;
    padding: 12px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 1.1em;
    margin: 15px 0;
    border-left: 4px solid #3498db;
}
.demo-area {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    background-color: #f9f9f9;
    min-height: 200px;
}
.demo-controls {
    background-color: #e8f4f8;
    padding: 15px;
    border-radius: 6px;
    margin: 15px 0;
}
.nav-events {
    position: sticky;
    top: 20px;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.nav-events ul {
    list-style-type: none;
    padding-left: 0;
}
.nav-events li {
    margin-bottom: 8px;
}
.nav-events a {
    display: block;
    padding: 8px 12px;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    transition: all 0.2s;
}
.nav-events a:hover {
    background-color: #f0f7ff;
    color: #0066cc;
    padding-left: 20px;
}
.nav-events a.active {
    background-color: #e3f2fd;
    color: #0066cc;
    font-weight: bold;
    border-left: 4px solid #0066cc;
}
.comparison-table {
    margin: 25px 0;
    font-size: 0.95em;
}
.comparison-table th {
    background-color: #2c3e50;
    color: white;
}
.live-example {
    background-color: #f0f8ff;
    border-left: 4px solid #3498db;
    padding: 20px;
    border-radius: 6px;
    margin: 25px 0;
}
.example-box {
    padding: 15px;
    background-color: white;
    border-radius: 4px;
    margin: 15px 0;
    border: 1px solid #ddd;
}
.method-group {
    background-color: #f5f7fa;
    padding: 20px;
    border-radius: 8px;
    margin: 30px 0;
    border-left: 5px solid #4a6baf;
}
.method-group h3 {
    color: #2c3e50;
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
}
.demo-element {
    padding: 10px;
    margin: 5px;
    background-color: #e8f4f8;
    border-radius: 4px;
    border: 1px solid #bce0f1;
    cursor: pointer;
    transition: all 0.2s;
}
.demo-element:hover {
    background-color: #d1ecf1;
}
.event-log {
    max-height: 200px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}
.event-bubble {
    position: relative;
    padding: 20px;
    border: 2px solid #ddd;
    border-radius: 8px;
    margin: 10px 0;
}
.bubble-level {
    position: absolute;
    top: -10px;
    left: 10px;
    background-color: #3498db;
    color: white;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 0.8em;
}
.event-flow {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin: 20px 0;
}
.flow-step {
    text-align: center;
    padding: 10px;
    border-radius: 5px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    min-width: 100px;
}
.flow-arrow {
    font-size: 1.5em;
    color: #6c757d;
}
.event-tag {
    display: inline-block;
    background-color: #2ecc71;
    color: white;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 0.8em;
    margin-right: 5px;
    margin-bottom: 5px;
}
.event-tag.mouse {
    background-color: #3498db;
}
.event-tag.keyboard {
    background-color: #9b59b6;
}
.event-tag.form {
    background-color: #e67e22;
}
.event-tag.window {
    background-color: #1abc9c;
}
.event-tag.touch {
    background-color: #e74c3c;
}
.event-object-table th {
    background-color: #34495e;
    color: white;
}
.highlight-event {
    background-color: #ffeaa7 !important;
    box-shadow: 0 0 0 2px #fdcb6e;
}
.event-category {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0;
}
.category-card {
    flex: 1;
    min-width: 200px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 15px;
    background-color: white;
}
.event-counter {
    display: inline-block;
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    background-color: #e74c3c;
    color: white;
    border-radius: 50%;
    font-size: 0.8em;
    margin-left: 5px;
}

.highlight-event {
    background-color: #ffeaa7 !important;
    box-shadow: 0 0 0 2px #fdcb6e;
    transition: all 0.3s ease;
}
.syntax-box {
    position: relative;
}
.syntax-box:hover:after {
    content: "点击复制代码";
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: rgba(0,0,0,0.7);
    color: white;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 0.8em;
    cursor: pointer;
}
.event-card:hover .event-icon {
    transform: scale(1.1);
    transition: all 0.3s ease;
}
.event-log div {
    padding: 2px 0;
    border-bottom: 1px solid #eee;
}
.event-log div:last-child {
    border-bottom: none;
}
.demo-element {
    user-select: none;
}
