/* Shorts Engine Dashboard Styles */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #0f0f0f;
    color: #ffffff;
    line-height: 1.6;
}

header {
    background: #1a1a1a;
    padding: 1.5rem 2rem;
    border-bottom: 2px solid #2a2a2a;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    font-size: 1.8rem;
    font-weight: 600;
}

header h1 a {
    color: #ffffff;
    text-decoration: none;
}

header h1 a:hover {
    color: #3ea6ff;
}

#stats {
    display: flex;
    gap: 2rem;
    font-size: 0.9rem;
}

#stats span {
    background: #2a2a2a;
    padding: 0.5rem 1rem;
    border-radius: 6px;
}

main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Filters */
.filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filters button {
    padding: 0.75rem 1.5rem;
    background: #2a2a2a;
    color: #fff;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
}

.filters button:hover {
    background: #3a3a3a;
}

.filters button.active {
    background: #3ea6ff;
    border-color: #3ea6ff;
}

/* Video Grid */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.video-card {
    background: #1a1a1a;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.video-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.video-thumbnail {
    position: relative;
    width: 100%;
    padding-top: 177.78%; /* 16:9 aspect ratio (9/16 * 100) */
    background: #000;
    overflow: hidden;
}

.video-thumbnail video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.status-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-pending_review {
    background: #ff9500;
    color: #000;
}

.status-approved {
    background: #30d158;
    color: #000;
}

.status-rejected {
    background: #ff3b30;
    color: #fff;
}

.video-info {
    padding: 0.75rem;
}

.video-info h3 {
    font-size: 0.95rem;
    margin-bottom: 0.4rem;
    line-height: 1.3;
}

.video-info h3 a {
    color: #fff;
    text-decoration: none;
}

.video-info h3 a:hover {
    color: #3ea6ff;
}

.category {
    color: #888;
    font-size: 0.75rem;
    margin-bottom: 0.3rem;
}

.duration {
    color: #aaa;
    font-size: 0.8rem;
    margin-bottom: 0.3rem;
}

.fact-check-warning {
    background: #ff9500;
    color: #000;
    padding: 0.4rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin: 0.3rem 0;
}

/* Upload Status Badges */
.upload-status {
    padding: 0.4rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin: 0.3rem 0;
}

.upload-status.uploaded {
    background: #4CAF50;
    color: #fff;
}

.upload-status.uploaded a {
    color: #fff;
    text-decoration: none;
}

.upload-status.uploaded a:hover {
    text-decoration: underline;
}

.upload-status.scheduled {
    background: #2196F3;
    color: #fff;
}

.upload-status.pending {
    background: #666;
    color: #fff;
}

.video-meta {
    color: #666;
    font-size: 0.7rem;
    margin-top: 0.3rem;
}

.video-actions {
    display: flex;
    gap: 0.4rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    padding: 0.5rem 0.9rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: #3ea6ff;
    color: #000;
}

.btn-primary:hover {
    background: #5eb8ff;
}

.btn-success {
    background: #30d158;
    color: #000;
}

.btn-success:hover {
    background: #40e168;
}

.btn-danger {
    background: #ff3b30;
    color: #fff;
}

.btn-danger:hover {
    background: #ff4b40;
}

.btn-warning {
    background: #ff9500;
    color: #000;
}

.btn-secondary {
    background: #2a2a2a;
    color: #fff;
}

.btn-secondary:hover {
    background: #3a3a3a;
}

.btn-danger-outline {
    background: transparent;
    color: #ff3b30;
    border: 2px solid #ff3b30;
}

.btn-danger-outline:hover {
    background: #ff3b30;
    color: #fff;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Video Detail Page */
.video-detail {
    max-width: 1600px;
}

.video-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.video-header h2 {
    font-size: 2rem;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

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

.video-player-section video {
    border-radius: 12px;
    background: #000;
}

.video-stats {
    background: #1a1a1a;
    padding: 1.5rem;
    border-radius: 12px;
    margin: 1rem 0;
}

.video-stats p {
    margin-bottom: 0.5rem;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.detail-card {
    background: #1a1a1a;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.detail-card h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.script-text {
    background: #0f0f0f;
    padding: 1rem;
    border-radius: 8px;
    line-height: 1.8;
    white-space: pre-wrap;
}

.fact-check-verified {
    border-left: 4px solid #30d158;
}

.fact-check-flagged {
    border-left: 4px solid #ff9500;
}

.fact-check-notes {
    background: #0f0f0f;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.image-gallery img {
    width: 100%;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s;
}

.image-gallery img:hover {
    transform: scale(1.05);
}

textarea {
    width: 100%;
    background: #0f0f0f;
    color: #fff;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    padding: 1rem;
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
}

.asset-list {
    list-style: none;
}

.asset-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #2a2a2a;
}

.asset-list li:last-child {
    border-bottom: none;
}

.asset-list code {
    background: #0f0f0f;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: #3ea6ff;
}

/* Image Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.95);
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90vh;
    border-radius: 12px;
}

.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #ff3b30;
}

/* Mobile-Optimized Video Review Page */

/* Default: Show mobile layout, hide desktop */
.desktop-header {
    display: none;
}

.desktop-layout {
    display: none;
}

.mobile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #1a1a1a;
    border-bottom: 1px solid #2a2a2a;
}

.back-link {
    color: #3ea6ff;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
}

.video-review-mobile {
    max-width: 100%;
    padding: 0;
    margin: 0;
    display: block;
}

.mobile-video-container {
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem 0;
}

.mobile-video-container video {
    width: 100%;
    max-width: 375px; /* iPhone-sized */
    height: auto;
    border-radius: 8px;
}

.mobile-info {
    padding: 1rem;
    background: #1a1a1a;
    border-bottom: 1px solid #2a2a2a;
}

.mobile-info h2 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.meta-row {
    display: flex;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #888;
    flex-wrap: wrap;
}

.mobile-actions {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    background: #0f0f0f;
    flex-wrap: wrap;
}

.btn-mobile {
    flex: 1;
    min-width: 100px;
    padding: 0.85rem;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
}

.mobile-section {
    background: #1a1a1a;
    border-bottom: 1px solid #2a2a2a;
}

.mobile-section summary {
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-section summary::-webkit-details-marker {
    display: none;
}

.mobile-section summary:after {
    content: '▼';
    font-size: 0.7rem;
    color: #888;
}

.mobile-section[open] summary:after {
    content: '▲';
}

.mobile-content {
    padding: 0 1rem 1rem 1rem;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #ccc;
    white-space: pre-wrap;
}

.mobile-content p {
    margin-bottom: 0.5rem;
}

.mobile-image-grid {
    padding: 0 1rem 1rem 1rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.mobile-image-grid img {
    width: 100%;
    border-radius: 6px;
    cursor: pointer;
    aspect-ratio: 9/16;
    object-fit: cover;
}

/* Tablet and Desktop: Show desktop layout, hide mobile */
@media (min-width: 768px) {
    .mobile-header {
        display: none;
    }
    
    .video-review-mobile {
        display: none;
    }
    
    .desktop-header {
        display: flex;
    }
    
    .desktop-layout {
        display: block;
    }
}

