.badge {
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
}

.green {
    background: #2e7d32;
    color: white;
}
.yellow {
    background: #f9a825;
    color: black;
}
.orange {
    background: #e65100;
    color: white;
}
.red {
    background: #c62828;
    color: white;
}

.mod-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.mod-info {
    display: flex;
    flex-direction: column;
}
.mod-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 6px;
    width: 100%;
}
.header-title-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.loader-img {
    width: 25px;
    height: 25px;
    background: var(--m3-container);
    border: 1px solid var(--mc-border);
    padding: 3px;
    border-radius: 6px;
    object-fit: contain;
    box-sizing: border-box;
}

.version-text {
    font-size: 0.85rem;
    color: #e0e0e0;
    display: block;
    margin-top: 4px;
}

.ranges-container {
    margin-top: 10px;
    background: rgba(0, 0, 0, 0.2);
    padding: 8px;
    border-radius: 8px;
}

.ranges-title {
    font-size: 0.8rem;
    color: #b0b5ba;
    font-weight: bold;
    display: block;
    margin-bottom: 6px;
}
.loader-range-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}
.badge.large span {
    font-size: 1.1rem;
    color: white;
}

/* Overflow protections for text truncation */
.mod-info {
    overflow: hidden;
    min-width: 0;
}
.details-left {
    overflow: hidden;
    min-width: 0;
}
.detail-col {
    overflow: hidden;
    min-width: 0;
}
.mod-header strong,
.version-text,
.detail-val,
.badge {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    max-width: 100%;
    vertical-align: bottom;
}
.loader-name-text {
    font-size: 0.85rem;
    color: #e0e0e0;
}
.range-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.version-badge {
    background: var(--m3-container);
    border: 1px solid var(--mc-border);
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    color: #e0e0e0;
    white-space: nowrap;
}

.status {
    white-space: nowrap;
}

.expand-icon-btn {
    background: transparent;
    border: none;
    color: var(--m3-on-surface);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    border-radius: 50%;
    transition:
        transform 0.3s ease,
        background 0.2s ease;
}

.expand-icon-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}
.expand-icon-btn.expanded {
    transform: rotate(180deg);
}

.mod-details {
    display: none;
    width: 100%;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px dashed var(--mc-border);
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 16px;
    font-size: 0.85rem;
    color: #b0b5ba;
}

.mod-details.expanded {
    display: flex;
}

.details-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    flex-wrap: nowrap;
    gap: 16px;
}

.details-left,
.details-right {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    min-width: 0;
}
.details-left {
    align-items: flex-start;
    gap: 24px;
    flex: 1 1 0%;
}
.details-right {
    flex-shrink: 0;
}
.detail-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.release-type-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-weight: bold;
    font-size: 0.75rem;
    position: relative;
    top: 15px;
    left: 8px;
}

.type-release {
    background: #1bd96a;
    color: #000;
}
.type-beta {
    background: #eedb4d;
    color: #000;
}
.type-alpha {
    background: #d94436;
    color: #fff;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #1bd96a;
    color: #000000;
    text-decoration: none;
    padding: 6px 14px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 0.85rem;
    transition: 0.2s;
}

.download-btn:hover {
    background: #17b95a;
}

.detail-col {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.detail-label {
    font-size: 0.75rem;
    color: #9aa0a6;
    text-transform: uppercase;
    font-weight: bold;
}
.detail-val {
    font-size: 0.85rem;
    color: #e0e0e0;
    line-height: 1.3;
    flex-direction: column;
    display: flex;
    gap: 4px;
}

.platform-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: bold;
}
.platform-icon {
    width: 14px;
    height: 14px;
    display: inline-block;
}

.dependencies-container {
    width: 100%;
    padding-top: 12px;
    border-top: 1px dashed var(--mc-border);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dep-group {
    display: flex;
    align-items: flex-start;
}
.dep-type {
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
    width: 85px;
    flex-shrink: 0;
    padding-top: 5px;
    margin-right: 8px;
}
.dep-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.dep-badge {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--mc-border);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    color: #e0e0e0;
    display: flex;
    align-items: center;
}

a.dep-badge.clickable-dep {
    text-decoration: none;
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        transform 0.1s ease;
}

a.dep-badge.clickable-dep:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #e0e0e0;
    transform: translateY(-1px);
}
