* {
    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;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.header {
    text-align: center;
    margin-bottom: 3rem;
    color: white;
}

.header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.input-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.input-group {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.url-input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.url-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.view-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.view-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

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

.results-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    min-height: 200px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    gap: 1rem;
}

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

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

.tabs-container {
    padding: 1rem 2rem 0;
    border-bottom: 1px solid #e1e5e9;
}

.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #667eea transparent;
}

.tabs::-webkit-scrollbar {
    height: 4px;
}

.tabs::-webkit-scrollbar-track {
    background: transparent;
}

.tabs::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 2px;
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    background: transparent;
    color: #666;
    font-weight: 500;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
    flex-shrink: 0;
}

.tab-btn:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.tab-btn.active {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    border-bottom-color: #667eea;
}

.project-info {
    padding: 2rem 2rem 1rem;
    border-bottom: 1px solid #e1e5e9;
}

.project-info h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.project-info p {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.project-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #888;
}

.assets-grid {
    padding: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.asset-card {
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.asset-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-color: #667eea;
}

.asset-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.asset-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
}

.asset-icon.image { background: linear-gradient(135deg, #ff6b6b, #ffa500); }
.asset-icon.code { background: linear-gradient(135deg, #4ecdc4, #44a08d); }
.asset-icon.data { background: linear-gradient(135deg, #a8edea, #fed6e3); color: #333; }
.asset-icon.other { background: linear-gradient(135deg, #667eea, #764ba2); }

.asset-name {
    font-weight: 600;
    color: #333;
    word-break: break-all;
}

.asset-details {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: #666;
}

.error-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 3rem;
    text-align: center;
    gap: 1rem;
}

.error-icon {
    font-size: 3rem;
}

.error-message h3 {
    color: #e74c3c;
    margin-bottom: 0.5rem;
}

.error-message p {
    color: #666;
    max-width: 400px;
}

.p-url a:hover {
    text-decoration: underline !important;
}

.asset-actions {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.play-btn {
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
    color: white;
}

.play-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(68, 160, 141, 0.3);
}

.play-btn.playing {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.view-btn-small {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

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

.urls-textarea {
    width: 100%;
    height: 300px;
    padding: 1rem;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    font-family: 'Monaco', 'Consolas', 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
    resize: vertical;
    margin-bottom: 1rem;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 2rem auto;
    padding: 0;
    border-radius: 16px;
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.review-modal .modal-content {
    max-width: 95vw;
    width: 95vw;
    height: 90vh;
    max-height: 90vh;
}

.confirm-modal .modal-content {
    max-width: 500px;
    width: 90%;
}

.confirm-content {
    padding: 0;
}

.confirm-message {
    padding: 2rem;
    text-align: center;
}

.warning-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.confirm-message p {
    font-size: 1.1rem;
    color: #333;
    line-height: 1.5;
    margin: 0;
}

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

.modal-header h3 {
    margin: 0;
    color: #333;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    color: #666;
}

.close-btn:hover {
    background-color: #e1e5e9;
}

.modal-body {
    padding: 0;
    max-height: calc(90vh - 120px);
    overflow: auto;
}

.code-content {
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 0;
    font-family: 'Monaco', 'Consolas', 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
    white-space: pre-wrap;
    overflow: auto;
    max-height: calc(90vh - 160px);
}

.code-content code {
    display: block;
    padding: 1rem;
    background: transparent;
    border: none;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    white-space: pre-wrap;
    overflow-x: auto;
}

.loading-text, .error-text {
    padding: 1rem;
    color: #666;
    font-style: italic;
}

.error-text {
    color: #e74c3c;
}

/* Override highlight.js background to match our design */
.hljs {
    background: #f8f9fa !important;
    padding: 1rem !important;
}

.modal-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.copy-media-urls-btn {
    background: linear-gradient(135deg, #ff6b6b, #ffa500);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.copy-media-urls-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.3);
}

.ignore-btn {
    background: linear-gradient(135deg, #6c757d, #495057);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.ignore-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.review-container {
    display: flex;
    height: calc(90vh - 120px);
    gap: 1rem;
    overflow: hidden;
}

.code-panel, .suggestions-panel {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.code-panel {
    border-right: 1px solid #e1e5e9;
    padding-right: 1rem;
}

.panel-header {
    font-weight: 600;
    margin-bottom: 1rem;
    padding: 0.75rem 1rem 0.5rem 0;
    border-bottom: 1px solid #e1e5e9;
    color: #333;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.copy-code-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 0.5rem;
    border-radius: 6px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
}

.copy-code-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.copy-notification {
    position: absolute;
    background: #4CAF50;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    z-index: 1001;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    transform: translateX(-50%);
}

.code-with-lines {
    flex: 1;
    overflow: auto;
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    font-family: 'Monaco', 'Consolas', 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
}

.code-line {
    display: flex;
    min-height: 1.5em;
}

.line-number {
    background: #e9ecef;
    color: #6c757d;
    padding: 0 0.75rem;
    text-align: right;
    min-width: 3rem;
    user-select: none;
    border-right: 1px solid #dee2e6;
    flex-shrink: 0;
}

.line-content {
    padding: 0 0.75rem;
    flex: 1;
    white-space: pre;
    overflow-x: auto;
}

.suggestions-content {
    flex: 1;
    overflow: auto;
    padding: 1rem;
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
}

.suggestion-item {
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.suggestion-item:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.suggestion-item:last-child {
    margin-bottom: 0;
}

.suggestion-line-ref {
    font-weight: 600;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.suggestion-text {
    color: #333;
    line-height: 1.5;
}

.suggestion-code-snippet {
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
    border-radius: 4px;
    padding: 0.5rem;
    font-family: 'Monaco', 'Consolas', 'Courier New', monospace;
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
    white-space: pre-wrap;
    overflow-x: auto;
    color: #495057;
}

.code-line.highlighted {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
}

.code-line.highlighted .line-number {
    background-color: #ffc107;
    color: #856404;
    font-weight: bold;
}

.review-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    gap: 1rem;
}

.suggestion-actions {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.resolve-btn, .revert-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.revert-btn {
    background: linear-gradient(135deg, #ffc107, #e0a800);
}

.resolve-btn:hover:not(:disabled), .revert-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.revert-btn:hover:not(:disabled) {
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

.resolve-btn:disabled, .revert-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.suggestions-panel .panel-header {
    padding: 0.75rem 0 0.5rem 1rem;
    justify-content: flex-start;
}

.copy-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

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

.continue-btn {
    background: #dc3545;
    color: white;
}

.continue-btn:hover {
    background: #c82333;
    transform: translateY(-1px);
}

.cancel-btn {
    background: #6c757d;
    color: white;
}

.cancel-btn:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .input-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .view-btn {
        justify-content: center;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .assets-grid {
        grid-template-columns: 1fr;
    }
    
    .tabs {
        padding: 0 0.5rem;
    }
    
    .tab-btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    .review-container {
        flex-direction: column;
        height: auto;
    }
    
    .code-panel {
        border-right: none;
        border-bottom: 1px solid #e1e5e9;
        padding-right: 0;
        padding-bottom: 1rem;
        margin-bottom: 1rem;
    }
    
    .code-with-lines, .suggestions-content {
        max-height: 300px;
    }
}