/* New Features UI Styles */

/* Share and Report Buttons */
.share-btn, .report-btn {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    transition: all 0.2s ease;
}

.share-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.report-btn {
    color: #ef4444;
}

.report-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.report-btn svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

/* Lightbox Controls */
.lightbox-control-btn {
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 8px 12px;
    color: white;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lightbox-control-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

/* Notification Bell */
.notification-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: #ff4444;
    color: white;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* Toggle Switch for Accessibility */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border);
    transition: 0.3s;
    border-radius: 28px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--primary);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

/* High Contrast Mode */
body.high-contrast {
    --bg: #000;
    --card-bg: #111;
    --text: #fff;
    --text-secondary: #ccc;
    --border: #444;
}

/* Reduced Motion */
body.reduced-motion * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
}

/* Font Size Classes */
body.font-small {
    font-size: 14px;
}

body.font-medium {
    font-size: 16px;
}

body.font-large {
    font-size: 18px;
}

body.font-xlarge {
    font-size: 20px;
}

/* TikTok Enhanced Controls */
.tiktok-action-btn {
    position: relative;
}

#tiktok-speed-label {
    font-size: 12px;
    font-weight: bold;
}

#tiktok-loop-icon {
    opacity: 0.5;
}

#tiktok-loop-btn.active #tiktok-loop-icon {
    opacity: 1;
    color: var(--primary);
}

/* Advanced Search Filters */
.advanced-search-filters {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Notification Item */
.notification-item {
    padding: 12px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.2s ease;
}

.notification-item:hover {
    background: var(--hover-bg);
}

.notification-item.unread {
    background: rgba(var(--primary-rgb), 0.1);
    border-left: 3px solid var(--primary);
}

.notification-item-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.notification-item-body {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.notification-item-time {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Report Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

.modal-container {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-primary);
}

.modal-title svg {
    stroke: #ef4444;
}

.modal-close {
    background: transparent;
    border: none;
    padding: 8px;
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
}

.modal-description {
    color: var(--text-secondary);
    font-size: 15px;
    margin: 0 0 24px 0;
    line-height: 1.5;
}

.report-reasons {
    display: grid;
    gap: 12px;
    margin-bottom: 24px;
}

.report-reason-option {
    cursor: pointer;
}

.report-reason-option input[type="radio"] {
    display: none;
}

.report-reason-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px;
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.report-reason-option:hover .report-reason-card {
    background: var(--bg-tertiary);
    border-color: var(--primary);
}

.report-reason-option input[type="radio"]:checked + .report-reason-card {
    background: var(--bg-tertiary);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.report-reason-icon {
    font-size: 28px;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: 10px;
}

.report-reason-text {
    flex: 1;
}

.report-reason-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.report-reason-desc {
    font-size: 14px;
    color: var(--text-secondary);
}

.modal-form-group {
    margin-bottom: 24px;
}

.modal-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.modal-textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    transition: all 0.2s ease;
}

.modal-textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg-tertiary);
}

.modal-textarea::placeholder {
    color: var(--text-secondary);
}

.modal-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.modal-btn {
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.modal-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
    border: 1px solid var(--border);
}

.modal-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.modal-btn-primary {
    background: var(--primary);
    color: white;
}

.modal-btn-primary:hover {
    background: var(--primary-hover, #2563eb);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* Mobile Responsive */
@media (max-width: 768px) {
    .notifications-panel {
        right: 10px !important;
        left: 10px !important;
        width: auto !important;
    }

    .lightbox-controls {
        top: 10px !important;
        right: 50px !important;
        flex-direction: column !important;
    }

    .lightbox-control-btn {
        font-size: 16px;
        padding: 6px 10px;
    }

    .advanced-search-filters {
        flex-direction: column;
    }

    .filter-select {
        width: 100%;
    }
}
