body {
    background: #f5f7fa;
}

.cheatsheet-tool-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.cheatsheet-tool-container h1 {
    text-align: center;
    color: #333;
    margin-bottom: 2rem;
    font-size: 2rem;
}

.tool-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 0;
    background: white;
    border-radius: 12px 12px 0 0;
    padding: 0.5rem 0.5rem 0 0.5rem;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 0.875rem 1.5rem;
    border: none;
    background: transparent;
    color: #718096;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.3s ease;
    border-radius: 8px 8px 0 0;
}

.tab-btn:hover {
    color: #667eea;
    background: rgba(102,126,234,0.08);
}

.tab-btn.active {
    color: #667eea;
    background: rgba(102,126,234,0.1);
    border-bottom-color: #667eea;
    box-shadow: 0 -2px 8px rgba(102,126,234,0.1) inset;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.search-section {
    margin-bottom: 1.5rem;
}

.search-section input {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
    background: white;
}

.search-section input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.1);
}

.table-container {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    max-height: 600px;
    overflow-y: auto;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 1;
}

.data-table td {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
}

.data-table tr:hover td {
    background-color: #f8f9ff;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.port-num,
.service-name,
.ext-name,
.ascii-dec,
.ascii-hex,
.unicode-code,
.mime-type {
    cursor: pointer;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s;
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

.port-num:hover,
.serviceName:hover,
.ext-name:hover,
.ascii-dec:hover,
.ascii-hex:hover,
.unicode-code:hover,
.mime-type:hover {
    background-color: rgba(102,126,234,0.1);
}

.status-code {
    display: inline-block;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s;
}

.status-code:hover {
    transform: scale(1.05);
}

.status-code.info {
    background-color: #e3f2fd;
    color: #1976d2;
}

.status-code.success {
    background-color: #e8f5e9;
    color: #388e3c;
}

.status-code.redirect {
    background-color: #fff3e0;
    color: #f57c00;
}

.status-code.client-error {
    background-color: #ffebee;
    color: #d32f2f;
}

.status-code.server-error {
    background-color: #fce4ec;
    color: #c2185b;
}

.html-entity {
    font-family: 'Consolas', 'Monaco', monospace;
    cursor: pointer;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s;
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

.html-entity:hover {
    background-color: rgba(102,126,234,0.1);
}

.unicode-char,
.ascii-char {
    font-size: 1.3rem;
    cursor: pointer;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.unicode-char:hover,
.ascii-char:hover {
    background-color: rgba(102,126,234,0.1);
}

.info-section {
    background: #f0fdf4;
    border: 1px solid #d1fae5;
    border-radius: 16px;
    padding: 1.75rem;
    margin-top: 2rem;
}

.info-section h3 {
    color: #065f46;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.info-section ul {
    padding-left: 1.5rem;
}

.info-section li {
    color: #374151;
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

@media (max-width: 768px) {
    .cheatsheet-tool-container {
        padding: 1rem;
    }
    
    .tool-tabs {
        flex-wrap: wrap;
        gap: 0.25rem;
    }
    
    .tab-btn {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }
    
    .data-table {
        font-size: 0.9rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.6rem 0.8rem;
    }
    
    .table-container {
        max-height: 400px;
    }
    
    .search-section input {
        padding: 0.875rem 1rem;
    }
}
