* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
}

.header {
    background: #1a1a1a;
    color: white;
    padding: 15px 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border-bottom: 1px solid #2a2a2a;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
}

h1 {
    font-size: 20px;
    font-weight: 600;
}

.header-subtitle {
    font-size: 12px;
    opacity: 0.9;
    margin-top: 2px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.btn {
    padding: 8px 16px;
    background: transparent;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    white-space: nowrap;
    font-weight: 400;
}

.btn:hover {
    background: rgba(255,255,255,0.1);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    gap: 20px;
    padding: 20px;
}

.sidebar {
    width: 280px;
    background: white;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid #e0e0e0;
    padding: 20px;
    height: fit-content;
    position: sticky;
    top: 90px;
    transition: width 0.3s ease, padding 0.3s ease;
}

.sidebar.collapsed {
    width: 60px;
    padding: 20px 10px;
    position: relative;
    cursor: pointer;
}

.sidebar-collapsed-icon {
    display: none;
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 24px;
    color: #666;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.sidebar.collapsed .sidebar-collapsed-icon {
    display: block;
}

.sidebar.collapsed:hover .sidebar-collapsed-icon {
    opacity: 1;
}

.sidebar-collapsed-label {
    display: none;
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%) rotate(-90deg);
    transform-origin: center;
    font-size: 10px;
    color: #666;
    white-space: nowrap;
    font-weight: 500;
    letter-spacing: 0.5px;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.sidebar.collapsed .sidebar-collapsed-label {
    display: block;
}

.sidebar.collapsed:hover .sidebar-collapsed-label {
    opacity: 1;
}

/* Overlay для sidebar на мобильных */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 199;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* Предотвращаем скролл body когда sidebar открыт */
body.sidebar-open {
    overflow: hidden;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.sidebar-close {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: #666;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
}

.sidebar-close:hover {
    background: #f0f0f0;
    color: #1a1a1a;
}

@media (max-width: 1024px) {
    .sidebar-close {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

.sidebar-title {
    font-size: 14px;
    font-weight: 500;
    color: #1a1a1a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    transition: opacity 0.3s ease;
}

.sidebar.collapsed .sidebar-title {
    opacity: 0;
    width: 0;
    margin: 0;
}

.sidebar.collapsed .sidebar-header {
    margin-bottom: 0;
}

.sidebar-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s ease;
    flex-shrink: 0;
    position: relative;
}

.sidebar-toggle:hover {
    background: #f5f5f5;
}

.sidebar-toggle svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.sidebar.collapsed .sidebar-toggle {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 32px;
}

.sidebar.collapsed .sidebar-toggle svg {
    transform: rotate(180deg);
}

.sidebar.collapsed:hover {
    background: #fafafa;
}

.analysis-list {
    transition: opacity 0.3s ease;
    list-style: none;
}

.sidebar.collapsed .analysis-list {
    opacity: 0;
    pointer-events: none;
}

.analysis-item {
    padding: 12px;
    border-radius: 4px;
    cursor: pointer;
    margin-bottom: 2px;
    font-size: 14px;
    color: #666;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.analysis-item:hover {
    background: #f5f5f5;
}

.analysis-item.active {
    background: #1a1a1a;
    color: white;
    font-weight: 400;
}

.analysis-checkbox {
    width: 16px;
    height: 16px;
    cursor: pointer;
    flex-shrink: 0;
    accent-color: #1a1a1a;
}

.analysis-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    gap: 8px;
}

.analysis-date {
    flex: 1;
}

.analysis-platform {
    font-size: 12px;
    color: #999;
    margin-right: 8px;
}

.analysis-item.active .analysis-platform {
    color: #ccc;
}

.analysis-edit-btn {
    opacity: 0;
    transition: opacity 0.2s;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    color: inherit;
    flex-shrink: 0;
}

.analysis-item:hover .analysis-edit-btn,
.analysis-item.active .analysis-edit-btn {
    opacity: 1;
}

.analysis-edit-input {
    flex: 1;
}

.analysis-save-btn:hover {
    background: #2a2a2a !important;
}

.analysis-cancel-btn:hover {
    background: #777 !important;
}

.main-content {
    flex: 1;
    min-width: 0;
}

.filters {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    flex-direction: row;
}

.filter-dropdown-wrapper {
    position: relative;
}

.filter-dropdown {
        position: absolute;
        top: 100%;
        left: 0;
        margin-top: 5px;
        background: white;
        border: 1px solid #e0e0e0;
        border-radius: 4px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        z-index: 1000;
        min-width: 150px;
}

.filter-dropdown-item {
    padding: 10px 15px;
    cursor: pointer;
    font-size: 14px;
    color: #1a1a1a;
    transition: background 0.2s;
}

.filter-dropdown-item:hover {
    background: #f5f5f5;
}

.filter-dropdown-item:first-child {
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
}

.filter-dropdown-item:last-child {
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
}

.filter-btn {
    padding: 10px 20px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    color: #1a1a1a;
    font-weight: 400;
}

.filter-btn:hover {
    border-color: #1a1a1a;
    background: #f5f5f5;
}

.filter-btn.active {
    background: #1a1a1a;
    color: white;
    border-color: #1a1a1a;
}

.content-card {
    background: white;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid #e0e0e0;
    padding: 25px;
    margin: 0 0 100px;
}

.card-title {
    font-size: 18px;
    font-weight: 400;
    color: #1a1a1a;
    margin-bottom: 5px;
    letter-spacing: -0.3px;
}

.card-subtitle {
    font-size: 13px;
    color: #666;
    margin-bottom: 20px;
    font-weight: 400;
}

.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1000px;
}

th {
    background: #f8f9fa;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #333;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e9ecef;
}

td {
    padding: 15px 12px;
    border-bottom: 1px solid #e9ecef;
    font-size: 14px;
}

tr:hover {
    background: #f8f9fa;
}

.competitor-name {
    font-weight: 500;
    color: #333;
}

.video-title {
    color: #333;
}

.link {
    color: #1a1a1a;
    text-decoration: none;
}

.link:hover {
    text-decoration: underline;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
    background: white;
    color: #1a1a1a;
    font-weight: 400;
}

.btn-small:hover {
    background: #f5f5f5;
    border-color: #1a1a1a;
}

.views {
    font-weight: 400;
    color: #1a1a1a;
}

.er-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    background: #1a1a1a;
    color: white;
}

