/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    background: #0a0a0a;
    color: #e0e0e0;
    line-height: 1.4;
}

a {
    color: #fff;
    text-decoration: none;
}

a:hover {
    color: #ff4444;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Container */
.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid #333;
    margin-bottom: 15px;
}

.logo img {
    height: 40px;
    width: auto;
}

.search {
    flex: 1;
    max-width: 400px;
    margin-left: 30px;
}

#search_form {
    display: flex;
    background: #1a1a1a;
    border: 1px solid #333;
    height: 40px;
}

.search-text {
    flex: 1;
}

.search-text input {
    width: 100%;
    height: 100%;
    background: transparent;
    border: none;
    padding: 0 15px;
    color: #e0e0e0;
    font-size: 14px;
}

.search-text input::placeholder {
    color: #666;
}

.search-text input:focus {
    outline: none;
}

.search-button {
    background: #ff4444;
    color: #fff;
    padding: 0 20px;
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

.search-button:hover {
    background: #ff3333;
}

/* Navigation */
nav {
    margin-bottom: 20px;
}

.navigation {
    position: relative;
}

.navigation .button {
    display: none;
    background: #1a1a1a;
    border: 1px solid #333;
    color: #e0e0e0;
    padding: 10px 15px;
    cursor: pointer;
    margin-bottom: 10px;
}

.navigation .button .icon {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.ico-bar {
    width: 20px;
    height: 2px;
    background: #e0e0e0;
}

.navigation ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.navigation li a {
    display: block;
    padding: 10px 15px;
    background: #1a1a1a;
    border: 1px solid #333;
    color: #e0e0e0;
    font-size: 14px;
    white-space: nowrap;
}

.navigation li a:hover {
    background: #333;
    color: #fff;
}

/* Content */
.content {
    flex: 1;
}

.main-content {
    width: 100%;
}

.main-container {
    width: 100%;
}

/* Headlines */
.headline {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.headline h1,
.headline h2 {
    font-size: 24px;
    font-weight: 600;
    color: #fff;
}

.headline h2 {
    font-size: 20px;
}

/* Sort */
.sort {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    cursor: pointer;
}

.sort .icon {
    width: 16px;
    height: 16px;
    background: #666;
}

.sort strong {
    color: #fff;
    font-size: 14px;
}

.sort ul {
    position: absolute;
    top: 100%;
    right: 0;
    background: #1a1a1a;
    border: 1px solid #333;
    list-style: none;
    min-width: 150px;
    z-index: 100;
    display: none;
}

.sort:hover ul {
    display: block;
}

.sort li a {
    display: block;
    padding: 10px 15px;
    color: #e0e0e0;
    font-size: 14px;
}

.sort li a:hover {
    background: #333;
    color: #fff;
}

/* Box */
.box {
    margin-bottom: 30px;
}

/* Video List */
.list-videos {
    width: 100%;
}

.margin-fix {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 5px;
}

/* Video Item */
.item {
    overflow: hidden;
    text-align: center;
}

.item:hover {
    border-color: #555;
}

.item a {
    display: block;
    color: inherit;
}

.img {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #000;
}

.img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 1px solid #333;
}

.title {
    display: block;
    padding: 12px;
    font-size: 14px;
    font-weight: 500;
    color: #e0e0e0;
    line-height: 1.3;
    min-height: 60px;
}

.item:hover .title {
    color: #fff;
}

.wrap {
    padding: 0 12px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: #999;
}

/* Rating Circle */
.rating {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
}

.rating_circle {
    width: 20px;
    height: 20px;
    display: block;
}

.rating_circle svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.e-c-base {
    fill: none;
    stroke: #333;
    stroke-width: 20;
}

.e-c-progress {
    fill: none;
    stroke: #4CAF50;
    stroke-width: 20;
    stroke-linecap: square;
}

.rating.bad .e-c-progress {
    stroke: #f44336;
}

.rating.average .e-c-progress {
    stroke: #ff9800;
}

.rating.good .e-c-progress {
    stroke: #4CAF50;
}

.duration,
.views {
    font-size: 11px;
    color: #666;
}

/* Categories List */
.list-categories .margin-fix {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.list-categories .item {
    text-align: center;
    padding: 20px 15px;
}

.list-categories .item:hover {
    background: #222;
}

/* Models List */
.list-models .margin-fix {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.list-models .item {
    text-align: center;
    padding: 15px;
}

.list-models .img {
    aspect-ratio: 1;
    margin-bottom: 10px;
}

/* Tags Cloud */
.tags-cloud {
    margin-top: 30px;
}

.tags-cloud a {
    display: inline-block;
    padding: 5px 10px;
    margin: 2px;
    background: #1a1a1a;
    border: 1px solid #333;
    color: #999;
    font-size: 12px;
}

.tags-cloud a:hover {
    background: #333;
    color: #fff;
}

/* Footer */
.footer-margin {
    margin-top: auto;
    padding-top: 30px;
}

.footer {
    background: #111;
    border-top: 1px solid #333;
    margin-top: 30px;
    padding: 30px 0;
}

.footer-wrap {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px;
    text-align: center;
}

.footer-logo {
    margin-bottom: 20px;
}

.footer-logo img {
    height: 45px;
    width: auto;
    margin: 0 auto;
}

.footer .nav {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.footer .nav a {
    color: #999;
    font-size: 14px;
}

.footer .nav a:hover {
    color: #fff;
}

.copyright {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
}

.txt {
    color: #555;
    font-size: 12px;
    line-height: 1.5;
    max-width: 800px;
    margin: 0 auto;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 10px;
    }
    
    .header {
        flex-direction: column;
        gap: 15px;
    }
    
    .search {
        margin-left: 0;
        width: 100%;
        max-width: none;
    }
    
    .navigation .button {
        display: flex;
        align-items: center;
        gap: 10px;
    }
    
    .navigation ul {
        display: none;
        flex-direction: column;
        gap: 0;
        border: 1px solid #333;
    }
    
    .navigation.open ul {
        display: flex;
    }
    
    .navigation li a {
        border: none;
        border-bottom: 1px solid #333;
    }
    
    .navigation li:last-child a {
        border-bottom: none;
    }
    
    .headline {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .headline h1,
    .headline h2 {
        font-size: 20px;
    }
    
    .margin-fix {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
    }
    
    .box {
        padding: 15px;
    }
    
    .footer .nav {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .margin-fix {
        grid-template-columns: 1fr;
    }
    
    .wrap {
        font-size: 11px;
    }
    
    .title {
        font-size: 13px;
        min-height: 50px;
    }
}

/* Video Preview Plugin Styles */
.video-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
}

.video-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Loading States */
.loading {
    opacity: 0.7;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #333;
    border-top: 2px solid #ff4444;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Focus States */
input:focus,
button:focus {
    outline: 2px solid #ff4444;
    outline-offset: 2px;
}

/* Selection */
::selection {
    background: #ff4444;
    color: #fff;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #111;
}

::-webkit-scrollbar-thumb {
    background: #333;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Video Page Styles */
.block-video {
    margin-bottom: 30px;
}

.video-holder {
    background: #111;
    border: 1px solid #333;
}

.player {
    position: relative;
    width: 100%;
    background: #000;
}

.player-holder {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
}

.player-holder video {
    width: 100%;
    height: 100%;
    background: #000;
}

/* Video Info Section */
.video-info {
    padding: 20px;
    border-top: 1px solid #333;
}

.info-holder {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-buttons {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* Rating Container */
.rating-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.rate-like,
.rate-dislike {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    background: #1a1a1a;
    border: 1px solid #333;
    color: #e0e0e0;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
}

.rate-like:hover {
    background: #2d5a2d;
    border-color: #4CAF50;
    color: #fff;
}

.rate-dislike:hover {
    background: #5a2d2d;
    border-color: #f44336;
    color: #fff;
}

.rate-like::before {
    content: "👍";
    font-size: 16px;
}

.rate-dislike::before {
    content: "👎";
    font-size: 16px;
}

.voters {
    color: #666;
    font-size: 12px;
}

/* Rating Circle for Video Page */
.video-info .rating {
    position: relative;
}

.video-info .rating_circle {
    width: 50px;
    height: 50px;
    display: block;
    position: relative;
}

.video-info .rating_circle svg {
    width: 100%;
    height: 100%;
}

.object_rating {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 11px;
    font-weight: 600;
    color: #fff;
}

.video-info .e-c-base {
    fill: none;
    stroke: #333;
    stroke-width: 20;
}

.video-info .e-c-progress {
    fill: none;
    stroke: #4CAF50;
    stroke-width: 20;
    stroke-linecap: square;
}

.video-info .rating_circle.bad .e-c-progress {
    stroke: #f44336;
}

.video-info .rating_circle.average .e-c-progress {
    stroke: #ff9800;
}

.video-info .rating_circle.good .e-c-progress {
    stroke: #4CAF50;
}

/* Video Details */
.block-details {
    width: 100%;
}

.block-details .info {
    padding-top: 15px;
}

.block-details .item {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.block-details .item span {
    color: #999;
    font-size: 14px;
}

.block-details .item em {
    color: #fff;
    font-style: normal;
    font-weight: 500;
}

/* Related Videos Section */
.related-videos {
    margin-top: 30px;
}

.list-sort {
    list-style: none;
    margin-bottom: 15px;
    padding: 0;
}

.list-sort li {
    display: inline-block;
}

.list-sort span {
    display: block;
    padding: 10px 0;
    color: #fff;
    font-size: 20px;
    font-weight: 600;
}


/* Responsive for Video Page */
@media (max-width: 768px) {
    .video-info {
        padding: 15px;
    }
    
    .info-buttons {
        gap: 15px;
    }
    
    .rating-container {
        gap: 10px;
    }
    
    .rate-like,
    .rate-dislike {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .video-info .rating_circle {
        width: 40px;
        height: 40px;
    }
    
    .object_rating {
        font-size: 10px;
    }
    
    .block-details .item {
        flex-direction: column;
        gap: 10px;
    }
    
    .list-sort span {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .info-buttons {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .rating-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}

/* Video Loading State */
.player-holder.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid #333;
    border-top: 3px solid #ff4444;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Video Controls Custom Styling */
.fp-player {
    background: #000 !important;
}

.fp-controls {
    background: linear-gradient(transparent, rgba(0,0,0,0.7)) !important;
}

.fp-play-button {
    color: #fff !important;
}

.fp-progress-bar {
    background: #333 !important;
}

.fp-progress-bar-current {
    background: #ff4444 !important;
}

.fp-volume-bar {
    background: #333 !important;
}

.fp-volume-bar-current {
    background: #ff4444 !important;
}
/* Tags in Info Content */
.info-content {
    margin-bottom: 20px;
    color: #e0e0e0;
    line-height: 1.6;
}

.info-content p {
    margin-bottom: 15px;
}

.info-content p:last-child {
    margin-bottom: 0;
}

/* Tags Styling */
.info-content a {
    display: inline-block;
    padding: 6px 12px;
    margin: 3px 5px 3px 0;
    background: #1a1a1a;
    border: 1px solid #333;
    color: #e0e0e0;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.info-content a:hover {
    background: #333;
    border-color: #ff4444;
    color: #fff;
    transform: translateY(-1px);
}

.info-content a:active {
    transform: translateY(0);
}

/* Alternative tag styles - если хотите другой вид */
.info-content.tags-pill a {
    border-radius: 20px;
    padding: 5px 15px;
}

.info-content.tags-minimal a {
    background: transparent;
    border: none;
    color: #ff4444;
    padding: 3px 8px;
    text-decoration: underline;
    text-decoration-color: transparent;
}

.info-content.tags-minimal a:hover {
    background: #ff4444;
    color: #fff;
    text-decoration-color: #fff;
}

/* Tags with icons - если хотите добавить иконки */
.info-content a::before {
    content: "#";
    color: #666;
    margin-right: 3px;
    font-size: 11px;
}

.info-content a:hover::before {
    color: #ff4444;
}

/* Responsive tags */
@media (max-width: 768px) {
    .info-content {
        padding: 15px;
    }
    
    .info-content a {
        padding: 5px 10px;
        font-size: 12px;
        margin: 2px 3px 2px 0;
    }
}

@media (max-width: 480px) {
    .info-content a {
        padding: 4px 8px;
        font-size: 11px;
        margin: 1px 2px 1px 0;
    }
}

/* Popular tags highlighting */
.info-content a.popular {
    background: #2d2d2d;
    border-color: #ff4444;
    color: #ff4444;
}

.info-content a.popular:hover {
    background: #ff4444;
    color: #fff;
}

/* Tags count badge */
.info-content a[data-count]::after {
    content: attr(data-count);
    background: #333;
    color: #999;
    font-size: 10px;
    padding: 1px 4px;
    margin-left: 5px;
    border-radius: 2px;
}

.info-content a[data-count]:hover::after {
    background: #555;
    color: #fff;
}

/* Pagination Styles */
.pagination {
    margin: 30px 0;
    display: flex;
    justify-content: center;
}

.pagination-holder {
    padding: 15px 20px;
}

.pagination ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 0;
    padding: 0;
}

.pagination li {
    display: flex;
}

.pagination li a,
.pagination li span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: #1a1a1a;
    border: 1px solid #333;
    color: #e0e0e0;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
}

.pagination li a:hover {
    background: #333;
    border-color: #555;
    color: #fff;
}

/* Current page */
.pagination li.page-current span {
    background: #ff4444;
    border-color: #ff4444;
    color: #fff;
    font-weight: 600;
}

/* Disabled states */
.pagination li.prev span,
.pagination li.first span {
    background: #0a0a0a;
    border-color: #222;
    color: #555;
    cursor: not-allowed;
}

/* Active states */
.pagination li.prev a,
.pagination li.first a,
.pagination li.next a,
.pagination li.last a {
    background: #2a2a2a;
    color: #fff;
}

.pagination li.prev a:hover,
.pagination li.first a:hover,
.pagination li.next a:hover,
.pagination li.last a:hover {
    background: #ff4444;
    border-color: #ff4444;
}

/* Jump/ellipsis */
.pagination li.jump a {
    background: transparent;
    border-color: transparent;
    color: #666;
    cursor: default;
    font-weight: bold;
    font-size: 16px;
}

.pagination li.jump a:hover {
    background: transparent;
    border-color: transparent;
    color: #666;
}

/* Page numbers */
.pagination li.page a {
    background: #1a1a1a;
}

.pagination li.page a:hover {
    background: #ff4444;
    border-color: #ff4444;
    color: #fff;
}

/* Navigation buttons styling */
.pagination li.prev,
.pagination li.next {
    margin: 0 10px;
}

.pagination li.first,
.pagination li.last {
    margin: 0 5px;
}

/* Alternative compact style */
.pagination.compact .pagination-holder {
    padding: 10px 15px;
}

.pagination.compact li a,
.pagination.compact li span {
    min-width: 35px;
    height: 35px;
    padding: 0 10px;
    font-size: 13px;
}

/* Alternative rounded style */
.pagination.rounded li a,
.pagination.rounded li span {
    border-radius: 4px;
}

/* Alternative minimal style */
.pagination.minimal .pagination-holder {
    background: transparent;
    border: none;
    padding: 10px 0;
}

.pagination.minimal li a,
.pagination.minimal li span {
    background: transparent;
    border: 1px solid #333;
}

.pagination.minimal li a:hover {
    background: #1a1a1a;
}

.pagination.minimal li.page-current span {
    background: #ff4444;
    border-color: #ff4444;
}

/* Responsive pagination */
@media (max-width: 768px) {
    .pagination-holder {
        padding: 10px 15px;
        overflow-x: auto;
    }
    
    .pagination ul {
        gap: 3px;
        min-width: max-content;
    }
    
    .pagination li a,
    .pagination li span {
        min-width: 35px;
        height: 35px;
        padding: 0 8px;
        font-size: 13px;
    }
    
    /* Hide some elements on mobile */
    .pagination li.first,
    .pagination li.last {
        display: none;
    }
}

@media (max-width: 480px) {
    .pagination li a,
    .pagination li span {
        min-width: 30px;
        height: 30px;
        padding: 0 6px;
        font-size: 12px;
    }
    
    .pagination ul {
        gap: 2px;
    }
    
    /* Show only essential pagination on small screens */
    .pagination li.prev span,
    .pagination li.next a {
        padding: 0 8px;
    }
}

/* Loading state for AJAX pagination */
.pagination.loading {
    opacity: 0.6;
    pointer-events: none;
}

.pagination.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #333;
    border-top: 2px solid #ff4444;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Focus states for accessibility */
.pagination li a:focus {
    outline: 2px solid #ff4444;
    outline-offset: 2px;
}

/* Custom icons for navigation (optional) */
.pagination li.prev a::before {
    content: "‹";
    margin-right: 3px;
    font-size: 16px;
}

.pagination li.next a::after {
    content: "›";
    margin-left: 3px;
    font-size: 16px;
}

.pagination li.first a::before {
    content: "«";
    margin-right: 3px;
    font-size: 14px;
}

.pagination li.last a::after {
    content: "»";
    margin-left: 3px;
    font-size: 14px;
}

/* Alternative: Text-only navigation without icons */
.pagination.text-only li.prev a::before,
.pagination.text-only li.next a::after,
.pagination.text-only li.first a::before,
.pagination.text-only li.last a::after {
    display: none;
}

/* Categories List Styles */
.categories-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Alphabet Navigation */
.alphabet-nav {
    background: #111;
    border: 1px solid #333;
    padding: 15px 20px;
    margin-bottom: 20px;
}

.alphabet-nav h3 {
    color: #fff;
    font-size: 16px;
    margin-bottom: 10px;
    font-weight: 600;
}

.alphabet-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.alphabet-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    background: #1a1a1a;
    border: 1px solid #333;
    color: #e0e0e0;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
}

.alphabet-links a:hover,
.alphabet-links a.active {
    background: #ff4444;
    border-color: #ff4444;
    color: #fff;
}

.alphabet-links a.disabled {
    background: #0a0a0a;
    border-color: #222;
    color: #444;
    cursor: not-allowed;
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}

.category-item {
    background: #111;
    border: 1px solid #333;
}

.category-item:hover {
    border-color: #555;
    background: #1a1a1a;
}

.category-item a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    text-decoration: none;
    color: inherit;
}

.category-item .title {
    color: #e0e0e0;
    font-size: 15px;
    font-weight: 500;
    flex: 1;
}

.category-item:hover .title {
    color: #fff;
}

.category-item .count {
    color: #666;
    font-size: 13px;
    font-weight: 400;
    white-space: nowrap;
    margin-left: 15px;
}

.category-item:hover .count {
    color: #999;
}

/* Alternative: List style */
.categories-list {
    background: #111;
    border: 1px solid #333;
}

.categories-list .category-item {
    background: transparent;
    border: none;
    border-bottom: 1px solid #333;
}

.categories-list .category-item:last-child {
    border-bottom: none;
}

.categories-list .category-item:hover {
    background: #1a1a1a;
}

/* Current letter section */
.letter-section {
    margin-bottom: 30px;
}

.letter-header {
    background: #ff4444;
    color: #fff;
    padding: 10px 20px;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
}

/* Responsive */
@media (max-width: 768px) {
    .categories-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .alphabet-links {
        gap: 5px;
    }
    
    .alphabet-links a {
        width: 30px;
        height: 30px;
        font-size: 13px;
    }
    
    .category-item a {
        padding: 12px 15px;
    }
    
    .category-item .title {
        font-size: 14px;
    }
    
    .category-item .count {
        font-size: 12px;
        margin-left: 10px;
    }
}

@media (max-width: 480px) {
    .alphabet-nav {
        padding: 10px 15px;
    }
    
    .alphabet-links a {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    .category-item a {
        padding: 10px 12px;
    }
}

/* Loading state */
.categories-loading {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.categories-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #333;
    border-top: 2px solid #ff4444;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

/* Hide empty letter header */
.letter-section:empty,
.letter-header:empty {
    display: none;
}

.letter-header {
    background: #ff4444;
    color: #fff;
    padding: 10px 20px;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
}

/* Rest of CSS remains the same */
