/**
 * RatedGross New Theme CSS
 * Modern dark theme with coral accents
 */

/* ========================================
   CSS Variables & Reset
   ======================================== */
:root {
    --rg-bg-primary: #1a1a1a;
    --rg-bg-secondary: #222;
    --rg-bg-tertiary: #333;
    --rg-bg-header: #000;
    --rg-text-primary: #fff;
    --rg-text-secondary: #999;
    --rg-text-muted: #666;
    --rg-accent: #ff6b6b;
    --rg-accent-hover: #ff8585;
    --rg-border: #333;
    --rg-radius: 8px;
    --rg-radius-sm: 4px;
    --rg-shadow: 0 4px 12px rgba(0,0,0,0.3);
    --rg-transition: 0.2s ease;
}

/* ========================================
   Base Styles
   ======================================== */
* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--rg-bg-primary);
    color: var(--rg-text-primary);
    line-height: 1.5;
    margin: 0;
    padding: 0;
}

a {
    color: var(--rg-text-primary);
    text-decoration: none;
    transition: color var(--rg-transition);
}

a:hover {
    color: var(--rg-accent);
}

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

/* ========================================
   Layout Containers
   ======================================== */
.rg-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.rg-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
}

.rg-main {
    min-width: 0;
}

.rg-sidebar {
    min-width: 0;
}

@media (max-width: 1024px) {
    .rg-content {
        grid-template-columns: 1fr;
    }
    .rg-sidebar {
        order: -1;
    }
}

/* ========================================
   Header Redesign
   ======================================== */
.header {
    background: var(--rg-bg-header) !important;
    border-bottom: 2px solid var(--rg-border);
    padding: 15px 0;
}

.header .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.header .logo a {
    font-size: 28px;
    font-weight: bold;
    color: var(--rg-accent) !important;
}

.header .logo img {
    max-height: 40px;
}

/* Search Box */
.header .search {
    flex: 1;
    max-width: 400px;
}

.header .search form {
    display: flex;
    background: var(--rg-bg-tertiary);
    border-radius: var(--rg-radius-sm);
    overflow: hidden;
}

.header .search input[type="text"] {
    flex: 1;
    padding: 12px 15px;
    border: none;
    background: transparent;
    color: var(--rg-text-primary);
    font-size: 14px;
}

.header .search input[type="text"]::placeholder {
    color: var(--rg-text-secondary);
}

.header .search .search-button {
    padding: 12px 20px;
    background: var(--rg-accent);
    color: #fff;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: background var(--rg-transition);
}

.header .search .search-button:hover {
    background: var(--rg-accent-hover);
}

/* Social bookmarks */
.header .social-bookmarks {
    display: none;
}

/* ========================================
   Navigation Redesign
   ======================================== */
.navigation {
    background: var(--rg-bg-secondary);
    border-bottom: 1px solid var(--rg-border);
    padding: 0;
}

.navigation .center-hold,
.navigation .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.navigation ul.primary {
    display: flex;
    gap: 0;
    overflow-x: auto;
    margin: 0;
    padding: 0;
    list-style: none;
}

.navigation ul.primary li {
    margin: 0;
}

.navigation ul.primary li a {
    display: block;
    padding: 14px 20px;
    white-space: nowrap;
    color: var(--rg-text-primary);
    font-weight: 500;
    transition: all var(--rg-transition);
    border-bottom: 3px solid transparent;
}

.navigation ul.primary li a:hover,
.navigation ul.primary li.selected a {
    background: var(--rg-accent);
    color: #fff;
    border-bottom-color: var(--rg-accent-hover);
}

.navigation ul.secondary {
    display: none;
}

.navigation .button {
    display: none;
}

/* Hide old menu elements */
.top-links {
    display: none;
}

/* ========================================
   Section Headers
   ======================================== */
.rg-section {
    margin-bottom: 40px;
}

.headline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--rg-accent);
}

.headline h1,
.headline h2 {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    color: var(--rg-text-primary);
}

.headline .more {
    padding: 6px 14px;
    background: var(--rg-accent);
    color: #fff;
    border-radius: var(--rg-radius-sm);
    font-size: 13px;
    font-weight: 500;
    transition: background var(--rg-transition);
}

.headline .more:hover {
    background: var(--rg-accent-hover);
    color: #fff;
}

/* Sort dropdowns */
.headline .sort {
    position: relative;
    margin-left: 10px;
}

.headline .sort strong {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--rg-bg-tertiary);
    border-radius: var(--rg-radius-sm);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    color: var(--rg-text-secondary);
}

.headline .sort strong:hover {
    color: var(--rg-text-primary);
}

.headline .sort ul {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 160px;
    background: var(--rg-bg-secondary);
    border: 1px solid var(--rg-border);
    border-radius: var(--rg-radius-sm);
    box-shadow: var(--rg-shadow);
    z-index: 100;
    margin: 5px 0 0;
    padding: 5px 0;
    list-style: none;
}

.headline .sort:hover ul {
    display: block;
}