.date {
    color: #666;
}

.social-icon {
    width: 20px;
    height: 20px;
    display: inline-block;
    vertical-align: middle;
    margin-right: 5px;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.error {
    background: #fee;
    color: #c33;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.table-controls {
    margin-bottom: 20px;
    padding: 16px;
    background: #fafafa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.table-filters-compact {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 200px;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 14px;
    color: #999;
    pointer-events: none;
    z-index: 1;
}

.search-box input {
    width: 100%;
    padding: 12px 40px 12px 42px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s;
    background: white;
}

.search-box input:focus {
    outline: none;
    border-color: #1a1a1а;
    box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.1);
}

.search-clear {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    color: #999;
    transition: color 0.2s;
}

.search-clear:hover {
    color: #1a1a1a;
}

.table-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.table-filter-select {
    padding: 10px 35px 10px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2 4L6 8L10 4' stroke='%23333' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
}

.table-filter-select:focus {
    outline: none;
    border-color: #1a1a1a;
    box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.1);
}

.table-results-count {
    margin-left: auto;
    padding: 8px 16px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 13px;
    color: #666;
    white-space: nowrap;
}

.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    transition: background 0.2s;
    text-align: center;
    vertical-align: middle;
}

.sortable:hover {
    background: #f0f0f0;
}

.sort-indicator {
    display: inline-block;
    font-size: 10px;
    opacity: 0;
    transition: opacity 0.2s;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}

.sortable:hover .sort-indicator {
    opacity: 0.5;
}

.sortable.sort-asc .sort-indicator,
.sortable.sort-desc .sort-indicator {
    opacity: 1;
}

.sortable.sort-asc .sort-indicator::after {
    content: '▲';
    color: #1a1a1a;
}

.sortable.sort-desc .sort-indicator::after {
    content: '▼';
    color: #1a1a1a;
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: white;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid #e0e0e0;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.modal-title {
    font-size: 18px;
    font-weight: 400;
    color: #1a1a1a;
}

.modal-body {
    padding: 20px;
    color: #666;
    line-height: 1.6;
}

.modal-footer {
    padding: 20px;
    border-top: 1px солид #e0e0e0;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.modal-btn {
    padding: 10px 20px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 400;
    transition: all 0.2s;
}

.modal-btn-primary {
    background: #1a1a1a;
    color: white;
    border-color: #1a1a1a;
}

.modal-btn-primary:hover {
    background: #333;
}

.modal-btn-secondary {
    background: white;
    color: #1a1a1a;
}

.modal-btn-secondary:hover {
    background: #f5f5f5;
}

.video-modal .modal {
    max-width: 1100px;
    width: 95%;
    max-height: 95vh;
    margin: auto;
}

.video-modal-content {
    max-height: calc(95vh - 140px);
    overflow-y: auto;
    padding: 0;
}

.video-modal-content::-webkit-scrollbar {
    width: 6px;
}

.video-modal-content::-webkit-scrollbar-track {
    background: #f5f5f5;
}

.video-modal-content::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.video-modal-content::-webkit-scrollbar-thumb:hover {
    background: #999;
}

