body {
     /* Ensure modals can scroll if content is long */
     overflow-y: scroll;
}
.site-card {
    transition: transform 0.2s;
}
.site-card:hover {
    transform: translateY(-5px);
}
.category-title {
    position: relative;
    padding-left: 1rem;
    display: flex; /* Use flexbox to align title and buttons */
    align-items: center;
    justify-content: space-between; /* Push title to left, buttons to right */
     margin-bottom: 1rem; /* Space below title */
}
 .category-title span {
     flex-grow: 1; /* Allow title text to take available space */
 }
.category-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 1.2em;
    background-color: #2563eb; /* Blue-600 */
    border-radius: 2px;
}

/* Icon Container Styles */
.site-icon-container {
    display: inline-flex; /* Use flex to center content */
    align-items: center;
    justify-content: center;
    width: 32px; /* Match site-card size */
    height: 32px;
    margin-bottom: 0.5rem; /* Space below icon */
    border-radius: 8px; /* Match site-card border-radius or similar */
    overflow: hidden; /* Hide anything outside */
    flex-shrink: 0; /* Don't shrink in flex layout */
    position: relative; /* For absolute positioning of children */
    background-color: #e5e7eb; /* Gray-200 for fallback background */
}

/* Real Image Icon Styles */
.site-icon-container img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain; /* Or 'cover' depending on desired look */
    image-rendering: -webkit-optimize-contrast; /* Optional: Improve image rendering */
    image-rendering: crisp-edges;
    position: absolute; /* Position over the initial */
    top: 0;
    left: 0;
    z-index: 2; /* Ensure img is above initial */
     /* Visibility controlled by the parent class */
}

/* Initial Fallback Text Styles */
.site-icon-container .site-initial {
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background-color: #3b82f6; /* Blue-500, example fallback color */
    color: white;
    font-size: 14px; /* Adjust size as needed */
    font-weight: bold;
    border-radius: 8px; /* Match container/img */
    position: absolute; /* Position below img */
    top: 0;
    left: 0;
    z-index: 1; /* Below img */
    text-transform: uppercase; /* Ensure uppercase */
}

/* Show Fallback when img is not available */
.site-icon-container.show-fallback img {
    display: none; /* Hide the img */
}

.site-icon-container.show-fallback .site-initial {
    display: flex; /* Show the initial (use flex as it has content centering) */
}


/* 模态框样式 */
.modal {
    z-index: 50; /* Ensure modals are on top */
}
/* 为代码块添加样式 */
.code-example {
    background-color: #f4f4f5; /* Gray-100 */
    padding: 1rem;
    border-radius: 0.25rem;
    font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
    font-size: 0.875rem; /* sm text */
    overflow-x: auto; /* Add horizontal scroll for wide code */
    white-space: pre-wrap; /* Wrap long lines */
    word-wrap: break-word; /* Break words if necessary */
}

/* 新增: 控制模态框显示/隐藏 */
.modal.hidden {
    display: none;
}
.modal.flex {
    display: flex;
}