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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

header {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin-bottom: 30px;
    text-align: center;
}

header h1 {
    color: #333;
    margin-bottom: 10px;
}

header p {
    color: #666;
    font-size: 14px;
}

.search-section {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin-bottom: 30px;
}

.search-bar {
    display: flex;
    gap: 10px;
}

#searchInput {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.3s;
}

#searchInput:focus {
    outline: none;
    border-color: #667eea;
}

#searchBtn {
    padding: 15px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

#searchBtn:hover {
    transform: translateY(-2px);
}

#searchInfo {
    margin-top: 15px;
    color: #666;
    font-size: 14px;
}

.results-section {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    min-height: 200px;
}

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

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.video-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.video-table th {
    background: #f8f9fa;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #e0e0e0;
}

.video-table td {
    padding: 15px;
    border-bottom: 1px solid #e0e0e0;
}

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

.thumbnail-cell {
    width: 180px;
}

.thumbnail {
    width: 160px;
    height: 90px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.thumbnail:hover {
    transform: scale(1.25);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    z-index: 10;
    position: relative;
}

.video-info {
    max-width: 300px;
}

.video-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-channel {
    color: #666;
    font-size: 13px;
}

.video-stats {
    color: #888;
    font-size: 12px;
    margin-top: 5px;
}

.video-duration {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
    margin-top: 5px;
    display: inline-block;
}

.shorts-badge {
    background: #ff0000;
    color: white;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    margin-top: 5px;
    display: inline-block;
    text-transform: uppercase;
}

.shorts-thumbnail {
    border: 2px solid #ff0000;
}

.location-input {
    width: 100%;
    padding: 8px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    font-size: 14px;
    margin-bottom: 5px;
}

.location-input:focus {
    outline: none;
    border-color: #667eea;
}

.coord-group {
    display: flex;
    gap: 5px;
}

.coord-input {
    flex: 1;
    padding: 8px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    font-size: 13px;
}

.approve-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
    width: 100%;
}

.approve-btn:hover:not(:disabled) {
    transform: translateY(-2px);
}

.approve-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.approve-btn.approved {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.approve-btn.already-approved {
    background: #94a3b8;
    cursor: not-allowed;
}

/* Pagination */
#pagination {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #e0e0e0;
}

.pagination-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.page-btn {
    padding: 12px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.page-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.page-btn:active {
    transform: translateY(0);
}

/* Badge */
.badge {
    display: inline-block;
    margin-left: 10px;
    padding: 4px 12px;
    background: #667eea;
    color: white;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    background: white;
    padding: 15px 15px 0 15px;
    border-radius: 15px 15px 0 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.tab-btn {
    padding: 12px 30px;
    background: transparent;
    color: #666;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.tab-btn:hover {
    color: #667eea;
}

.tab-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Database Section */
.database-section {
    background: white;
    padding: 25px;
    border-radius: 0 0 15px 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    min-height: 200px;
}

.database-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

#dbSearchInput {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 14px;
}

#dbSearchBtn, #dbRefreshBtn {
    padding: 12px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

#dbSearchBtn:hover, #dbRefreshBtn:hover {
    transform: translateY(-2px);
}

#dbInfo {
    margin-bottom: 15px;
    color: #666;
    font-size: 14px;
}

/* Action Buttons in Table */
.action-btn {
    padding: 6px 12px;
    margin: 0 3px;
    border: none;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-edit {
    background: #3b82f6;
    color: white;
}

.btn-edit:hover {
    background: #2563eb;
}

.btn-delete {
    background: #ef4444;
    color: white;
}

.btn-delete:hover {
    background: #dc2626;
}

.btn-view {
    background: #10b981;
    color: white;
}

.btn-view:hover {
    background: #059669;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.modal-content h2 {
    margin-bottom: 20px;
    color: #333;
}

.modal-content .close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 30px;
    cursor: pointer;
    color: #666;
}

.modal-content .close:hover {
    color: #333;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn-save, .btn-cancel {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-save {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
}

.btn-save:hover {
    transform: translateY(-2px);
}

.btn-cancel {
    background: #e5e7eb;
    color: #666;
}

.btn-cancel:hover {
    background: #d1d5db;
}

/* AI Detect Location Button */
.ai-detect-section {
    text-align: center;
    margin: 20px 0;
    padding: 15px;
    background: #f9fafb;
    border-radius: 8px;
    border: 2px dashed #d1d5db;
}

.btn-ai-detect {
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-ai-detect:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.5);
}

.btn-ai-detect:active {
    transform: translateY(0);
}

.btn-ai-detect:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    box-shadow: none;
}

/* Geocode Button for Modal */
.btn-geocode {
    padding: 12px 24px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
    margin-left: 10px;
}

.btn-geocode:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.5);
}

.btn-geocode:active {
    transform: translateY(0);
}

.btn-geocode:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    box-shadow: none;
}

.ai-status {
    display: block;
    margin-top: 10px;
    font-size: 12px;
    color: #666;
}

.ai-status.loading {
    color: #667eea;
    font-weight: 600;
}

.ai-status.success {
    color: #10b981;
    font-weight: 600;
}

.ai-status.error {
    color: #ef4444;
    font-weight: 600;
}

/* Location Buttons Container */
.location-buttons {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-bottom: 8px;
}

/* AI Detect Button (Small) for Search Results */
.btn-ai-detect-small {
    width: 32px;
    height: 32px;
    padding: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.btn-ai-detect-small:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-ai-detect-small:active {
    transform: translateY(0);
}

.btn-ai-detect-small:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    box-shadow: none;
}

/* Geocode Button (Small) for Search Results */
.btn-geocode-small {
    width: 32px;
    height: 32px;
    padding: 0;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.btn-geocode-small:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.btn-geocode-small:active {
    transform: translateY(0);
}

.btn-geocode-small:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    box-shadow: none;
}

.ai-status-small {
    font-size: 11px;
    margin-top: 4px;
    text-align: center;
    color: #666;
    min-height: 14px;
}

.ai-status-small.loading {
    color: #667eea;
    font-weight: 600;
}

.ai-status-small.success {
    color: #10b981;
    font-weight: 600;
}

.ai-status-small.error {
    color: #ef4444;
    font-weight: 600;
}

/* Address Suggestions */
.address-suggestion {
    font-size: 11px;
    margin-top: 6px;
    padding: 6px;
    background: #fef3c7;
    border-left: 3px solid #f59e0b;
    border-radius: 4px;
    color: #92400e;
    min-height: 0;
}

.address-suggestion-modal {
    font-size: 12px;
    margin-top: 10px;
    padding: 10px;
    background: #fef3c7;
    border-left: 3px solid #f59e0b;
    border-radius: 4px;
    color: #92400e;
}

.suggestion-text,
.suggestion-text-modal {
    cursor: pointer;
    text-decoration: underline;
    font-weight: 600;
    color: #d97706;
}

.suggestion-text:hover,
.suggestion-text-modal:hover {
    color: #b45309;
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
}

.close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
}

.close:hover {
    color: #ddd;
}

#videoPlayer {
    width: 100%;
    aspect-ratio: 16/9;
    background: black;
}

#videoPlayer iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.status-badge {
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.status-approved {
    background: #d1fae5;
    color: #065f46;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state h3 {
    margin-bottom: 10px;
    color: #666;
}

@media (max-width: 768px) {
    .video-table {
        font-size: 14px;
    }
    
    .thumbnail-cell {
        width: 120px;
    }
    
    .thumbnail {
        width: 100px;
        height: 56px;
    }
    
    .video-info {
        max-width: 200px;
    }
}