.video-modal-player {
    width: 100%;
    aspect-ratio: 9/16;
    background: #000;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    display: block;
    margin-bottom: 15px;
    object-fit: contain;
}

/* Стили для div-контейнера с иконкой (для обратной совместимости) */
.video-modal-player-wrapper {
    width: 100%;
    aspect-ratio: 9/16;
    background: #f5f5f5;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    margin-bottom: 15px;
}

.video-modal-player-wrapper:hover {
    background: #e8e8e8;
}

.video-modal-play-icon {
    width: 70px;
    height: 70px;
    background: rgba(26, 26, 26, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.video-modal-player-wrapper:hover .video-modal-play-icon {
    background: rgba(26, 26, 26, 1);
    transform: scale(1.1);
}

.video-modal-play-icon svg {
    width: 28px;
    height: 28px;
}

.menu-toggle svg {
    width: 20px;
    height: 20px;
}

.video-modal-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.video-modal-action-btn {
    padding: 10px 18px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    font-weight: 400;
}

.video-modal-action-btn:hover {
    background: #f8f9fa;
    border-color: #1a1a1a;
    transform: translateY(-1px);
}

.video-modal-action-btn svg {
    width: 14px;
    height: 14px;
}

.video-modal-creator {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.video-modal-creator-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 400;
    font-size: 18px;
    flex-shrink: 0;
}

.video-modal-creator-info {
    flex: 1;
    min-width: 0;
}

.video-modal-creator-name {
    font-weight: 500;
    color: #1a1a1a;
    margin-bottom: 4px;
    font-size: 15px;
}

.video-modal-creator-username {
    font-size: 13px;
    color: #666;
}

.video-modal-grid {
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 25px;
    margin-bottom: 25px;
}

@media (max-width: 968px) {
    .video-modal-grid {
        grid-template-columns: 1fr;
    }
}

.monetization-modal .modal {
    max-width: 900px;
    max-height: 90vh;
}

.monetization-modal-content .modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

.monetization-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.monetization-stat-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
}

.monetization-stat-value {
    font-size: 24px;
    font-weight: 400;
    color: #1a1a1a;
    margin-bottom: 5px;
}

.monetization-stat-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.monetization-table-wrapper {
    overflow-x: auto;
    margin-top: 20px;
}

.monetization-table-wrapper table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.monetization-table-wrapper th {
    background: #f8f9fa;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #333;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e9ecef;
}

.monetization-table-wrapper td {
    padding: 15px 12px;
    border-bottom: 1px solid #e9ecef;
    font-size: 14px;
}

.monetization-table-wrapper tr:hover {
    background: #f8f9fa;
}

#videosTableBody {
    user-select: none;
}

.video-info-section {
    margin-bottom: 25px;
    padding: 20px;
    background: #fafafa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.video-info-section:last-child {
    margin-bottom: 0;
}

.video-info-title {
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-bottom: 8px;
    border-bottom: 2px solid #1a1a1a;
    display: inline-block;
}

.video-info-content {
    color: #333;
    line-height: 1.8;
    white-space: pre-wrap;
    font-size: 14px;
}

.video-meta-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.video-meta-item {
    padding: 10px;
    background: #fafafa;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
}

.video-meta-label {
    font-size: 11px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.video-meta-value {
    font-size: 16px;
    color: #1a1a1a;
    font-weight: 400;
}

/* ===========================================
   RESPONSIVE DESIGN - Desktop Large (1200px+)
   =========================================== */
@media (max-width: 1400px) {
    .container {
        max-width: 100%;
        padding: 15px;
    }
    
    .header-content {
        max-width: 100%;
    }
}

/* ===========================================
   RESPONSIVE DESIGN - Desktop (1024px-1200px)
   =========================================== */
@media (max-width: 1200px) {
    .sidebar {
        width: 240px;
    }
    
    table {
        min-width: 900px;
    }
    
    .video-modal .modal {
        max-width: 95%;
    }
}

/* ===========================================
   RESPONSIVE DESIGN - Tablet (768px-1024px)
   =========================================== */
@media (max-width: 1024px) {
    .menu-toggle {
        display: block;
    }
    
    .container {
        flex-direction: column;
        gap: 15px;
    }
    
    .sidebar {
        width: 100%;
        position: fixed;
        top: 0;
        left: -100%;
        height: 100vh;
        z-index: 200;
        border-radius: 0;
        border: none;
        box-shadow: 4px 0 20px rgba(0,0,0,0.15);
        transition: left 0.3s ease;
        overflow-y: auto;
        padding-top: 20px;
    }
    
    .sidebar.open {
        left: 0;
    }
    
    /* Overlay для sidebar */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 199;
    }
    
    .sidebar.open ~ .sidebar-overlay,
    body.sidebar-open .sidebar-overlay {
        display: block;
    }
    
    .sidebar-toggle {
        display: none;
    }
    
    .sidebar.collapsed {
        width: 100%;
        padding: 20px;
    }
    
    .sidebar.collapsed .sidebar-title {
        opacity: 1;
        width: auto;
    }
    
    .sidebar.collapsed .analysis-list {
        opacity: 1;
        pointer-events: auto;
    }
    
    .sidebar-collapsed-icon,
    .sidebar-collapsed-label {
        display: none !important;
    }
    
    .main-content {
        width: 100%;
    }
    
    .filters {
        flex-wrap: wrap;
    }
    
    .filter-btn {
        flex: 1;
        min-width: 120px;
        justify-content: center;
    }
    
    table {
        min-width: 800px;
    }
    
    .video-modal-grid {
        grid-template-columns: 1fr 2fr;
        gap: 20px;
    }
}