.headline .sort ul li a {
    display: block;
    padding: 8px 14px;
    color: var(--rg-text-secondary);
    font-size: 13px;
    transition: all var(--rg-transition);
}

.headline .sort ul li a:hover {
    background: var(--rg-bg-tertiary);
    color: var(--rg-text-primary);
}

/* ========================================
   Video Grid Redesign
   ======================================== */
.box {
    background: transparent;
}

.list-videos {
    background: transparent;
}

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

/* Video Item Card */
.list-videos .item {
    background: var(--rg-bg-secondary);
    border-radius: var(--rg-radius);
    overflow: hidden;
    transition: transform var(--rg-transition), box-shadow var(--rg-transition);
}

.list-videos .item:hover {
    transform: translateY(-5px);
    box-shadow: var(--rg-shadow);
}

.list-videos .item > a {
    display: block;
    color: var(--rg-text-primary);
}

.list-videos .item > a:hover {
    color: var(--rg-text-primary);
}

/* Thumbnail */
.list-videos .item .img {
    position: relative;
    padding-top: 56.25%;
    background: var(--rg-bg-tertiary);
    overflow: hidden;
}

.list-videos .item .img img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--rg-transition);
}

.list-videos .item:hover .img img {
    transform: scale(1.05);
}

/* Duration badge */
.list-videos .item .duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,0.85);
    padding: 4px 8px;
    border-radius: var(--rg-radius-sm);
    font-size: 12px;
    font-weight: 500;
    color: #fff;
}

/* HD badge */
.list-videos .item .is-hd {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--rg-accent);
    padding: 3px 8px;
    border-radius: var(--rg-radius-sm);
    font-size: 11px;
    font-weight: bold;
    color: #fff;
}

/* Private/Premium badges */
.list-videos .item .line-private,
.list-videos .item .line-premium {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 3px 8px;
    border-radius: var(--rg-radius-sm);
    font-size: 11px;
    font-weight: bold;
}

.list-videos .item .line-private {
    background: #f59e0b;
    color: #000;
}

.list-videos .item .line-premium {
    background: #8b5cf6;
    color: #fff;
}

/* Favorite icons */
.list-videos .item .ico-fav-0,
.list-videos .item .ico-fav-1,
.list-videos .item .ico-fav-2 {
    position: absolute;
    top: 8px;
    width: 28px;
    height: 28px;
    background: rgba(0,0,0,0.7);
    border-radius: 50%;
    cursor: pointer;
    transition: background var(--rg-transition);
}

.list-videos .item .ico-fav-0:hover,
.list-videos .item .ico-fav-1:hover,
.list-videos .item .ico-fav-2:hover {
    background: var(--rg-accent);
}

.list-videos .item .ico-fav-0 { left: 8px; }
.list-videos .item .ico-fav-1 { left: 42px; }
.list-videos .item .ico-fav-2 { left: 76px; }

/* Title */
.list-videos .item .title {
    display: block;
    padding: 12px 12px 8px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--rg-text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.list-videos .item:hover .title {
    color: var(--rg-accent);
}

/* Meta info */
.list-videos .item .wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 12px 12px;
    font-size: 12px;
    color: var(--rg-text-secondary);
}

.list-videos .item .rating {
    font-weight: 500;
}

.list-videos .item .rating.positive {
    color: #22c55e;
}

.list-videos .item .rating.negative {
    color: #ef4444;
}

.list-videos .item .views {
    color: var(--rg-text-secondary);
}

.list-videos .item .added em {
    font-style: normal;
    color: var(--rg-text-muted);
}

/* Status badges */
.list-videos .item .line-disabled,
.list-videos .item .line-error,
.list-videos .item .line-processing {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 8px 16px;
    border-radius: var(--rg-radius-sm);
    font-size: 12px;
    font-weight: 500;
}

.list-videos .item .line-disabled {
    background: #6b7280;
    color: #fff;
}

.list-videos .item .line-error {
    background: #ef4444;
    color: #fff;
}

.list-videos .item .line-processing {
    background: #3b82f6;
    color: #fff;
}

/* ========================================
   Pagination
   ======================================== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 30px;
    padding: 20px 0;
}

.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: var(--rg-bg-secondary);
    border-radius: var(--rg-radius-sm);
    font-size: 14px;
    color: var(--rg-text-secondary);
    transition: all var(--rg-transition);
}

.pagination a:hover {
    background: var(--rg-accent);
    color: #fff;
}

.pagination span.current {
    background: var(--rg-accent);
    color: #fff;
    font-weight: 600;
}

.pagination .prev,
.pagination .next {
    padding: 0 16px;
}

/* ========================================
   Sidebar / Tag Cloud
   ======================================== */
.rg-sidebar .box {
    background: var(--rg-bg-secondary);
    border-radius: var(--rg-radius);
    padding: 20px;
    margin-bottom: 20px;
}

.rg-sidebar .headline {
    border-bottom: 1px solid var(--rg-border);
    margin-bottom: 15px;
}

