/* Chaturbate Toplist Styles */

:root {
    --toplist-primary: #f47521;
    --toplist-secondary: #ff6b35;
    --toplist-dark: #1a1a2e;
    --toplist-light: #f8f9fa;
    --toplist-border: #e0e0e0;
    --toplist-shadow: rgba(0, 0, 0, 0.1);
    --toplist-hover: rgba(244, 117, 33, 0.1);
    --toplist-gradient: linear-gradient(135deg, #f47521 0%, #ff6b35 100%);
}

.chaturbate-toplist-container {
    width: 100%;
    max-width: 1200px;
    margin: 2rem auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Loading State */
.toplist-loading {
    text-align: center;
    padding: 4rem 2rem;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 1rem;
    border: 4px solid var(--toplist-border);
    border-top-color: var(--toplist-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.toplist-loading p {
    color: #666;
    font-size: 1rem;
}

/* Error State */
.toplist-error {
    text-align: center;
    padding: 3rem 2rem;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
}

.toplist-error p {
    color: #856404;
    margin: 0;
    font-size: 1rem;
}

/* Toplist Wrapper */
.toplist-wrapper {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px var(--toplist-shadow);
    overflow: hidden;
}

/* Header */
.toplist-header {
    background: var(--toplist-gradient);
    padding: 1.5rem 2rem;
    text-align: center;
}

.toplist-title {
    margin: 0;
    color: #ffffff;
    font-size: 1.75rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Toplist Items */
.toplist-items {
    padding: 1rem;
}

.toplist-item {
    display: grid;
    grid-template-columns: 60px 120px 1fr auto;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    margin-bottom: 0.75rem;
    background: #ffffff;
    border: 1px solid var(--toplist-border);
    border-radius: 10px;
    transition: all 0.3s ease;
    animation: slideIn 0.5s ease-out backwards;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.toplist-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px var(--toplist-shadow);
    border-color: var(--toplist-primary);
    background: var(--toplist-hover);
}

/* Rank */
.item-rank {
    text-align: center;
}

.rank-icon {
    display: block;
    font-size: 2rem;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.rank-number {
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    color: #666;
}

/* Image */
.item-image {
    position: relative;
    width: 120px;
    height: 90px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px var(--toplist-shadow);
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.toplist-item:hover .item-image img {
    transform: scale(1.1);
}

/* Badges */
.badge-hd,
.badge-new,
.badge-status {
    position: absolute;
    top: 5px;
    padding: 2px 6px;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 3px;
    color: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.badge-hd {
    left: 5px;
    background: #9c27b0;
}

.badge-new {
    left: 5px;
    top: 25px;
    background: #4caf50;
}

.badge-status {
    right: 5px;
    font-size: 0.5rem;
    padding: 2px 4px;
}

.status-public {
    background: #4caf50;
}

.status-private {
    background: #f44336;
}

.status-group {
    background: #ff9800;
}

.status-away {
    background: #9e9e9e;
}

/* Details */
.item-details {
    flex: 1;
    min-width: 0;
}

.model-name {
    margin: 0 0 0.25rem 0;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--toplist-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.model-age {
    margin: 0 0 0.25rem 0;
    font-size: 0.875rem;
    color: #666;
}

.model-subject {
    margin: 0 0 0.5rem 0;
    font-size: 0.875rem;
    color: #555;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.model-stats {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.stat-item {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    color: #666;
}

.stat-icon {
    font-size: 1rem;
}

.model-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-top: 0.5rem;
}

.tag {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: #f0f0f0;
    color: #666;
    font-size: 0.75rem;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.tag:hover {
    background: var(--toplist-primary);
    color: #ffffff;
}

/* Action Button */
.item-action {
    padding: 0 0.5rem;
}

.btn-visit {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--toplist-gradient);
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9375rem;
    border-radius: 25px;
    box-shadow: 0 4px 15px rgba(244, 117, 33, 0.3);
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-visit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(244, 117, 33, 0.4);
    text-decoration: none;
    color: #ffffff;
}

.btn-visit:active {
    transform: translateY(0);
}

.btn-icon {
    font-size: 1.125rem;
}

/* No Images Layout */
.chaturbate-toplist-container.no-images .toplist-item {
    grid-template-columns: 60px 1fr auto;
}

.chaturbate-toplist-container.no-images .item-image {
    display: none;
}

.chaturbate-toplist-container.no-images .stat-status {
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #ffffff;
}

.chaturbate-toplist-container.no-images .stat-status.status-public {
    background: #4caf50;
}

.chaturbate-toplist-container.no-images .stat-status.status-private {
    background: #f44336;
}

.chaturbate-toplist-container.no-images .stat-status.status-group {
    background: #ff9800;
}

.chaturbate-toplist-container.no-images .stat-status.status-away {
    background: #9e9e9e;
}

/* Responsive Design */
@media (max-width: 768px) {
    .toplist-item {
        grid-template-columns: 50px 100px 1fr;
        gap: 0.75rem;
        padding: 0.75rem;
    }

    .item-image {
        width: 100px;
        height: 75px;
    }

    .item-action {
        grid-column: 1 / -1;
        padding: 0;
        margin-top: 0.5rem;
    }

    .btn-visit {
        width: 100%;
        justify-content: center;
        padding: 0.875rem 1rem;
    }

    .rank-icon {
        font-size: 1.5rem;
    }

    .toplist-item {
        grid-template-columns: 40px 80px 1fr;
        gap: 0.5rem;
        padding: 0.5rem;
    }

    .item-rank {
        font-size: 0.875rem;
    }

    .rank-icon {
        font-size: 1.25rem;
    }

    .rank-number {
        font-size: 0.75rem;
    }

    .item-image {
        width: 80px;
        height: 60px;
    }

    .model-name {
        font-size: 0.9375rem;
    }

    .model-subject,
    .model-age {
        font-size: 0.8125rem;
    }

    .model-stats {
        gap: 0.5rem;
    }

    .stat-item {
        font-size: 0.8125rem;
    }
}

/* Print Styles */
@media print {
    .btn-visit {
        display: none;
    }

    .toplist-item {
        break-inside: avoid;
    }
}