.categories-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 0;
}
.categories-page h1 {
    color: #fff;
    font-family: Inter, sans-serif;
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}
.category-card {
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #252527 0%, #1e1e1f 100%);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 16px;
    padding: 1.25rem;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
}
.category-card:hover {
    border-color: rgba(72, 84, 252, 0.3);
    box-shadow: 0 20px 25px -5px rgba(72, 84, 252, 0.1);
}
.category-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    text-decoration: none;
}
.category-card-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    background: rgba(72, 84, 252, 0.15);
    border-radius: 10px;
    transition: transform 0.2s;
}
.category-card:hover .category-card-icon {
    transform: scale(1.1);
}
.category-card-title {
    color: #fff;
    font-family: Inter, sans-serif;
    font-size: 18px;
    font-weight: 600;
    transition: color 0.2s;
    word-break: break-word;
    overflow-wrap: break-word;
}
.category-card:hover .category-card-title {
    color: #4854FC;
}
.category-card-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.category-card-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255,255,255,0.6);
    font-family: Inter, sans-serif;
    font-size: 14px;
    text-decoration: none;
    transition: color 0.2s;
}
.category-card-item:hover {
    color: rgba(255,255,255,0.8);
}
.category-card-item svg {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    color: #4854FC;
}
.category-card-item span {
    word-break: break-word;
    overflow-wrap: break-word;
}
.category-card-item-empty {
    pointer-events: none;
    color: rgba(255,255,255,0.4) !important;
}
/* Level-2 expandable row */
.category-card-item-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 36px;
}
.category-card-expand-btn {
    flex-shrink: 0;
    width: 36px;
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    color: #4854FC;
    padding: 0;
    border-radius: 6px;
    transition: transform 0.2s, background 0.2s;
    -webkit-tap-highlight-color: transparent;
}
.category-card-expand-btn:hover {
    background: rgba(72, 84, 252, 0.15);
}
.category-card-expand-btn svg {
    width: 16px;
    height: 16px;
}
.category-card-expand-btn.expanded svg {
    transform: rotate(90deg);
}
.category-card-item-link {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255,255,255,0.6);
    font-family: Inter, sans-serif;
    font-size: 14px;
    text-decoration: none;
    transition: color 0.2s;
}
.category-card-item-link:hover {
    color: rgba(255,255,255,0.8);
}
.category-card-item-link span {
    word-break: break-word;
    overflow-wrap: break-word;
}
.category-card-sublist {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
}
.category-card-sublist.is-expanded {
    max-height: 400px;
    overflow-y: auto;
}
.category-card-sublist-inner {
    padding-left: 44px;
    padding-top: 0.25rem;
    padding-bottom: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.category-card-sublist .category-card-item {
    font-size: 13px;
    color: rgba(255,255,255,0.5);
}
@media (min-width: 768px) {
    .category-card { padding: 1.5rem; border-radius: 24px; }
    .category-card-title { font-size: 18px; }
}