.rg-sidebar .headline h2 {
    font-size: 16px;
}

/* Tag cloud */
.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tags-cloud a {
    display: inline-block;
    padding: 6px 12px;
    background: var(--rg-bg-tertiary);
    border-radius: 20px;
    font-size: 13px;
    color: var(--rg-text-secondary);
    transition: all var(--rg-transition);
}

.tags-cloud a:hover {
    background: var(--rg-accent);
    color: #fff;
}

.tags-cloud a.size-1 { font-size: 11px; opacity: 0.7; }
.tags-cloud a.size-2 { font-size: 12px; opacity: 0.8; }
.tags-cloud a.size-3 { font-size: 13px; opacity: 0.9; }
.tags-cloud a.size-4 { font-size: 14px; }
.tags-cloud a.size-5 { font-size: 15px; font-weight: 500; }
.tags-cloud a.size-6 { font-size: 16px; font-weight: 600; }
.tags-cloud a.size-7 { font-size: 18px; font-weight: 700; }

/* ========================================
   SEO Text Section
   ======================================== */
.rg-seo-text {
    background: var(--rg-bg-secondary);
    padding: 30px 0;
    margin-top: 40px;
    border-top: 1px solid var(--rg-border);
}

.rg-seo-text p {
    color: var(--rg-text-secondary);
    line-height: 1.8;
    font-size: 14px;
}

/* ========================================
   Footer Redesign
   ======================================== */
.footer-margin {
    display: none;
}

.footer {
    background: var(--rg-bg-header);
    padding: 40px 0;
    margin-top: 0;
    border-top: 2px solid var(--rg-border);
}

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

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

.footer .nav li {
    display: inline-block;
}

.footer .nav a {
    color: var(--rg-text-secondary);
    font-size: 14px;
    transition: color var(--rg-transition);
}

.footer .nav a:hover {
    color: var(--rg-accent);
}

.footer .copyright {
    color: var(--rg-text-muted);
    font-size: 14px;
    margin-bottom: 15px;
}

.footer .copyright a {
    color: var(--rg-text-secondary);
}

.footer .copyright a:hover {
    color: var(--rg-accent);
}

.footer .txt {
    color: var(--rg-text-muted);
    font-size: 13px;
    line-height: 1.6;
}

/* ========================================
   Empty State
   ======================================== */
.empty-content {
    text-align: center;
    padding: 60px 20px;
    color: var(--rg-text-secondary);
    font-size: 16px;
    background: var(--rg-bg-secondary);
    border-radius: var(--rg-radius);
}

/* ========================================
   Advertisement Spots
   ======================================== */
.advertisement {
    margin: 20px 0;
    text-align: center;
}

.advertisement img,
.advertisement iframe {
    max-width: 100%;
    border-radius: var(--rg-radius-sm);
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 1200px) {
    .list-videos .margin-fix {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
}

@media (max-width: 768px) {
    .rg-content {
        padding: 15px;
        gap: 20px;
    }
    
    .header .container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .header .search {
        max-width: none;
        width: 100%;
    }
    
    .navigation ul.primary {
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
    }
    
    .navigation ul.primary li a {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .list-videos .margin-fix {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .headline {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .headline h1,
    .headline h2 {
        font-size: 18px;
    }
    
    .list-videos .item .title {
        font-size: 13px;
        padding: 10px 10px 6px;
    }
    
    .list-videos .item .wrap {
        padding: 0 10px 10px;
        font-size: 11px;
    }
    
    .tags-cloud a {
        padding: 5px 10px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .list-videos .margin-fix {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .list-videos .item .is-hd,
    .list-videos .item .duration {
        font-size: 10px;
        padding: 2px 6px;
    }
}

/* ========================================
   Animation Utilities
   ======================================== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.list-videos .item {
    animation: fadeIn 0.3s ease forwards;
}

/* Stagger animation for grid items */
.list-videos .margin-fix .item:nth-child(1) { animation-delay: 0.02s; }
.list-videos .margin-fix .item:nth-child(2) { animation-delay: 0.04s; }
.list-videos .margin-fix .item:nth-child(3) { animation-delay: 0.06s; }
.list-videos .margin-fix .item:nth-child(4) { animation-delay: 0.08s; }
.list-videos .margin-fix .item:nth-child(5) { animation-delay: 0.10s; }
.list-videos .margin-fix .item:nth-child(6) { animation-delay: 0.12s; }
.list-videos .margin-fix .item:nth-child(7) { animation-delay: 0.14s; }
.list-videos .margin-fix .item:nth-child(8) { animation-delay: 0.16s; }
.list-videos .margin-fix .item:nth-child(9) { animation-delay: 0.18s; }
.list-videos .margin-fix .item:nth-child(10) { animation-delay: 0.20s; }
.list-videos .margin-fix .item:nth-child(11) { animation-delay: 0.22s; }
.list-videos .margin-fix .item:nth-child(12) { animation-delay: 0.24s; }