/* ===========================================
   RESPONSIVE DESIGN - Tablet Portrait (768px)
   =========================================== */
@media (max-width: 768px) {
    .header {
        padding: 12px 15px;
    }
    
    .header-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .header-left {
        flex: 1;
        min-width: 0;
    }
    
    .header-left > div {
        overflow: hidden;
    }
    
    h1 {
        font-size: 16px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .header-subtitle {
        display: none;
    }
    
    .user-info {
        gap: 6px;
    }

    .user-info .btn {
        padding: 8px;
        font-size: 12px;
        min-width: 36px;
        justify-content: center;
    }

    /* Hide button text on tablets, show only icons */
    .user-info .btn {
        font-size: 0;
        position: relative;
        padding: 8px;
        min-width: 36px;
        border-radius: 6px;
    }

    /* Add SVG icons using ::after pseudo-element */
    .user-info a[href="/"]:after {
        content: "";
        display: block;
        width: 18px;
        height: 18px;
        background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"/></svg>') no-repeat center;
        background-size: contain;
    }

    .user-info a[href="/profile.html"]:after {
        content: "";
        display: block;
        width: 18px;
        height: 18px;
        background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/></svg>') no-repeat center;
        background-size: contain;
    }

    .user-info button.btn:after {
        content: "";
        display: block;
        width: 18px;
        height: 18px;
        background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M17 7l-1.41 1.41L18.17 11H8v2h10.17l-2.58 2.58L17 17l5-5zM4 5h8V3H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h8v-2H4V5z"/></svg>') no-repeat center;
        background-size: contain;
    }
    
    .container {
        padding: 10px;
        gap: 10px;
    }
    
    .content-card {
        padding: 15px;
    }
    
    .card-title {
        font-size: 16px;
    }
    
    .card-subtitle {
        font-size: 12px;
        margin-bottom: 15px;
    }
    
    .filters {
        flex-direction: column;
        gap: 8px;
    }
    
    .filter-btn {
        width: 100%;
    }
    
    .table-controls {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .table-controls-row {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .search-box {
        min-width: 100%;
    }
    
    .table-filters {
        width: 100%;
        flex-direction: row;
    }
    
    .table-filter-select {
        flex: 1;
        min-width: 0;
    }
    
    .table-results-count {
        margin-left: 0;
        text-align: center;
    }
    
    /* Адаптивная таблица */
    .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -15px;
        padding: 0 15px;
    }
    
    table {
        min-width: 700px;
        font-size: 13px;
    }
    
    th, td {
        padding: 10px 8px;
    }
    
    /* Скрываем некоторые колонки на планшетах */
    th:nth-child(4), td:nth-child(4), /* Транскрипт */
    th:nth-child(6), td:nth-child(6) { /* ER */
        display: none;
    }
    
    .video-modal .modal {
        width: 95%;
        max-height: 90vh;
    }
    
    .video-modal-grid {
        grid-template-columns: 1fr;
    }
    
    .video-modal-player {
        aspect-ratio: 16/9;
        max-height: 40vh;
    }
    
    .monetization-modal .modal {
        max-width: 95%;
    }
}

/* ===========================================
   RESPONSIVE DESIGN - Mobile (480px-768px)
   =========================================== */
@media (max-width: 600px) {
    .header {
        padding: 10px 12px;
    }
    
    .header-left {
        gap: 10px;
    }
    
    h1 {
        font-size: 14px;
    }
    
    .menu-toggle {
        padding: 4px;
    }
    
    .menu-toggle svg {
        width: 18px;
        height: 18px;
    }
    
    /* Icon-only buttons on mobile */
    .user-info {
        gap: 4px;
    }

    .user-info .btn {
        padding: 6px;
        min-width: 32px;
        font-size: 0;
    }

    .user-info a[href="/"]:after,
    .user-info a[href="/profile.html"]:after,
    .user-info button.btn:after {
        width: 16px;
        height: 16px;
    }
    
    .sidebar {
        width: 85%;
        max-width: 300px;
    }
    
    .sidebar-header {
        margin-bottom: 12px;
    }
    
    .sidebar-title {
        font-size: 13px;
    }
    
    .analysis-item {
        padding: 10px;
        font-size: 13px;
    }
    
    .container {
        padding: 8px;
    }
    
    .content-card {
        padding: 12px;
        border-radius: 8px;
    }
    
    .card-title {
        font-size: 15px;
    }
    
    .filters {
        gap: 6px;
    }
    
    .filter-btn {
        padding: 8px 12px;
        font-size: 12px;
        gap: 6px;
    }
    
    .filter-btn svg {
        width: 14px;
        height: 14px;
    }
    
    .table-controls {
        padding: 12px;
        border-radius: 8px;
    }
    
    .search-box input {
        padding: 10px 35px 10px 38px;
        font-size: 14px;
    }
    
    .search-icon {
        left: 12px;
        width: 16px;
        height: 16px;
    }
    
    .table-filters {
        flex-direction: column;
    }
    
    .table-filter-select {
        width: 100%;
        padding: 10px 30px 10px 12px;
    }
    
    /* Таблица для мобильных */
    table {
        min-width: 500px;
        font-size: 12px;
    }
    
    th, td {
        padding: 8px 6px;
    }
    
    /* Скрываем больше колонок на мобильных */
    th:nth-child(4), td:nth-child(4), /* Транскрипт */
    th:nth-child(6), td:nth-child(6), /* ER */
    th:nth-child(8), td:nth-child(8) { /* Соцсеть */
        display: none;
    }
    
    .btn-small {
        padding: 5px 10px;
        font-size: 11px;
    }
    
    .er-badge {
        padding: 3px 8px;
        font-size: 10px;
    }
    
    /* Модальные окна - Bottom Sheet Style */
    .modal-overlay {
        align-items: flex-end;
    }

    .modal {
        border-radius: 16px 16px 0 0;
        width: 100%;
        max-width: 100%;
        margin: 0;
        position: relative;
        transform: translateY(0);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .modal-overlay:not(.active) .modal {
        transform: translateY(100%);
    }

    /* Drag handle for bottom sheet */
    .modal-header::before {
        content: '';
        position: absolute;
        top: 8px;
        left: 50%;
        transform: translateX(-50%);
        width: 36px;
        height: 4px;
        background: #d0d0d0;
        border-radius: 2px;
    }

    .modal-header {
        padding: 24px 16px 16px;
        position: relative;
        cursor: grab;
        -webkit-tap-highlight-color: transparent;
    }

    .modal-header:active {
        cursor: grabbing;
    }

    .modal-title {
        font-size: 16px;
    }

    .modal-body {
        padding: 16px;
        max-height: 65vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .video-modal .modal {
        width: 100%;
        max-height: 95vh;
        border-radius: 16px 16px 0 0;
    }

    .video-modal-content {
        max-height: calc(95vh - 220px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .modal-footer {
        padding: 16px;
        flex-direction: column;
        gap: 8px;
        border-top: 1px solid #e0e0e0;
    }

    .modal-btn {
        width: 100%;
        padding: 14px 20px;
        min-height: 48px;
        font-size: 15px;
    }
    
    .video-modal-player {
        aspect-ratio: 9/16;
        max-height: 35vh;
    }
    
    .video-modal-creator {
        padding: 12px;
        gap: 10px;
    }
    
    .video-modal-creator-avatar {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .video-modal-creator-name {
        font-size: 14px;
    }
    
    .video-info-section {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .video-info-title {
        font-size: 12px;
        margin-bottom: 10px;
    }
    
    .video-info-content {
        font-size: 13px;
        line-height: 1.6;
    }
}

/* ===========================================
   RESPONSIVE DESIGN - Small Mobile (< 480px)
   =========================================== */
@media (max-width: 480px) {
    .header {
        padding: 8px 10px;
    }
    
    .header-left {
        gap: 8px;
    }
    
    h1 {
        font-size: 13px;
        max-width: 150px;
    }
    
    .user-info .btn {
        padding: 5px;
        min-width: 30px;
        font-size: 0;
    }

    .user-info a[href="/"]:after,
    .user-info a[href="/profile.html"]:after,
    .user-info button.btn:after {
        width: 15px;
        height: 15px;
    }
    
    .container {
        padding: 6px;
    }
    
    .sidebar {
        width: 90%;
        max-width: 280px;
        padding: 15px;
    }
    
    .content-card {
        padding: 10px;
    }
    
    .card-title {
        font-size: 14px;
    }
    
    .card-subtitle {
        font-size: 11px;
    }
    
    .filters {
        gap: 6px;
        margin-bottom: 10px;
    }

    .filter-btn {
        padding: 7px 10px;
        font-size: 12px;
    }

    .filter-btn-icon {
        padding: 7px;
        min-width: 34px;
    }

    .table-controls {
        padding: 10px;
        gap: 8px;
    }

    .table-filters-compact {
        gap: 6px;
    }

    .table-filter-select {
        font-size: 12px;
        padding: 7px 8px;
    }

    .search-box input {
        font-size: 13px;
        padding: 9px 34px 9px 38px;
    }
    
    /* Таблица на очень маленьких экранах */
    table {
        min-width: 400px;
        font-size: 11px;
    }
    
    th, td {
        padding: 6px 4px;
    }
    
    /* Скрываем ещё больше колонок */
    th:nth-child(2), td:nth-child(2), /* Название конкурента */
    th:nth-child(4), td:nth-child(4), /* Транскрипт */
    th:nth-child(6), td:nth-child(6), /* ER */
    th:nth-child(7), td:nth-child(7), /* Дата */
    th:nth-child(8), td:nth-child(8) { /* Соцсеть */
        display: none;
    }
    
    .btn-small {
        padding: 4px 8px;
        font-size: 10px;
    }
    
    .video-modal-player {
        max-height: 30vh;
    }
    
    .video-info-section {
        padding: 12px;
    }
    
    /* Статистика в модальном окне */
    .video-modal-grid > div:last-child > div {
        padding: 12px;
    }
    
    .video-modal-grid > div:last-child > div > div:last-child {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
}

/* ===========================================
   TOUCH DEVICE OPTIMIZATIONS
   =========================================== */
@media (hover: none) and (pointer: coarse) {
    /* Увеличиваем области касания */
    .btn, .btn-small, .filter-btn, .modal-btn {
        min-height: 44px;
    }
    
    .analysis-item {
        min-height: 48px;
    }
    
    .analysis-edit-btn {
        opacity: 1;
        padding: 8px;
    }
    
    th, td {
        padding: 12px 8px;
    }
    
    .video-checkbox {
        width: 20px;
        height: 20px;
    }
    
    /* Убираем hover эффекты */
    .filter-btn:hover,
    .btn:hover,
    .btn-small:hover {
        transform: none;
    }
}

/* ===========================================
   LANDSCAPE MOBILE
   =========================================== */
@media (max-height: 500px) and (orientation: landscape) {
    .header {
        padding: 6px 12px;
    }
    
    h1 {
        font-size: 14px;
    }
    
    .video-modal .modal {
        max-height: 98vh;
    }
    
    .video-modal-player {
        max-height: 50vh;
        aspect-ratio: 16/9;
    }
    
    .video-modal-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* ===========================================
   PRINT STYLES
   =========================================== */
@media print {
    .header,
    .sidebar,
    .filters,
    .table-controls,
    .modal-overlay,
    .menu-toggle,
    .btn-small,
    th:first-child,
    td:first-child,
    th:last-child,
    td:last-child {
        display: none !important;
    }
    
    .container {
        display: block;
    }
    
    .main-content {
        width: 100%;
    }
    
    .content-card {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    table {
        min-width: auto;
    }
    
    th, td {
        display: table-cell !important;
        border: 1px solid #000;
    }
}

.rewrite-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.rewrite-status.status-pending {
    background: #fff3cd;
    color: #856404;
}

.rewrite-status.status-processing {
    background: #d1ecf1;
    color: #0c5460;
    animation: pulse 2s infinite;
}

.rewrite-status.status-completed {
    background: #d4edda;
    color: #155724;
}

.rewrite-status.status-failed {
    background: #f8d7da;
    color: #721c24;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* ============================================
   NEW UX/UI IMPROVEMENTS STYLES
   ============================================ */

/* Toast Notification System */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-left: 4px solid #333;
    transform: translateX(450px);
    opacity: 0;
    transition: all 0.3s ease;
}

.toast.toast-show {
    transform: translateX(0);
    opacity: 1;
}

.toast-success {
    border-left-color: #4caf50;
}

.toast-error {
    border-left-color: #f44336;
}

.toast-warning {
    border-left-color: #ff9800;
}

.toast-info {
    border-left-color: #2196f3;
}

.toast-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-success .toast-icon {
    color: #4caf50;
}

.toast-error .toast-icon {
    color: #f44336;
}

.toast-warning .toast-icon {
    color: #ff9800;
}

.toast-info .toast-icon {
    color: #2196f3;
}

.toast-message {
    flex: 1;
    font-size: 14px;
    color: #333;
    line-height: 1.4;
}

.toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.toast-close:hover {
    background: #f0f0f0;
    color: #333;
}

/* Breadcrumb Navigation */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 0;
    font-size: 13px;
    color: #666;
    margin-bottom: 15px;
}

.breadcrumb-item {
    color: #666;
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb-item:hover {
    color: #1a1a1a;
}

.breadcrumb-item.active {
    color: #1a1a1a;
    font-weight: 500;
}

.breadcrumb-separator {
    color: #ccc;
    user-select: none;
}

/* Bulk Actions Panel */
.bulk-actions-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1a1a1af2;
    border-radius: 0;
    padding: 16px 20px;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.2);
    animation: slideUp 0.3s ease;
    z-index: 1000;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Добавляем отступ снизу для body, когда панель активна */
body:has(.bulk-actions-panel[style*="display: block"]) .main-content,
body:has(.bulk-actions-panel:not([style*="display: none"])) .main-content {
    /* padding-bottom: 100px; */
}

.bulk-actions-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.bulk-actions-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    font-size: 14px;
    font-weight: 500;
}

.bulk-actions-info svg {
    color: #4caf50;
}

.bulk-actions-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.bulk-action-btn {
    padding: 8px 16px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 6px;
    background: transparent;
    color: white;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    white-space: nowrap;
}

.bulk-action-btn:hover {
    background: rgba(255,255,255,0.1);
    transform: translateY(-1px);
}

.bulk-action-primary {
    background: white;
    color: #1a1a1a;
    border-color: white;
}

.bulk-action-primary:hover {
    background: #f0f0f0;
}

.bulk-action-cancel {
    background: transparent;
    border-color: #ff5252;
    color: #ff5252;
}

.bulk-action-cancel:hover {
    background: rgba(255, 82, 82, 0.1);
}

/* Improved Filters Panel */
.filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-direction: row;
}

.filters-main {
    flex: 1;
    display: flex;
    gap: 10px;
    align-items: center;
}

.filters-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.filter-btn {
    padding: 10px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    color: #1a1a1a;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    white-space: nowrap;
}

.filter-btn:hover {
    background: #f5f5f5;
    border-color: #1a1a1a;
}

.filter-btn-icon {
    padding: 10px;
    min-width: 40px;
    justify-content: center;
}

.filter-btn-secondary {
    background: white;
    color: #1a1a1a;
}

.filter-btn-secondary:hover {
    background: #f5f5f5;
}

.filter-text {
    display: inline;
}

.filter-arrow {
    flex-shrink: 0;
}

.filter-dropdown-icon {
    margin-right: 8px;
    font-size: 16px;
}

/* Sidebar Search */
.sidebar-search {
    position: relative;
    margin-bottom: 15px;
}

.sidebar-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    pointer-events: none;
}

.sidebar-search input {
    width: 100%;
    padding: 10px 10px 10px 36px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 13px;
    transition: all 0.2s;
}

.sidebar-search input:focus {
    outline: none;
    border-color: #1a1a1a;
    box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.1);
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: #999;
}

.empty-state svg {
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state-title {
    font-size: 18px;
    font-weight: 500;
    color: #666;
    margin-bottom: 8px;
}

.empty-state-text {
    font-size: 14px;
    color: #999;
}

/* Quick Actions in Table */
.quick-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
}

.quick-action-btn {
    padding: 6px;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.quick-action-btn:hover {
    background: #e8e8e8;
    border-color: #1a1a1a;
    transform: translateY(-1px);
}

.quick-action-details {
    background: #1a1a1a;
    color: #fff;
    border-color: #1a1a1a;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
}

.quick-action-details:hover {
    background: #333;
    border-color: #333;
}

.quick-action-rewrite {
    color: #1a1a1a;
}

.quick-action-success {
    background: #e8f5e9;
    border-color: #4caf50;
    color: #4caf50;
    cursor: default;
}

.quick-action-success:hover {
    background: #e8f5e9;
    transform: none;
}

.quick-action-processing {
    background: #e3f2fd;
    border-color: #2196f3;
    color: #2196f3;
    cursor: default;
}

.quick-action-processing:hover {
    background: #e3f2fd;
    transform: none;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.spin {
    animation: spin 1s linear infinite;
}

/* Competitor Cell with Icon */
.competitor-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.competitor-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

/* Improved Table */
#videosTable {
    transition: opacity 0.3s ease;
}

.video-title {
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============================================
   MOBILE CARD VIEW
   ============================================ */

.mobile-cards-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Swipe wrapper for swipe actions */
.mobile-card-swipe-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
}

.mobile-card-swipe-actions {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    display: flex;
    gap: 4px;
    padding: 8px;
    background: #f44336;
    z-index: 1;
}

.mobile-swipe-action-btn {
    width: 70px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: transparent;
    border: none;
    color: white;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mobile-swipe-action-btn:active {
    opacity: 0.7;
}

.mobile-swipe-action-btn svg {
    width: 20px;
    height: 20px;
}

.mobile-video-card {
    background: white;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 2;
    touch-action: pan-y;
}

.mobile-video-card.swiping {
    transition: none;
}

.mobile-video-card.selected {
    border-color: #1a1a1a;
    box-shadow: 0 2px 8px rgba(26, 26, 26, 0.15);
}

.mobile-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.mobile-checkbox {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.mobile-card-platform {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    font-size: 13px;
    color: #666;
    font-weight: 500;
}

.mobile-card-platform svg {
    flex-shrink: 0;
}

.mobile-card-date {
    font-size: 12px;
    color: #999;
}

.mobile-card-body {
    padding: 16px;
}

.mobile-card-competitor {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    font-weight: 600;
}

.mobile-card-title {
    font-size: 15px;
    color: #1a1a1a;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mobile-card-stats {
    display: flex;
    align-items: center;
    gap: 16px;
}

.mobile-stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #666;
}

.mobile-stat-item svg {
    color: #999;
}

.mobile-stat-item .er-badge {
    font-size: 12px;
    padding: 4px 8px;
}

.mobile-card-actions {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid #e0e0e0;
    background: #fafafa;
}

.mobile-action-btn {
    flex: 1;
    padding: 10px 16px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    background: white;
    color: #1a1a1a;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 44px;
}

.mobile-action-btn:active {
    transform: scale(0.98);
}

.mobile-action-primary {
    background: #1a1a1a;
    color: white;
    border-color: #1a1a1a;
}

.mobile-action-primary:active {
    background: #333;
}

.mobile-action-secondary {
    background: white;
    color: #1a1a1a;
}

.mobile-action-secondary:active {
    background: #f5f5f5;
}

.mobile-action-success {
    background: #e8f5e9;
    border-color: #4caf50;
    color: #4caf50;
    cursor: default;
}

.mobile-action-processing {
    background: #e3f2fd;
    border-color: #2196f3;
    color: #2196f3;
    cursor: default;
}

/* Mobile Responsiveness for New Components */
@media (max-width: 768px) {
    .toast-container {
        right: 10px;
        left: 10px;
        max-width: none;
    }

    .bulk-actions-content {
        flex-direction: column;
        align-items: stretch;
    }

    .bulk-actions-buttons {
        flex-direction: column;
        width: 100%;
    }

    .bulk-action-btn {
        justify-content: center;
        width: 100%;
    }

    /* Compact Filters for Mobile */
    .filters {
        gap: 8px;
        margin-bottom: 12px;
    }

    .filters-main {
        flex: 1;
        min-width: 0;
    }

    .filter-btn {
        padding: 8px 12px;
        font-size: 13px;
        gap: 6px;
    }

    .filter-text {
        display: none; /* Hide text on mobile, show only icon */
    }

    .filter-btn-icon {
        padding: 8px;
        min-width: 36px;
    }

    .filter-btn-icon svg {
        width: 20px;
        height: 20px;
    }

    /* Mobile-friendly dropdown */
    .filter-dropdown {
        left: 0;
        right: 0;
        min-width: auto;
        width: calc(100vw - 40px);
        max-width: 300px;
    }

    .filter-dropdown-item {
        padding: 12px 16px;
        font-size: 14px;
    }

    /* Compact Table Controls for Mobile */
    .table-controls {
        padding: 12px;
        gap: 10px;
        margin-bottom: 12px;
    }

    .search-box {
        min-width: 100%;
        margin-bottom: 0;
    }

    .search-box input {
        font-size: 14px;
        padding: 10px 36px 10px 40px;
    }

    .table-filters-compact {
        width: 100%;
        gap: 8px;
    }

    .table-filter-select {
        flex: 1;
        min-width: 0;
        font-size: 13px;
        padding: 8px 10px;
    }

    .table-results-count {
        width: 100%;
        text-align: center;
        font-size: 12px;
        padding: 6px 0;
        color: #666;
    }

    .breadcrumb {
        font-size: 12px;
    }

    /* Hide table on mobile */
    #videosTable {
        display: none !important;
    }

    /* Show cards on mobile */
    .mobile-cards-container {
        display: flex !important;
    }

    /* Better spacing for mobile cards */
    .content-card {
        padding: 16px;
    }

    .mobile-cards-container {
        gap: 16px;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .mobile-checkbox {
        width: 24px;
        height: 24px;
    }

    .mobile-action-btn {
        min-height: 48px;
        font-size: 14px;
    }

    .filter-btn {
        min-height: 48px;
    }

    .bulk-action-btn {
        min-height: 48px;
    }

    /* Remove hover states for touch devices */
    .mobile-video-card {
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.05);
    }
}

/* ============================================
   SPECIAL USER BACKGROUND
   ============================================ */

.special-user-background {
    background: url('/icons/image.png') no-repeat center center fixed !important;
    background-size: cover !important;
    background-attachment: fixed !important;
}


